aboutsummaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/apps.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/settings/js/apps.js b/settings/js/apps.js
index e2f882c6fec..0f9181a2c75 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -28,10 +28,18 @@ $(document).ready(function(){
var active=$(this).data('active');
if(app){
if(active){
- $.post(OC.filePath('settings','ajax','disableapp.php'),{appid:app});
+ $.post(OC.filePath('settings','ajax','disableapp.php'),{appid:app},function(result){
+ if(!result || result.status!='succes'){
+ OC.dialogs.alert('Error','Error while enabling app');
+ }
+ },'json');
$('#leftcontent li[data-id="'+app+'"]').removeClass('active');
}else{
- $.post(OC.filePath('settings','ajax','enableapp.php'),{appid:app});
+ $.post(OC.filePath('settings','ajax','enableapp.php'),{appid:app},function(result){
+ if(!result || result.status!='succes'){
+ OC.dialogs.alert('Error','Error while disabling app');
+ }
+ },'json');
$('#leftcontent li[data-id="'+app+'"]').addClass('active');
}
active=!active;