From 485be909ff10d151fd5ddfe8e0709f50db611882 Mon Sep 17 00:00:00 2001
From: Georg Ehrke
Date: Sat, 5 Jul 2014 13:39:25 +0200
Subject: [PATCH] improvements for uninstall button
---
settings/js/apps.js | 12 ++++++------
settings/templates/apps.php | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/settings/js/apps.js b/settings/js/apps.js
index 4cd7520caa..3f9a9eab17 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -84,12 +84,12 @@ OC.Settings.Apps = OC.Settings.Apps || {
page.find('input.update').hide();
}
- if (app.removable !== false) {
- page.find('input.uninstall').show();
- page.find('input.uninstall').data('appid', app.id);
- page.find('input.uninstall').attr('value', t('settings', 'Uninstall App'));
+ if (app.removable !== false && app.active === false) {
+ page.find('a.uninstall').show();
+ page.find('a.uninstall').data('appid', app.id);
+ page.find('a.uninstall').attr('value', t('settings', 'Uninstall App'));
} else {
- page.find('input.uninstall').hide();
+ page.find('a.uninstall').hide();
}
page.find('input.enable').show();
@@ -371,7 +371,7 @@ $(document).ready(function(){
OC.Settings.Apps.updateApp(appid, element);
}
});
- $('#app-content input.uninstall').click(function(){
+ $('#app-content a.uninstall').click(function(){
var element = $(this);
var appid=$(this).data('appid');
if(appid) {
diff --git a/settings/templates/apps.php b/settings/templates/apps.php
index b35eda4350..29fda0ed24 100644
--- a/settings/templates/apps.php
+++ b/settings/templates/apps.php
@@ -53,7 +53,7 @@
print_unescaped($l->t('-licensed by '));?>
-
+ t('Uninstall')); ?>