From 24d471af294938a6f89af74710ecb8d6bd1e33b5 Mon Sep 17 00:00:00 2001 From: Brice Maron Date: Sat, 23 Mar 2013 12:19:43 +0100 Subject: Improve detection of installations errors --- settings/js/apps.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'settings') diff --git a/settings/js/apps.js b/settings/js/apps.js index 43013a9e1ec..dd20bc0a9c5 100644 --- a/settings/js/apps.js +++ b/settings/js/apps.js @@ -75,7 +75,13 @@ OC.Settings.Apps = OC.Settings.Apps || { element.data('active',true); element.val(t('settings','Disable')); } - },'json'); + },'json') + .fail(function() { + OC.dialogs.alert('Error while enabling app','Error'); + element.data('active',false); + OC.Settings.Apps.removeNavigation(appid); + element.val(t('settings','Enable')); + }); $('#leftcontent li[data-id="'+appid+'"]').addClass('active'); } }, -- cgit v1.2.3