summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2014-10-29 11:05:02 +0100
committerArthur Schiwon <blizzz@owncloud.com>2014-11-20 18:31:40 +0100
commitc9e865629ebb1e83626ff049244318b8769b4502 (patch)
tree3deb5253abb4d09ba37c26c13d41b924be3d5360 /apps
parent4a3fe42b1672f5110076c75582edb5a43b7ea577 (diff)
downloadnextcloud-server-c9e865629ebb1e83626ff049244318b8769b4502.tar.gz
nextcloud-server-c9e865629ebb1e83626ff049244318b8769b4502.zip
JS doc
Diffstat (limited to 'apps')
-rw-r--r--apps/user_ldap/js/ldapFilter.js14
-rw-r--r--apps/user_ldap/js/settings.js13
2 files changed, 27 insertions, 0 deletions
diff --git a/apps/user_ldap/js/ldapFilter.js b/apps/user_ldap/js/ldapFilter.js
index 2bb62ad1a9a..780aa10fe3f 100644
--- a/apps/user_ldap/js/ldapFilter.js
+++ b/apps/user_ldap/js/ldapFilter.js
@@ -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();
diff --git a/apps/user_ldap/js/settings.js b/apps/user_ldap/js/settings.js
index f8cb3d84cea..be1db28648f 100644
--- a/apps/user_ldap/js/settings.js
+++ b/apps/user_ldap/js/settings.js
@@ -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='+