]> source.dussan.org Git - nextcloud-server.git/commitdiff
smaller corrections to make scruitinizer happier, no effective changes
authorArthur Schiwon <blizzz@owncloud.com>
Wed, 8 Oct 2014 14:20:52 +0000 (16:20 +0200)
committerArthur Schiwon <blizzz@owncloud.com>
Wed, 8 Oct 2014 14:20:52 +0000 (16:20 +0200)
apps/user_ldap/js/experiencedAdmin.js
apps/user_ldap/js/ldapFilter.js
apps/user_ldap/js/settings.js

index bd674a37d6ca124910dfb0bcba63cf528fbe6913..fac8dd6470f712ab9c70e493d034d982fdcddf3e 100644 (file)
@@ -4,6 +4,8 @@
  * See the COPYING-README file.
  */
 
+/* global LdapWizard */
+
 /**
  * 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.
  */
 ExperiencedAdmin.prototype.enableRawMode = function() {
-       containers = {
+       var containers = {
                'toggleRawGroupFilter': '#rawGroupFilterContainer',
                'toggleRawLoginFilter': '#rawLoginFilterContainer',
                'toggleRawUserFilter' : '#rawUserFilterContainer'
        };
 
-       for(method in containers) {
+       for(var method in containers) {
                if($(containers[method]).hasClass('invisible')) {
                        this.wizard[method]();
                }
-       };
+       }
 };
 
 ExperiencedAdmin.prototype.updateUserTab = function(mode) {
        this._updateTab(mode, $('#ldap_user_count'));
-}
+};
 
 ExperiencedAdmin.prototype.updateGroupTab = function(mode) {
        this._updateTab(mode, $('#ldap_group_count'));
-}
+};
 
 ExperiencedAdmin.prototype._updateTab = function(mode, $countEl) {
        if(mode === LdapWizard.filterModeAssisted) {
@@ -77,7 +79,7 @@ ExperiencedAdmin.prototype._updateTab = function(mode, $countEl) {
        } else {
                $countEl.addClass('hidden');
        }
-}
+};
 
 /**
  * hide user and group counters, they will be displayed on demand only
index 2d3ca8b3691720e6087a6e4b995752a4c06356a1..5b93d81f371cb461ebd81ccfdece1b84e541a020 100644 (file)
@@ -1,6 +1,6 @@
 /* global LdapWizard */
 
-function LdapFilter(target, determineModeCallback)  {
+function LdapFilter(target, determineModeCallback) {
        this.locked = true;
        this.target = false;
        this.mode = LdapWizard.filterModeAssisted;
@@ -14,7 +14,7 @@ function LdapFilter(target, determineModeCallback)  {
                target === 'Group') {
                this.target = target;
        }
-}
+};
 
 LdapFilter.prototype.activate = function() {
        if(this.activated) {
@@ -23,7 +23,7 @@ LdapFilter.prototype.activate = function() {
        this.activated = true;
 
        this.determineMode();
-}
+};
 
 LdapFilter.prototype.compose = function(callback) {
        var action;
@@ -111,11 +111,11 @@ LdapFilter.prototype.setMode = function(mode) {
        if(mode === LdapWizard.filterModeAssisted || mode === LdapWizard.filterModeRaw) {
                this.mode = mode;
        }
-}
+};
 
 LdapFilter.prototype.getMode = function() {
        return this.mode;
-}
+};
 
 LdapFilter.prototype.unlock = function() {
        this.locked = false;
@@ -129,6 +129,7 @@ LdapFilter.prototype.findFeatures = function() {
        //TODO: reset this.foundFeatures when any base DN changes
        if(!this.foundFeatures && !this.locked && this.mode === LdapWizard.filterModeAssisted) {
                this.foundFeatures = true;
+               var objcEl, avgrEl;
                if(this.target === 'User') {
                        objcEl = 'ldap_userfilter_objectclass';
                        avgrEl = 'ldap_userfilter_groups';
index 04b4b91d1f169124f4c2646adba8d2f994aeac21..f5b8081497f51dfa7f890b0fe700467e6d307895 100644 (file)
@@ -694,8 +694,8 @@ var LdapWizard = {
                        values = values + "\n" + resultObj[i].value;
                }
                LdapWizard._save($('#'+originalObj)[0], $.trim(values));
-               if(originalObj == 'ldap_userfilter_objectclass'
-                  || originalObj == 'ldap_userfilter_groups') {
+               if(originalObj === 'ldap_userfilter_objectclass'
+                  || originalObj === 'ldap_userfilter_groups') {
                        LdapWizard.userFilter.compose(LdapWizard.detectEmailAttribute);
                        //when user filter is changed afterwards, login filter needs to
                        //be adjusted, too