target === 'Group') {
this.target = target;
}
-};
+}
LdapFilter.prototype.activate = function() {
if(this.activated) {
return false;
}
+ if(this.mode === LdapWizard.filterModeRaw) {
+ //Raw filter editing, i.e. user defined filter, don't compose
+ return;
+ }
+
if(this.target === 'User') {
action = 'getUserListFilter';
} else if(this.target === 'Login') {
action = 'getGroupFilter';
}
- if(!$('#raw'+this.target+'FilterContainer').hasClass('invisible')) {
- //Raw filter editing, i.e. user defined filter, don't compose
- return;
- }
-
var param = 'action='+action+
'&ldap_serverconfig_chooser='+
encodeURIComponent($('#ldap_serverconfig_chooser').val());
LdapWizard.ajax(param,
function(result) {
LdapWizard.applyChanges(result);
- if(filter.target === 'User') {
- LdapWizard.countUsers();
- } else if(filter.target === 'Group') {
- LdapWizard.countGroups();
+ console.log(filter.mode);
+ filter.updateCount();
+ if(filter.target === 'Group') {
LdapWizard.detectGroupMemberAssoc();
}
if(typeof callback !== 'undefined') {
initGroupFilter: function() {
LdapWizard.groupFilter.activate();
- LdapWizard.countGroups();
},
/** init login filter tab section **/
instantiateFilters: function() {
delete LdapWizard.userFilter;
LdapWizard.userFilter = new LdapFilter('User', function(mode) {
+ if(mode === LdapWizard.filterModeAssisted) {
+ LdapWizard.groupFilter.updateCount();
+ }
LdapWizard.userFilter.findFeatures();
});
$('#rawUserFilterContainer .ldapGetEntryCount').click(function(event) {
delete LdapWizard.groupFilter;
LdapWizard.groupFilter = new LdapFilter('Group', function(mode) {
+ if(mode === LdapWizard.filterModeAssisted) {
+ LdapWizard.groupFilter.updateCount();
+ }
LdapWizard.groupFilter.findFeatures();
});
$('#rawGroupFilterContainer .ldapGetEntryCount').click(function(event) {
if(LdapWizard.userFilterObjectClassesHasRun &&
LdapWizard.userFilterAvailableGroupsHasRun) {
LdapWizard.userFilter.compose(LdapWizard.detectEmailAttribute);
- LdapWizard.countUsers();
}
},
}
if(triggerObj.id == 'ldap_userlist_filter' && !LdapWizard.admin.isExperienced()) {
- LdapWizard.countUsers();
LdapWizard.detectEmailAttribute();
} else if(triggerObj.id == 'ldap_group_filter' && !LdapWizard.admin.isExperienced()) {
- LdapWizard.countGroups();
LdapWizard.detectGroupMemberAssoc();
}