diff --git a/includes/ajax.inc b/includes/ajax.inc index 6bc383677549158d764c2cd7c36dd0301da8ebed..c1d4c18157ad6b2c08901f1e56ebc734194c8f22 100644 --- a/includes/ajax.inc +++ b/includes/ajax.inc @@ -18,7 +18,7 @@ * a function in the Drupal.CTools.AJAX.Command space). The object can * contain any other data that the command needs to process. * - * Built in commands: + * Built in commands include: * - replace * - selector: The CSS selector. This can be any selector jquery uses in $(). * - data: The data to use with the jquery replace() function. @@ -27,13 +27,23 @@ * - selector: The CSS selector. This can be any selector jquery uses in $(). * - data: The data to use with the jquery append() function. * - * - addClass - * - selector: The CSS selector. This can be any selector jquery uses in $(). - * - data: The class to add. + * - changed + * - selector: The CSS selector. This selector will have 'changed' added as a clas. + * - star: If set, will add a star to this selector. It must be within the 'selector' above. * * - alert * - title: The title of the alert. * - data: The data in the alert. + * + * Commands are usually created with a couple of helper functions, so they + * look like this: + * + * @code{ + * $commands = array(); + * $commands[] = ctools_ajax_command_replace('#ctools-object-1', 'some html here'); + * $commands[] = ctools_ajax_command_add + * ctools_ajax_render($commands); // this function exits. + * } */ /** diff --git a/js/ajax-responder.js b/js/ajax-responder.js index 6633c4f88912c135c3942ec21eb9356885c49b5d..8f70c49f178a64033f9d0ffc3cabc496f04656df 100644 --- a/js/ajax-responder.js +++ b/js/ajax-responder.js @@ -1,5 +1,4 @@ -// $Id $ - +// $Id$ /** * @file *