]> source.dussan.org Git - nextcloud-server.git/commitdiff
JS doc
authorArthur Schiwon <blizzz@owncloud.com>
Wed, 29 Oct 2014 10:05:02 +0000 (11:05 +0100)
committerArthur Schiwon <blizzz@owncloud.com>
Thu, 20 Nov 2014 17:31:40 +0000 (18:31 +0100)
apps/user_ldap/js/ldapFilter.js
apps/user_ldap/js/settings.js

index 2bb62ad1a9ae526d8ecb009bafe9482425c0dcef..780aa10fe3f05c9461346e2f46e90f4e266dc04f 100644 (file)
@@ -63,12 +63,21 @@ LdapFilter.prototype.compose = function() {
        );
 };
 
+/**
+ * this function is triggered after attribute detectors have completed in
+ * LdapWizard
+ */
 LdapFilter.prototype.afterDetectorsRan = function() {
        this.updateCount();
 };
 
+/**
+ * this function is triggered after LDAP filters have been composed successfully
+ * @param {object} result returned by the ajax call
+ */
 LdapFilter.prototype.afterComposeSuccess = function(result) {
        LdapWizard.applyChanges(result);
+       //best time to run attribute detectors
        LdapWizard.runDetectors(this.target, this.afterDetectorsRan);
 };
 
@@ -147,6 +156,11 @@ LdapFilter.prototype.findFeatures = function() {
        }
 };
 
+/**
+ * this function is triggered before user and group counts are executed
+ * resolving the passed status variable will fire up counting
+ * @param {object} status an instance of $.Deferred
+ */
 LdapFilter.prototype.beforeUpdateCount = function(status) {
        return LdapWizard.runDetectors(this.target, function() {
                status.resolve();
index f8cb3d84cea6bb2863b74319a897c1f12748a570..be1db28648fb326338d10cd00e9b1b7a79e2b51b 100644 (file)
@@ -377,6 +377,16 @@ var LdapWizard = {
                LdapWizard._countThings('countUsers', '#ldap_user_count', doneCallback);
        },
 
+       /**
+        * called after detectors have run
+        * @callback runDetectorsCallback
+        */
+
+       /**
+        * runs detectors to determine appropriate attributes, e.g. displayName
+        * @param {string} type either "User" or "Group"
+        * @param {runDetectorsCallback} triggered after all detectors have completed
+        */
        runDetectors: function(type, callback) {
                if(type === 'Group') {
                        $.when(LdapWizard.detectGroupMemberAssoc())
@@ -397,6 +407,9 @@ var LdapWizard = {
                }
        },
 
+       /**
+        * runs detector to find out a fitting user display name attribute
+        */
        detectUserDisplayNameAttribute: function() {
                var param = 'action=detectUserDisplayNameAttribute' +
                        '&ldap_serverconfig_chooser='+