Categories

.uiSimpledialog()

Categories: UI

ep.uiSimpledialog(options)

Subclass: ep

Inherit: (Subclass: ep) .widget()

Plugin: ep.ui.simpledialog

Description: Create a simple dialog with some content and maybe even buttons

  • ep.uiSimpledialog(options)

    version added: 6.15.0

    options   A map of additional options pass to the method.

The ep.uiSimpledialog() creates a simple dialog with a close button. This dialog also closes automatically, when a click occurs outside the dialog.

  • Create a simple dialog with some content and a button with a callback function.

    HTML:
    <button id="ep-edit">Edit</button>
    
    Code:
    ep('#ep-edit').uiSimpledialog({
    	content : $('<div>Some content.</div>'),
    	buttons : [{
    		text : 'test',
    		callback : function () {
    			alert('The "test" button was clicked!');
    		}
    	}]
    });
    
    
  • autoOpen

    version added: 6.15.0

    If set to true, the dialog will automatically open upon initialization. If false, the dialog will stay hidden until the open() method is called.

    Default: false

  • orientation

    version added: 6.15.0

    A vertical and/or horizontal position: middle, bottom, right, center or left.

    Default: "bottom"

  • orientationAdjust

    version added: 6.15.0

    An array of numbers to adjust the positioning [0: adjust x, 1: adjust y].

    Default: [0,0]

  • content

    version added: 6.15.0

    DOM element, HTML string, or jQuery object to be appended to the content area of the dialog.

  • buttons

    version added: 6.15.0

    Array/"null" specifies which buttons should be displayed on the dialog. A button is an object with keys "text" (type string) and "callback" (type function). The context of the callback is the button clicked. Setting buttons to "null" after creation removes any previously added buttons from the dialog.

  • open

    version added: 6.15.0

    This event is triggered when the dialog opens.

  • close

    version added: 6.15.0

    This event is triggered when the dialog closes.

  • close

    • .uiSimpledialog( 'close' )

      version added: 6.15.0

    Close the dialog.

  • open

    • .uiSimpledialog( 'open' )

      version added: 6.15.0

    Open the dialog.

  • destroy

    • .uiSimpledialog( 'destroy' )

      version added: 6.15.0

    Removes the dialog functionality completely. This will return the element back to its pre-init state