thyDialogWindow

This class implements the Dialog Window widget.

CSS Classes

  • <class name>_buttons
  • <object name>_buttons

Events

  • onsave - Called when button with code 0 is clickd
  • oncancel - Called when button with code 1 is clicked
  • oncode<n> - Called when button with code <n> is clicked
Summary
This class implements the Dialog Window widget.
Initialization method
Tells the Window which buttons it should have
Overwritten method that sets the name of main and dialog buttons and refreshes CSS Classes
Overwritten method that calls parent setCSSClass and sets the class of the button layer
Overwritten method that sets the class of dialog buttons also
Overwritten method that removes the specified CSS Class from main and dialog buttons
Returns the event that is called on Dialog window buttons click.

initThyDialogWindow

p.initThyDialogWindow = function ()

Initialization method

setButtons

p.setButtons = function (buttons)

Tells the Window which buttons it should have

Parameters

buttonsArray that holds buttons infomations.  It format is:
  • buttons[n][‘caption’] - The button caption
  • buttons[n][‘code’] - The button code, that can be:
  • 0 - Save
  • 1 - Cancel
  • n - Other code

setName

p.setName = function (name)

Overwritten method that sets the name of main and dialog buttons and refreshes CSS Classes

Parameter

nameThe new widget name

setCSSClass

p.setCSSClass = function (type)

Overwritten method that calls parent setCSSClass and sets the class of the button layer

Parameter

typeThe class type

_addCSSClass

p._addCSSClass = function (cssClass)

Overwritten method that sets the class of dialog buttons also

_removeCSSClass

p._removeCSSClass = function (cssClass)

Overwritten method that removes the specified CSS Class from main and dialog buttons

Parameter

cssClassThe CSS Class to be removed

_getButtonEvent

p._getButtonEvent = function(button)

Returns the event that is called on Dialog window buttons click.

The event calls the correct modal event

p.initThyDialogWindow = function ()
Initialization method
p.setButtons = function (buttons)
Tells the Window which buttons it should have
p.setName = function (name)
Overwritten method that sets the name of main and dialog buttons and refreshes CSS Classes
p.setCSSClass = function (type)
Overwritten method that calls parent setCSSClass and sets the class of the button layer
p._addCSSClass = function (cssClass)
Overwritten method that sets the class of dialog buttons also
p._removeCSSClass = function (cssClass)
Overwritten method that removes the specified CSS Class from main and dialog buttons
p._getButtonEvent = function(button)
Returns the event that is called on Dialog window buttons click.