From ab6890b854cbe94d0ed816365b9acaf11f6eaa1f Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 15 Oct 2014 12:51:46 +0200 Subject: [PATCH] instead of dis/enabling tabs on save, cancel tab change. avoids noisy ui --- apps/user_ldap/js/settings.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/apps/user_ldap/js/settings.js b/apps/user_ldap/js/settings.js index 73cace33758..25b39ae71f0 100644 --- a/apps/user_ldap/js/settings.js +++ b/apps/user_ldap/js/settings.js @@ -675,6 +675,10 @@ var LdapWizard = { /** end of init user filter tab section **/ onTabChange: function(event, ui) { + if(LdapWizard.saveProcesses > 0) { + //do not allow to switch tabs as long as a save process is active + return false; + } newTabIndex = 0; if(ui.newTab[0].id === '#ldapWizard2') { LdapWizard.initUserFilter(); @@ -765,7 +769,6 @@ var LdapWizard = { $('#ldap .ldap_saving').removeClass('hidden'); LdapWizard.saveProcesses += 1; $('#ldap *').addClass('save-cursor'); - LdapWizard.disableTabs(); param = 'cfgkey='+encodeURIComponent(object.id)+ '&cfgval='+encodeURIComponent(value)+ '&action=save'+ @@ -778,11 +781,7 @@ var LdapWizard = { LdapWizard.saveProcesses -= 1; if(LdapWizard.saveProcesses === 0) { $('#ldap .ldap_saving').addClass('hidden'); - console.log('switch cursor'); - console.log($('#ldap *').css('cursor')); $('#ldap *').removeClass('save-cursor'); - //enable the tabs again, if everything is OK - LdapWizard.basicStatusCheck(); console.log($('#ldap *').css('cursor')); } if(result.status === 'success') { -- 2.39.5