diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-10-31 08:38:05 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-10-31 08:38:05 +0100 |
commit | a9b41cbf54323d9b87c9aa46097cb609dcb5d038 (patch) | |
tree | 2e5f11cfa6ddf2400e21e63038dc285b935ab042 /apps/user_ldap | |
parent | e00f25e5b06e6bc119a91f36a0bf232109cf964f (diff) | |
parent | 8a48b088ed22f23f961da3c0eb9591989f8cc98a (diff) | |
download | nextcloud-server-a9b41cbf54323d9b87c9aa46097cb609dcb5d038.tar.gz nextcloud-server-a9b41cbf54323d9b87c9aa46097cb609dcb5d038.zip |
Merge pull request #11850 from owncloud/fix-11848
on xp'ed mode and switching configurations: save raw mode instead of tog...
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/js/experiencedAdmin.js | 14 | ||||
-rw-r--r-- | apps/user_ldap/js/settings.js | 10 |
2 files changed, 10 insertions, 14 deletions
diff --git a/apps/user_ldap/js/experiencedAdmin.js b/apps/user_ldap/js/experiencedAdmin.js index fac8dd6470f..8d138eecc41 100644 --- a/apps/user_ldap/js/experiencedAdmin.js +++ b/apps/user_ldap/js/experiencedAdmin.js @@ -50,17 +50,9 @@ ExperiencedAdmin.prototype.isExperienced = function() { * switches all LDAP filters from Assisted to Raw mode. */ ExperiencedAdmin.prototype.enableRawMode = function() { - var containers = { - 'toggleRawGroupFilter': '#rawGroupFilterContainer', - 'toggleRawLoginFilter': '#rawLoginFilterContainer', - 'toggleRawUserFilter' : '#rawUserFilterContainer' - }; - - for(var method in containers) { - if($(containers[method]).hasClass('invisible')) { - this.wizard[method](); - } - } + LdapWizard._save({id: 'ldapGroupFilterMode'}, LdapWizard.filterModeRaw); + LdapWizard._save({id: 'ldapUserFilterMode' }, LdapWizard.filterModeRaw); + LdapWizard._save({id: 'ldapLoginFilterMode'}, LdapWizard.filterModeRaw); }; ExperiencedAdmin.prototype.updateUserTab = function(mode) { diff --git a/apps/user_ldap/js/settings.js b/apps/user_ldap/js/settings.js index 1627528200f..fa40aba73b4 100644 --- a/apps/user_ldap/js/settings.js +++ b/apps/user_ldap/js/settings.js @@ -838,9 +838,10 @@ var LdapWizard = { } }, - onToggleRawFilterConfirmation: function(currentMode, callback) { - if(!LdapWizard.admin.isExperienced() - || currentMode === LdapWizard.filterModeAssisted + onToggleRawFilterConfirmation: function(currentMode, isRawVisible, callback) { + if( !LdapWizard.admin.isExperienced() + || currentMode === LdapWizard.filterModeAssisted + || (LdapWizard.admin.isExperienced() && !isRawVisible) ) { return callback(true); } @@ -855,6 +856,7 @@ var LdapWizard = { toggleRawGroupFilter: function() { LdapWizard.onToggleRawFilterConfirmation( LdapWizard.groupFilter.getMode(), + !$('#rawGroupFilterContainer').hasClass('invisible'), function(confirmed) { if(confirmed !== true) { return; @@ -875,6 +877,7 @@ var LdapWizard = { toggleRawLoginFilter: function() { LdapWizard.onToggleRawFilterConfirmation( LdapWizard.loginFilter.getMode(), + !$('#rawLoginFilterContainer').hasClass('invisible'), function(confirmed) { if(confirmed !== true) { return; @@ -909,6 +912,7 @@ var LdapWizard = { toggleRawUserFilter: function() { LdapWizard.onToggleRawFilterConfirmation( LdapWizard.userFilter.getMode(), + !$('#rawUserFilterContainer').hasClass('invisible'), function(confirmed) { if(confirmed === true) { LdapWizard.blacklistRemove('ldap_userlist_filter'); |