OC.filePath('user_ldap','ajax','clearMappings.php'),
'ldap_clear_mapping='+encodeURIComponent(mappingSubject),
function(result) {
- if(result.status == 'success') {
+ if(result.status === 'success') {
OC.dialogs.info(
t('user_ldap', 'mappings cleared'),
t('user_ldap', 'Success')
OC.filePath('user_ldap','ajax','wizard.php'),
param,
function(result) {
- if(result.status == 'success') {
+ if(result.status === 'success') {
fnOnSuccess(result);
} else {
fnOnError(result);
},
applyChanges: function (result) {
- for (id in result.changes) {
+ for (var id in result.changes) {
LdapWizard.blacklistAdd(id);
if(id.indexOf('count') > 0) {
$('#'+id).text(result.changes[id]);
blacklistAdd: function(id) {
obj = $('#'+id);
- if(!(obj[0].hasOwnProperty('multiple') && obj[0]['multiple'] == true)) {
+ if(!(obj[0].hasOwnProperty('multiple') && obj[0]['multiple'] === true)) {
//no need to blacklist multiselect
LdapWizard.saveBlacklist[id] = true;
return true;
LdapWizard.ajax(param,
function(result) {
$('#ldap_loginfilter_attributes').find('option').remove();
- for (i in result.options['ldap_loginfilter_attributes']) {
+ for (var i in result.options['ldap_loginfilter_attributes']) {
//FIXME: move HTML into template
attr = result.options['ldap_loginfilter_attributes'][i];
$('#ldap_loginfilter_attributes').append(
LdapWizard.ajax(param,
function(result) {
$('#'+multisel).find('option').remove();
- for (i in result.options[multisel]) {
+ for (var i in result.options[multisel]) {
//FIXME: move HTML into template
objc = result.options[multisel][i];
$('#'+multisel).append("<option value='"+objc+"'>"+objc+"</option>");
function (result) {
LdapWizard.hideSpinner('#'+multisel);
$('#'+multisel).multiselect('disable');
- if(type == 'Users') {
+ if(type === 'Users') {
LdapWizard.userFilterAvailableGroupsHasRun = true;
LdapWizard.postInitUserFilter();
}
},
findObjectClasses: function(multisel, type) {
- if(type != 'User' && type != 'Group') {
+ if(type !== 'User' && type !== 'Group') {
return false;
}
param = 'action=determine'+encodeURIComponent(type)+'ObjectClasses'+
LdapWizard.ajax(param,
function(result) {
$('#'+multisel).find('option').remove();
- for (i in result.options[multisel]) {
+ for (var i in result.options[multisel]) {
//FIXME: move HTML into template
objc = result.options[multisel][i];
$('#'+multisel).append("<option value='"+objc+"'>"+objc+"</option>");
},
function (result) {
LdapWizard.hideSpinner('#'+multisel);
- if(type == 'User') {
+ if(type === 'User') {
LdapWizard.userFilterObjectClassesHasRun = true;
LdapWizard.postInitUserFilter();
}
processChanges: function(triggerObj) {
LdapWizard.hideInfoBox();
- if(triggerObj.id == 'ldap_host'
- || triggerObj.id == 'ldap_port'
- || triggerObj.id == 'ldap_dn'
- || triggerObj.id == 'ldap_agent_password') {
+ if(triggerObj.id === 'ldap_host'
+ || triggerObj.id === 'ldap_port'
+ || triggerObj.id === 'ldap_dn'
+ || triggerObj.id === 'ldap_agent_password') {
LdapWizard.checkPort();
if($('#ldap_port').val()) {
//if Port is already set, check BaseDN
}
}
- if(triggerObj.id == 'ldap_userlist_filter' && !LdapWizard.admin.isExperienced()) {
+ if(triggerObj.id === 'ldap_userlist_filter' && !LdapWizard.admin.isExperienced()) {
LdapWizard.detectEmailAttribute();
- } else if(triggerObj.id == 'ldap_group_filter' && !LdapWizard.admin.isExperienced()) {
+ } else if(triggerObj.id === 'ldap_group_filter' && !LdapWizard.admin.isExperienced()) {
LdapWizard.detectGroupMemberAssoc();
}
- if(triggerObj.id == 'ldap_loginfilter_username'
- || triggerObj.id == 'ldap_loginfilter_email') {
+ if(triggerObj.id === 'ldap_loginfilter_username'
+ || triggerObj.id === 'ldap_loginfilter_email') {
LdapWizard.loginFilter.compose();
}
LdapWizard.initLoginFilter();
}
LdapWizard.loginFilter.compose();
- } else if(originalObj == 'ldap_loginfilter_attributes') {
+ } else if(originalObj === 'ldap_loginfilter_attributes') {
LdapWizard.loginFilter.compose();
- } else if(originalObj == 'ldap_groupfilter_objectclass'
- || originalObj == 'ldap_groupfilter_groups') {
+ } else if(originalObj === 'ldap_groupfilter_objectclass'
+ || originalObj === 'ldap_groupfilter_groups') {
LdapWizard.groupFilter.compose();
}
},
OC.filePath('user_ldap','ajax','wizard.php'),
param,
function(result) {
- if(result.status == 'success') {
+ if(result.status === 'success') {
LdapWizard.processChanges(object);
} else {
// alert('Oooooooooooh :(');
filter.setMode(LdapWizard.filterModeRaw);
$(container).removeClass('invisible');
$(moc).multiselect('disable');
- if($(mg).multiselect().attr('disabled') == 'disabled') {
+ if($(mg).multiselect().attr('disabled') === 'disabled') {
LdapWizard[stateVar] = 'disable';
} else {
LdapWizard[stateVar] = 'enable';
$('#ldap_loginfilter_email').prop('disabled', property);
$('#ldap_loginfilter_username').prop('disabled', property);
LdapWizard._save({ id: 'ldapLoginFilterMode' }, mode);
- if(action == 'enable') {
+ if(action === 'enable') {
LdapWizard.loginFilter.compose();
}
}