/[drupal]/contributions/modules/popups/API.txt
ViewVC logotype

Diff of /contributions/modules/popups/API.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.4.2, Thu Nov 20 22:19:18 2008 UTC revision 1.1.4.3, Sat Mar 21 00:57:16 2009 UTC
# Line 1  Line 1 
1  As well as attaching popup behavior to links,  As well as attaching popup behavior to links,
2  Popups API provides javascript function for creating in-window popup messages.  Popups API provides javascript function for creating in-window popup messages.
3    
4  TODO: Add more togglable options like non-modal & auto-close.  Popups.message(title, message)
   
   
 Drupal.popups.message(title, message)  
5    Produces a simple modal box with the title, message and "OK", "Cancel" buttons.    Produces a simple modal box with the title, message and "OK", "Cancel" buttons.
6    
7  Drupal.popups.open(title, body, buttons, width)  Popups.open(title, body, buttons, width)
8    More powerful, allows you to specify what the buttons are and what they do.    More powerful, allows you to specify what the buttons are and what they do.
9    buttons is a hash of hash, with button title and function.    buttons is a hash of hash, with button title and function.
10    * Example:    * Example:
# Line 28  Drupal.popups.open(title, body, buttons, Line 25  Drupal.popups.open(title, body, buttons,
25        }        }
26      }      }
27    );    );
28    
29    // TODO - make a more useful api function for opening a path.
30    Popups.openPath = function(element, options, parent)
31     * @param element
32     *   Element that was clicked to open the popups.
33     * @param options
34     *   Hash of options controlling how the popups interacts with the underlying page.
35     * @param parent
36     *   If path is being opened from inside another popup, that popup is the parent.
37    

Legend:
Removed from v.1.1.4.2  
changed lines
  Added in v.1.1.4.3

  ViewVC Help
Powered by ViewVC 1.1.2