Skip to content
Snippets Groups Projects
Commit c3f94a8e authored by Gerrit Uitslag's avatar Gerrit Uitslag
Browse files

add JSDocs

parent b4c97c1b
No related branches found
No related tags found
No related merge requests found
...@@ -7,9 +7,16 @@ ...@@ -7,9 +7,16 @@
/** /**
* Creates a toolbar button through the DOM * 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 * 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 Andreas Gohr <andi@splitbrain.org>
* @author Michal Rezler <m.rezler@centrum.cz> * @author Michal Rezler <m.rezler@centrum.cz>
*/ */
...@@ -57,10 +64,10 @@ function createToolButton(icon,label,key,id,classname){ ...@@ -57,10 +64,10 @@ function createToolButton(icon,label,key,id,classname){
* class or the picker buttons with the pickerbutton class. Picker * class or the picker buttons with the pickerbutton class. Picker
* windows are appended to the body and created invisible. * windows are appended to the body and created invisible.
* *
* @param string id the ID to assign to the picker * @param {string} id the ID to assign to the picker
* @param array props the properties for the picker * @param {Array} props the properties for the picker
* @param string edid the ID of the textarea * @param {string} edid the ID of the textarea
* @rteurn DOMobject the created picker * @return DOMobject the created picker
* @author Andreas Gohr <andi@splitbrain.org> * @author Andreas Gohr <andi@splitbrain.org>
*/ */
function createPicker(id,props,edid){ function createPicker(id,props,edid){
...@@ -126,10 +133,10 @@ function pickerInsert(text,edid){ ...@@ -126,10 +133,10 @@ function pickerInsert(text,edid){
/** /**
* Add button action for signature button * Add button action for signature button
* *
* @param DOMElement btn Button element to add the action to * @param {jQuery} $btn Button element to add the action to
* @param array props Associative array of button properties * @param {Array} props Associative array of button properties
* @param string edid ID of the editor textarea * @param {string} edid ID of the editor textarea
* @return boolean If button should be appended * @return {string} picker id for aria-controls attribute
* @author Gabriel Birke <birke@d-scribe.de> * @author Gabriel Birke <birke@d-scribe.de>
*/ */
function addBtnActionSignature($btn, props, edid) { function addBtnActionSignature($btn, props, edid) {
...@@ -146,6 +153,8 @@ function addBtnActionSignature($btn, props, edid) { ...@@ -146,6 +153,8 @@ function addBtnActionSignature($btn, props, edid) {
/** /**
* Determine the current section level while editing * Determine the current section level while editing
* *
* @param {string} textboxId ID of the text field
*
* @author Andreas Gohr <gohr@cosmocode.de> * @author Andreas Gohr <gohr@cosmocode.de>
*/ */
function currentHeadlineLevel(textboxId){ function currentHeadlineLevel(textboxId){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment