smaller corrections to make scruitinizer happier, no effective changes
This commit is contained in:
parent
ab3535855f
commit
02985c9ec5
|
@ -4,6 +4,8 @@
|
||||||
* See the COPYING-README file.
|
* See the COPYING-README file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* global LdapWizard */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* controls behaviour depend on whether the admin is experienced in LDAP or not.
|
* controls behaviour depend on whether the admin is experienced in LDAP or not.
|
||||||
*
|
*
|
||||||
|
@ -48,26 +50,26 @@ ExperiencedAdmin.prototype.isExperienced = function() {
|
||||||
* switches all LDAP filters from Assisted to Raw mode.
|
* switches all LDAP filters from Assisted to Raw mode.
|
||||||
*/
|
*/
|
||||||
ExperiencedAdmin.prototype.enableRawMode = function() {
|
ExperiencedAdmin.prototype.enableRawMode = function() {
|
||||||
containers = {
|
var containers = {
|
||||||
'toggleRawGroupFilter': '#rawGroupFilterContainer',
|
'toggleRawGroupFilter': '#rawGroupFilterContainer',
|
||||||
'toggleRawLoginFilter': '#rawLoginFilterContainer',
|
'toggleRawLoginFilter': '#rawLoginFilterContainer',
|
||||||
'toggleRawUserFilter' : '#rawUserFilterContainer'
|
'toggleRawUserFilter' : '#rawUserFilterContainer'
|
||||||
};
|
};
|
||||||
|
|
||||||
for(method in containers) {
|
for(var method in containers) {
|
||||||
if($(containers[method]).hasClass('invisible')) {
|
if($(containers[method]).hasClass('invisible')) {
|
||||||
this.wizard[method]();
|
this.wizard[method]();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ExperiencedAdmin.prototype.updateUserTab = function(mode) {
|
ExperiencedAdmin.prototype.updateUserTab = function(mode) {
|
||||||
this._updateTab(mode, $('#ldap_user_count'));
|
this._updateTab(mode, $('#ldap_user_count'));
|
||||||
}
|
};
|
||||||
|
|
||||||
ExperiencedAdmin.prototype.updateGroupTab = function(mode) {
|
ExperiencedAdmin.prototype.updateGroupTab = function(mode) {
|
||||||
this._updateTab(mode, $('#ldap_group_count'));
|
this._updateTab(mode, $('#ldap_group_count'));
|
||||||
}
|
};
|
||||||
|
|
||||||
ExperiencedAdmin.prototype._updateTab = function(mode, $countEl) {
|
ExperiencedAdmin.prototype._updateTab = function(mode, $countEl) {
|
||||||
if(mode === LdapWizard.filterModeAssisted) {
|
if(mode === LdapWizard.filterModeAssisted) {
|
||||||
|
@ -77,7 +79,7 @@ ExperiencedAdmin.prototype._updateTab = function(mode, $countEl) {
|
||||||
} else {
|
} else {
|
||||||
$countEl.addClass('hidden');
|
$countEl.addClass('hidden');
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hide user and group counters, they will be displayed on demand only
|
* hide user and group counters, they will be displayed on demand only
|
||||||
|
|
|
@ -14,7 +14,7 @@ function LdapFilter(target, determineModeCallback) {
|
||||||
target === 'Group') {
|
target === 'Group') {
|
||||||
this.target = target;
|
this.target = target;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
LdapFilter.prototype.activate = function() {
|
LdapFilter.prototype.activate = function() {
|
||||||
if(this.activated) {
|
if(this.activated) {
|
||||||
|
@ -23,7 +23,7 @@ LdapFilter.prototype.activate = function() {
|
||||||
this.activated = true;
|
this.activated = true;
|
||||||
|
|
||||||
this.determineMode();
|
this.determineMode();
|
||||||
}
|
};
|
||||||
|
|
||||||
LdapFilter.prototype.compose = function(callback) {
|
LdapFilter.prototype.compose = function(callback) {
|
||||||
var action;
|
var action;
|
||||||
|
@ -111,11 +111,11 @@ LdapFilter.prototype.setMode = function(mode) {
|
||||||
if(mode === LdapWizard.filterModeAssisted || mode === LdapWizard.filterModeRaw) {
|
if(mode === LdapWizard.filterModeAssisted || mode === LdapWizard.filterModeRaw) {
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
LdapFilter.prototype.getMode = function() {
|
LdapFilter.prototype.getMode = function() {
|
||||||
return this.mode;
|
return this.mode;
|
||||||
}
|
};
|
||||||
|
|
||||||
LdapFilter.prototype.unlock = function() {
|
LdapFilter.prototype.unlock = function() {
|
||||||
this.locked = false;
|
this.locked = false;
|
||||||
|
@ -129,6 +129,7 @@ LdapFilter.prototype.findFeatures = function() {
|
||||||
//TODO: reset this.foundFeatures when any base DN changes
|
//TODO: reset this.foundFeatures when any base DN changes
|
||||||
if(!this.foundFeatures && !this.locked && this.mode === LdapWizard.filterModeAssisted) {
|
if(!this.foundFeatures && !this.locked && this.mode === LdapWizard.filterModeAssisted) {
|
||||||
this.foundFeatures = true;
|
this.foundFeatures = true;
|
||||||
|
var objcEl, avgrEl;
|
||||||
if(this.target === 'User') {
|
if(this.target === 'User') {
|
||||||
objcEl = 'ldap_userfilter_objectclass';
|
objcEl = 'ldap_userfilter_objectclass';
|
||||||
avgrEl = 'ldap_userfilter_groups';
|
avgrEl = 'ldap_userfilter_groups';
|
||||||
|
|
|
@ -694,8 +694,8 @@ var LdapWizard = {
|
||||||
values = values + "\n" + resultObj[i].value;
|
values = values + "\n" + resultObj[i].value;
|
||||||
}
|
}
|
||||||
LdapWizard._save($('#'+originalObj)[0], $.trim(values));
|
LdapWizard._save($('#'+originalObj)[0], $.trim(values));
|
||||||
if(originalObj == 'ldap_userfilter_objectclass'
|
if(originalObj === 'ldap_userfilter_objectclass'
|
||||||
|| originalObj == 'ldap_userfilter_groups') {
|
|| originalObj === 'ldap_userfilter_groups') {
|
||||||
LdapWizard.userFilter.compose(LdapWizard.detectEmailAttribute);
|
LdapWizard.userFilter.compose(LdapWizard.detectEmailAttribute);
|
||||||
//when user filter is changed afterwards, login filter needs to
|
//when user filter is changed afterwards, login filter needs to
|
||||||
//be adjusted, too
|
//be adjusted, too
|
||||||
|
|
Loading…
Reference in New Issue