fix comparison in determineMode, fixes problems with restoring the filter mode (assisted or manually) on page refresh
This commit is contained in:
parent
6f1e9f8920
commit
e28227ecdc
|
@ -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();
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue