Class Index | File Index

Classes


Class ProtoPopup.Alert


Extends ProtoPopup.
Creates a ProtoPopup.Alert object
Defined in: proto_popup_alert.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
ProtoPopup.Alert(id, config)
ProtoPopup.Alert is based on ProtoPopup and ads a 'Close' button to its base object.
Field Summary
Field Attributes Field Name and Description
<static>  
ProtoPopup.Alert.config
The default configuration inherited from ProtoPopup#config augmented with:
closeBtnLabel: The label of the "Close" button inserted in the popup's footer section.
Fields borrowed from class ProtoPopup:
body, footer, header, id, onShow, popup, sections
Method Summary
Method Attributes Method Name and Description
<static>  
ProtoPopup.Alert.get(id, config)
Class method returning (maybe first create) a draggable popup DIV for alert dialogs.
<static>  
ProtoPopup.Alert.makeFunction(id, config)
Class method making custom functions accepting one argument that will be inserted in the body section of the underlying ProtoPopup.Alert object created behind the scenes.
Methods borrowed from class ProtoPopup:
centerIt, hide, makeButton, setHtml, show
Events borrowed from class ProtoPopup:
hideOnEscape
Class Detail
ProtoPopup.Alert(id, config)
ProtoPopup.Alert is based on ProtoPopup and ads a 'Close' button to its base object.
Parameters:
{STRING} id
A unique string identifying a popup
{OBJECT} config
The configuration object #.config
Returns:
ProtoPopup.Alert object
Field Detail
<static> {object} ProtoPopup.Alert.config
The default configuration inherited from ProtoPopup#config augmented with:
closeBtnLabel: The label of the "Close" button inserted in the popup's footer section. Defaults to 'Close'.
closeBtnBackgroundImage {STRING} - CSS property 'background-image' for the close button. Defaults to undefined.
Method Detail
<static> ProtoPopup.Alert.get(id, config)
Class method returning (maybe first create) a draggable popup DIV for alert dialogs. Given the same id argument returns the same popup object, following the singleton pattern. See the example of the base class' ProtoPopup.get
Parameters:
{STRING} id
The name of the popup used to build its ID.
{OBJECT} config
The config object, see #.config.
Returns:
The initialized and draggable popup.

<static> ProtoPopup.Alert.makeFunction(id, config)
Class method making custom functions accepting one argument that will be inserted in the body section of the underlying ProtoPopup.Alert object created behind the scenes.
Make a custom info() method

      // make the method
      var info = ProtoPopup.Alert.makeFunction('info', {
          header : 'Critical Warning'
      });

      // first use
      info('Something's wrong!');

      // second use (using the same popup, showing the same header
      info('Something's really wrong!');
Parameters:
{STRING} id
The ID of the popup.
{OBJECT} config
The #config object.
Returns:
A function accepting one argument to be inserted into the popup's body section.

Documentation generated by JsDoc Toolkit 2.1.0 on Wed Jul 13 2011 15:36:44 GMT+0200 (CEST)