Categories

.uiDialog()

Categories: UI

.uiDialog( [ options ] )

Subclass: ep

Inherit: (Subclass: ep) .dialog()

Plugin: ep.ui.dialog

Description: Create a dialog.

  • .uiDialog( [ options ] )

    version added: 6.11.0

    options   A map of additional options pass to the method.

The .uiDialog() method creates a dialog for each element in the set of matched elements.

  • Apply .uiDialog() with an Ok and Cancel Button to all divs with class dialog.

    Code:
    ep('div.dialog')
        .uiDialog({
            buttons: [
            	{text: 'Ok', click: function(){ alert('OK'); }},
            	{text: 'Cancel', click: function(){ alert('Cancel'); }}
            ]
        });
    
    // use identifier as button text
    
    ep('div.dialog')
        .uiDialog({
            buttons: {
            	Ok:     {click: function(){ alert('OK'); }},
            	Cancel: {click: function(){ alert('Cancel'); }}
            }
        });
    
    
  • Apply .uiDialog() with an Ok and Cancel Button including a form handling.

    Code:
    ep('div.dialog')
        .uiDialog({
            form: {
                action: '?ViewAction=MyExample',
                method: 'post'
            },
            buttons:{
            	Ok:     {type: 'submit'},
            	Cancel: {click: function(){ ep(this).uiDialog('close'); }}
            }
        });
    
    
  • form

    version added: 6.11.0

    A map of attributes passed to a form around the dialog.

  • closeText

    version added: 6.14.1

    A boolean indication whether to display the close button, with the default close text.