[development] What about the Drupal API ?? (Re: Javascript API introduction

Augustin (Beginner) drupal.beginner at wechange.org
Wed May 23 04:47:18 UTC 2007


Hello,

Thanks to those who replied and helped me. 

I found out that javascript-related pages were spread over many sections of 
the handbook. I have reorganized everything, so that everything can be found 
under one section: http://drupal.org/node/121997
I have added pointers in some places, so that people can find it more easily.

I have added all the information you gave me, too.




I still have one lingering question, though:
What about Drupal's own javascript API??

This page is the only documentation of Drupal's  API:
http://drupal.org/node/83181

None of Drupal's own  misc/*.js files are documented on a.d.o 
(e.g. :http://api.drupal.org/apis/HEAD/drupal.js )

and the code source itself is not very helpful.
Unlike for all the php functions, the js functions are not documented at all 
at the source, nor at api.drupal.org.

I would have expected the function's headers to document how to make use of 
the function by applying the proper html markup.

E.g., instead of having:

/**
 * Toggle the visibility of a fieldset using smooth animations
 */
Drupal.toggleFieldset = function(fieldset) {


We would have something like:

/**
 * Toggle the visibility of a fieldset using smooth animations
 *
 * Applicable to all <fieldset> elements.
 * The class "collapsed" indicates the state of the fieldset where everything 
in the fieldset but the <legend> element is hidden.
 * e.g.: 
 * <fieldset class=" collapsible collapsed"><legend>Input 
format</legend></fieldset>
 */
Drupal.toggleFieldset = function(fieldset) {



Unfortunately, I am not competent to document this (that's why I asked for 
your help in the first place. I have already documented what I could, 
though).

If someone knows how to document this, would the core committers (Gerhard, 
Neil, Gabor, Steve and Dries) actually commit relevant patches?




Thanks,

Augustin.




-- 
http://www.wechange.org/
Because we and the world need to change.
 
http://www.reuniting.info/
Intimate Relationships, peace and harmony in the couple.


More information about the development mailing list