From e28227ecdc0f898868701fe131326d8c15ef60d7 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Fri, 11 Apr 2014 13:56:06 +0200 Subject: [PATCH] fix comparison in determineMode, fixes problems with restoring the filter mode (assisted or manually) on page refresh --- apps/user_ldap/js/ldapFilter.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/user_ldap/js/ldapFilter.js b/apps/user_ldap/js/ldapFilter.js index 70f24f0d4a..d0fee6db7f 100644 --- a/apps/user_ldap/js/ldapFilter.js +++ b/apps/user_ldap/js/ldapFilter.js @@ -64,13 +64,16 @@ LdapFilter.prototype.determineMode = function() { LdapWizard.ajax(param, function(result) { property = 'ldap' + filter.target + 'FilterMode'; - filter.mode = result.changes[property]; + filter.mode = parseInt(result.changes[property]); if(filter.mode === LdapWizard.filterModeRaw && $('#raw'+filter.target+'FilterContainer').hasClass('invisible')) { LdapWizard['toggleRaw'+filter.target+'Filter'](); } else if(filter.mode === LdapWizard.filterModeAssisted && !$('#raw'+filter.target+'FilterContainer').hasClass('invisible')) { LdapWizard['toggleRaw'+filter.target+'Filter'](); + } else { + console.log('LDAP Wizard determineMode: returned mode was »' + + filter.mode + '« of type ' + typeof filter.mode); } filter.unlock(); },