aboutsummaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2014-05-13 16:43:14 +0200
committerArthur Schiwon <blizzz@owncloud.com>2014-06-02 12:53:59 +0200
commit28a012410aa632038769124df658cd9e7bcd9348 (patch)
treee9e6a697eca3c62a27bc62773c854b7c767fb3de /settings
parent92b8344489e99899c105bd37b3e0bab9cf44176f (diff)
downloadnextcloud-server-28a012410aa632038769124df658cd9e7bcd9348.tar.gz
nextcloud-server-28a012410aa632038769124df658cd9e7bcd9348.zip
polish JSDoc
Diffstat (limited to 'settings')
-rw-r--r--settings/js/users/deleteHandler.js62
1 files changed, 42 insertions, 20 deletions
diff --git a/settings/js/users/deleteHandler.js b/settings/js/users/deleteHandler.js
index 48c7f149928..894744ba3e9 100644
--- a/settings/js/users/deleteHandler.js
+++ b/settings/js/users/deleteHandler.js
@@ -4,18 +4,18 @@
* See the COPYING-README file.
*/
-
/**
- * @brief takes care of deleting things represented by an ID
- * @param String endpoint: the corresponding ajax PHP script. Currently limited
+ * takes care of deleting things represented by an ID
+ *
+ * @class
+ * @param {string} endpoint the corresponding ajax PHP script. Currently limited
* to settings - ajax path.
- * @param String paramID: the by the script expected parameter name holding the
+ * @param {string} paramID the by the script expected parameter name holding the
* ID of the object to delete
- * @param Function markCallback: the function to be called after successfully
+ * @param {markCallback} markCallback function to be called after successfully
* marking the object for deletion.
- * @param Function removeCallback: the function to be called after successful
- * delete. The id of the object will be passed as argument. Unsuccessful
- * operations will display an error using OC.dialogs, no callback is fired.
+ * @param {removeCallback} removeCallback the function to be called after
+ * successful delete.
*/
function DeleteHandler(endpoint, paramID, markCallback, removeCallback) {
this.oidToDelete = false;
@@ -35,13 +35,34 @@ function DeleteHandler(endpoint, paramID, markCallback, removeCallback) {
}
/**
- * @brief enabled the notification system. Required for undo UI.
- * @param Object notifier: Usually OC.Notification
- * @param String dataID: an identifier for the notifier, e.g. 'deleteuser'
- * @param String message: the message that should be shown upon delete. %oid
+ * The function to be called after successfully marking the object for deletion
+ * @callback markCallback
+ * @param {string} oid the ID of the specific user or group
+ */
+
+/**
+ * The function to be called after successful delete. The id of the object will
+ * be passed as argument. Unsuccessful operations will display an error using
+ * OC.dialogs, no callback is fired.
+ * @callback removeCallback
+ * @param {string} oid the ID of the specific user or group
+ */
+
+/**
+ * This callback is fired after "undo" was clicked so the consumer can update
+ * the web interface
+ * @callback undoCallback
+ * @param {string} oid the ID of the specific user or group
+ */
+
+/**
+ * enabled the notification system. Required for undo UI.
+ *
+ * @param {object} notifier Usually OC.Notification
+ * @param {string} dataID an identifier for the notifier, e.g. 'deleteuser'
+ * @param {string} message the message that should be shown upon delete. %oid
* will be replaced with the affected id of the item to be deleted
- * @param Function undoCb: called after "undo" was clicked so the consumer can
- * update the web interface
+ * @param {undoCallback} undoCallback called after "undo" was clicked
*/
DeleteHandler.prototype.setNotification = function(notifier, dataID, message, undoCallback) {
this.notifier = notifier;
@@ -64,7 +85,7 @@ DeleteHandler.prototype.setNotification = function(notifier, dataID, message, un
};
/**
- * @brief shows the Undo Notification (if configured)
+ * shows the Undo Notification (if configured)
*/
DeleteHandler.prototype.showNotification = function() {
if(this.notifier !== false) {
@@ -79,7 +100,7 @@ DeleteHandler.prototype.showNotification = function() {
};
/**
- * @brief hides the Undo Notification
+ * hides the Undo Notification
*/
DeleteHandler.prototype.hideNotification = function() {
if(this.notifier !== false) {
@@ -89,8 +110,9 @@ DeleteHandler.prototype.hideNotification = function() {
};
/**
- * @brief initializes the delete operation for a given object id
- * @param String oid: the object id
+ * initializes the delete operation for a given object id
+ *
+ * @param {string} oid the object id
*/
DeleteHandler.prototype.mark = function(oid) {
if(this.oidToDelete !== false) {
@@ -103,7 +125,7 @@ DeleteHandler.prototype.mark = function(oid) {
};
/**
- * @brief cancels a delete operation
+ * cancels a delete operation
*/
DeleteHandler.prototype.cancel = function() {
this.canceled = true;
@@ -111,7 +133,7 @@ DeleteHandler.prototype.cancel = function() {
};
/**
- * @brief executes a delete operation. Requires that the operation has been
+ * executes a delete operation. Requires that the operation has been
* initialized by mark(). On error, it will show a message via
* OC.dialogs.alert. On success, a callback is fired so that the client can
* update the web interface accordingly.