Merge pull request #4930 from owncloud/fix-apps-settings

Fix the apps enabling/disabling in settings
This commit is contained in:
Thomas Müller 2013-09-24 01:02:50 -07:00
commit 40871bab88
1 changed files with 3 additions and 1 deletions

View File

@ -84,6 +84,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
} }
else { else {
appitem.data('active',false); appitem.data('active',false);
element.data('active',false);
OC.Settings.Apps.removeNavigation(appid); OC.Settings.Apps.removeNavigation(appid);
appitem.removeClass('active'); appitem.removeClass('active');
element.val(t('settings','Enable')); element.val(t('settings','Enable'));
@ -104,6 +105,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
} else { } else {
OC.Settings.Apps.addNavigation(appid); OC.Settings.Apps.addNavigation(appid);
appitem.data('active',true); appitem.data('active',true);
element.data('active',true);
appitem.addClass('active'); appitem.addClass('active');
element.val(t('settings','Disable')); element.val(t('settings','Disable'));
} }
@ -158,7 +160,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
if(response.status === 'success'){ if(response.status === 'success'){
var navIds=response.nav_ids; var navIds=response.nav_ids;
for(var i=0; i< navIds.length; i++){ for(var i=0; i< navIds.length; i++){
$('#apps').children('li[data-id="'+navIds[i]+'"]').remove(); $('#apps .wrapper').children('li[data-id="'+navIds[i]+'"]').remove();
} }
} }
}); });