summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/js
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-04-23 10:08:14 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-04-23 10:08:14 +0200
commite0cac32442af1986d2a202ec708fce8d537bb12c (patch)
tree86a07e549658fde192b21d422b7a153dbff29aa2 /apps/user_ldap/js
parent1c57ffa16fab8cfb132978865d819e98cb143a24 (diff)
downloadnextcloud-server-e0cac32442af1986d2a202ec708fce8d537bb12c.tar.gz
nextcloud-server-e0cac32442af1986d2a202ec708fce8d537bb12c.zip
fixing some JSHint warnings
Diffstat (limited to 'apps/user_ldap/js')
-rw-r--r--apps/user_ldap/js/ldapFilter.js25
-rw-r--r--apps/user_ldap/js/settings.js10
2 files changed, 18 insertions, 17 deletions
diff --git a/apps/user_ldap/js/ldapFilter.js b/apps/user_ldap/js/ldapFilter.js
index 0d691647944..df3bd67aec2 100644
--- a/apps/user_ldap/js/ldapFilter.js
+++ b/apps/user_ldap/js/ldapFilter.js
@@ -1,3 +1,5 @@
+/* global LdapWizard */
+
function LdapFilter(target) {
this.locked = true;
this.target = false;
@@ -49,12 +51,12 @@ LdapFilter.prototype.compose = function() {
LdapWizard.detectGroupMemberAssoc();
}
},
- function (result) {
+ function () {
console.log('LDAP Wizard: could not compose filter. '+
'Please check owncloud.log');
}
);
-}
+};
LdapFilter.prototype.determineMode = function() {
var param = 'action=get'+encodeURIComponent(this.target)+'FilterMode'+
@@ -64,13 +66,13 @@ LdapFilter.prototype.determineMode = function() {
var filter = this;
LdapWizard.ajax(param,
function(result) {
- property = 'ldap' + filter.target + 'FilterMode';
- filter.mode = parseInt(result.changes[property]);
- if(filter.mode === LdapWizard.filterModeRaw
- && $('#raw'+filter.target+'FilterContainer').hasClass('invisible')) {
+ var property = 'ldap' + filter.target + 'FilterMode';
+ filter.mode = parseInt(result.changes[property], 10);
+ 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')) {
+ } 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 »' +
@@ -78,7 +80,7 @@ LdapFilter.prototype.determineMode = function() {
}
filter.unlock();
},
- function (result) {
+ function () {
//on error case get back to default i.e. Assisted
if(!$('#raw'+filter.target+'FilterContainer').hasClass('invisible')) {
LdapWizard['toggleRaw'+filter.target+'Filter']();
@@ -87,8 +89,7 @@ LdapFilter.prototype.determineMode = function() {
filter.unlock();
}
);
-
-}
+};
LdapFilter.prototype.unlock = function() {
this.locked = false;
@@ -96,4 +97,4 @@ LdapFilter.prototype.unlock = function() {
this.lazyRunCompose = false;
this.compose();
}
-}
+};
diff --git a/apps/user_ldap/js/settings.js b/apps/user_ldap/js/settings.js
index 80e08572397..fca2dc13d15 100644
--- a/apps/user_ldap/js/settings.js
+++ b/apps/user_ldap/js/settings.js
@@ -14,7 +14,7 @@ var LdapConfiguration = {
//deal with Checkboxes
if($(elementID).is('input[type=checkbox]')) {
- if(parseInt(configvalue) === 1) {
+ if(parseInt(configvalue, 10) === 1) {
$(elementID).attr('checked', 'checked');
} else {
$(elementID).removeAttr('checked');
@@ -478,7 +478,7 @@ var LdapWizard = {
},
functionalityCheck: function() {
- //criterias to enable the connection:
+ //criteria to enable the connection:
// - host, port, basedn, user filter, login filter
host = $('#ldap_host').val();
port = $('#ldap_port').val();
@@ -556,7 +556,7 @@ var LdapWizard = {
noneSelectedText: caption,
click: function(event, ui) {
LdapWizard.saveMultiSelect(id,
- $('#'+id).multiselect("getChecked"));
+ $('#'+id).multiselect("getChecked"));
}
});
},
@@ -575,8 +575,8 @@ var LdapWizard = {
},
postInitUserFilter: function() {
- if(LdapWizard.userFilterObjectClassesHasRun
- && LdapWizard.userFilterAvailableGroupsHasRun) {
+ if(LdapWizard.userFilterObjectClassesHasRun &&
+ LdapWizard.userFilterAvailableGroupsHasRun) {
LdapWizard.userFilter.compose();
LdapWizard.countUsers();
}