Improve detection of installations errors

This commit is contained in:
Brice Maron 2013-03-23 12:19:43 +01:00
parent bbeb657c03
commit 24d471af29
1 changed files with 7 additions and 1 deletions

View File

@ -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');
}
},