aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGerrit Uitslag <klapinklapin@gmail.com>2016-05-09 20:49:33 +0200
committerGerrit Uitslag <klapinklapin@gmail.com>2016-05-09 20:49:33 +0200
commitc3f94a8ed6e38f1c7c324a502c8e2f64355e62cc (patch)
tree98ad563870ebcfb83347ff3da076461b96a3ac03
parentb4c97c1ba4d6ac8c1a656d35d3ae2a745b7a53b0 (diff)
downloaddokuwiki-c3f94a8ed6e38f1c7c324a502c8e2f64355e62cc.tar.gz
dokuwiki-c3f94a8ed6e38f1c7c324a502c8e2f64355e62cc.zip
add JSDocs
-rw-r--r--lib/scripts/edit.js25
1 files changed, 17 insertions, 8 deletions
diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js
index 9cc0fc476..50de5a9b7 100644
--- a/lib/scripts/edit.js
+++ b/lib/scripts/edit.js
@@ -7,9 +7,16 @@
/**
* Creates a toolbar button through the DOM
+ * Called for each entry of toolbar definition array (built by inc/toolbar.php and extended via js)
*
* Style the buttons through the toolbutton class
*
+ * @param {string} icon image filename, relative to folder lib/images/toolbar/
+ * @param {string} label title of button, show on mouseover
+ * @param {string} key hint in title of button for access key
+ * @param {string} id id of button, and '<id>_ico' of icon
+ * @param {string} classname for styling buttons
+ *
* @author Andreas Gohr <andi@splitbrain.org>
* @author Michal Rezler <m.rezler@centrum.cz>
*/
@@ -57,10 +64,10 @@ function createToolButton(icon,label,key,id,classname){
* class or the picker buttons with the pickerbutton class. Picker
* windows are appended to the body and created invisible.
*
- * @param string id the ID to assign to the picker
- * @param array props the properties for the picker
- * @param string edid the ID of the textarea
- * @rteurn DOMobject the created picker
+ * @param {string} id the ID to assign to the picker
+ * @param {Array} props the properties for the picker
+ * @param {string} edid the ID of the textarea
+ * @return DOMobject the created picker
* @author Andreas Gohr <andi@splitbrain.org>
*/
function createPicker(id,props,edid){
@@ -126,10 +133,10 @@ function pickerInsert(text,edid){
/**
* Add button action for signature button
*
- * @param DOMElement btn Button element to add the action to
- * @param array props Associative array of button properties
- * @param string edid ID of the editor textarea
- * @return boolean If button should be appended
+ * @param {jQuery} $btn Button element to add the action to
+ * @param {Array} props Associative array of button properties
+ * @param {string} edid ID of the editor textarea
+ * @return {string} picker id for aria-controls attribute
* @author Gabriel Birke <birke@d-scribe.de>
*/
function addBtnActionSignature($btn, props, edid) {
@@ -146,6 +153,8 @@ function addBtnActionSignature($btn, props, edid) {
/**
* Determine the current section level while editing
*
+ * @param {string} textboxId ID of the text field
+ *
* @author Andreas Gohr <gohr@cosmocode.de>
*/
function currentHeadlineLevel(textboxId){