]> source.dussan.org Git - nextcloud-server.git/commitdiff
show correct text when disabling App 3590/head
authorArtur Neumann <info@individual-it.net>
Thu, 23 Feb 2017 06:02:38 +0000 (11:47 +0545)
committerArtur Neumann <info@individual-it.net>
Thu, 23 Feb 2017 06:02:38 +0000 (11:47 +0545)
during the process of disabling an App the button would show "Enabling
app …"
This is corrected by this patch

Signed-off-by: Artur Neumann <info@individual-it.net>
settings/js/apps.js

index 1538e71a491afc9a2b49b53a66c3972a3c24299c..b73b4a35b3f5d3cd51029e3878c44d289d8cd98e 100644 (file)
@@ -292,8 +292,8 @@ OC.Settings.Apps = OC.Settings.Apps || {
                OC.Settings.Apps.hideErrorMessage(appId);
                groups = groups || [];
                var appItem = $('div#app-'+appId+'');
-               element.val(t('settings','Enabling app …'));
                if(active && !groups.length) {
+                       element.val(t('settings','Disabling app …'));
                        $.post(OC.filePath('settings','ajax','disableapp.php'),{appid:appId},function(result) {
                                if(!result || result.status !== 'success') {
                                        if (result.data && result.data.message) {
@@ -320,6 +320,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
                } else {
                        // TODO: display message to admin to not refresh the page!
                        // TODO: lock UI to prevent further operations
+                       element.val(t('settings','Enabling app …'));
                        $.post(OC.filePath('settings','ajax','enableapp.php'),{appid: appId, groups: groups},function(result) {
                                if(!result || result.status !== 'success') {
                                        if (result.data && result.data.message) {