aboutsummaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-04-14 12:57:03 +0200
committerRobin Appelman <icewind@owncloud.com>2012-04-14 12:57:10 +0200
commitd8864d4f4bd54a314b1d7c7945578b95f24477d1 (patch)
tree96c19a72c77d3f5097c53a5e3c53931b91641ee9 /settings/js
parentd3bf01376150ffd5de18cdc53f5e66b0c4979526 (diff)
downloadnextcloud-server-d8864d4f4bd54a314b1d7c7945578b95f24477d1.tar.gz
nextcloud-server-d8864d4f4bd54a314b1d7c7945578b95f24477d1.zip
show error when installing an app has failed
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;