Class QDialogBase
Implements a JQuery UI Dialog
A QDialog is a QPanel that pops up on the screen and implements an "in window" dialog.
There are a couple of ways to use the dialog. The simplest is as follows:
In your Form_Create():
$this->dlg = new QDialog($this); $this->dlg->AutoOpen = false; $this->dlg->Modal = true; $this->dlg->Text = 'Show this on the dialog.' $this->dlg->AddButton ('OK', 'ok'); $this->dlg->AddAction (new QDialog_ButtonEvent(), new QHideDialog());
When you want to show the dialog:
$this->dlg->Open();
And, also remember to draw the dialog in your form template:
$this->dlg->Render();
Since QDialog is a descendant of QPanel, you can do anything you can to a normal QPanel, including add QControls and use a template. When you want to hide the dialog, call
Close()
- QBaseClass
- QHtmlAttributeManagerBase
- QHtmlAttributeManager
- QControlBase
- QControl
- QBlockControl
- QPanel
- QDialogGen
- QDialogBase
Direct known subclasses
QDialogLink: http://jqueryui.com/dialog/
Located at includes/base_controls/QDialogBase.class.php
public
|
#
__construct(
Creates a QControlBase object This constructor will generally not be used to create a QControlBase object. Instead it is used by the classes which extend the class. Only the parent object parameter is required. If the option strControlId parameter is not used, QCubed will generate the id. |
public
boolean
|
#
ValidateControlAndChildren( )
Validate the child items if the dialog is visible and the clicked button requires validation. This piece of magic makes validation specific to the dialog if an action is coming from the dialog, and prevents the controls in the dialog from being validated if the action is coming from outside the dialog. |
public
string
|
|
public
string
|
#
GetEndScript( )
Overrides the parent to add code to cause the default button to be fired if an enter key is pressed on a control. This purposefully does not include textarea controls, which should get the enter key to insert a newline. |
protected
string
|
|
protected
string
|
#
MakeJqOptions( )
Implements QCubed specific dialog functions. Makes sure dialog is put at the end of the form to fix an overlay problem with jQuery UI. |
public
|
|
public
|
|
public
|
|
public
|
#
ShowHideButton( $strButtonId, $blnVisible )
Show or hide the given button. Changes the display attribute, so the buttons will reflow. |
public
|
#
SetButtonStyle( string $strButtonId, array $styles )
Applies CSS styles to a button that is already in the dialog. |
public
|
#
AddCloseButton( $strButtonName )
Adds a close button that just closes the dialog without firing the QDialogButton event. You can trap this by adding an action to the QDialog_CloseEvent. |
public static
|
#
Alert(
Create a message dialog. Automatically adds an OK button that closes the dialog. To detect the close, add an action on the QDialog_CloseEvent. To change the message, use the return value and set ->Text. To detect a button click, add a QDialog_ButtonEvent. |
protected
|
#
alert_Close( $strFormId, $strControlId, $strParameter )
An alert is closing, so we remove the dialog from the dom. |
public
|
|
public
|
|
public
mixed
|
|
public
mixed
|
Close(),
Destroy(),
GetJqSetupFunction(),
GetModelConnectorParams(),
Instance(),
IsOpen(),
MoveToTop(),
Open(),
Option(),
Option1(),
Option2(),
Option3()
|
OverrideAttributes(),
__call()
|
string |
StateNone
Default dialog state |
#
''
|
string |
StateError
Display using the Themeroller error state |
#
'ui-state-error'
|
string |
StateHighlight
Display using the Themeroller highlight state |
#
'ui-state-highlight'
|
string |
MessageDialogId
The control id to use for the reusable global alert dialog. |
#
'qAlertDialog'
|
CommentEnd,
CommentStart
|
protected
boolean
|
$blnAutoOpen
default to auto open being false, since this would be a rare need, and dialogs are auto-rendered. |
#
false
|
protected
string
|
$strClickedButtonId
Id of last button clicked. |
|
protected
boolean
|
$blnHasCloseButton
Should we draw a close button on the top? |
#
true
|
protected
boolean
|
$blnIsOpen
records whether dialog is open |
#
false
|
protected
array
|
$blnValidationArray
whether a button causes validation |
#
array()
|
protected
boolean
|
$blnUseWrapper
Should the wrapper be used when rendering? |
#
true
|
protected
string
|
$strDialogState
state of the dialog for special display |
|
protected
boolean
|
$blnAutoRender
true to have the control be automatically rendered without an explicit "Render..." call. This is used by QDialogs, and other similar controls that are controlled via javascript, and generally start out hidden on the page. These controls are appended to the form after all other controls. |
#
true
|
$blnCloseOnEscape,
$blnDraggable,
$blnModal,
$blnResizable,
$intMaxHeight,
$intMaxWidth,
$intMinHeight,
$intMinWidth,
$intWidth,
$mixAppendTo,
$mixButtons,
$mixHeight,
$mixHide,
$mixPosition,
$mixShow,
$strCloseText,
$strDialogClass,
$strJavaScripts,
$strStyleSheets,
$strTitle
|
$blnHtmlEntities,
$blnIsBlockElement,
$strDefaultDisplayStyle,
$strTagName
|
$blnAutoRenderChildren,
$blnDropTarget,
$objDropsControlsArray,
$objDropsGroupingsArray,
$objIsDropZoneFor,
$objMovesControlsArray,
$strFormat,
$strTemplate,
$strText
|
$attributes,
$styles
|
public
boolean
|
$HasCloseButton
Disables (false) or enables (true) the close X in the upper right corner of the title. Can be set when initializing the dialog. Can be set when initializing the dialog. Also enables or disables the ability to close the box by pressing the ESC key. |
public read-only
integer
|
$ClickedButton
Returns the id of the button most recently clicked. (read-only) |
public write-only
string
|
$DialogState
Set whether this dialog is in an error or highlight (info) state. Choose on of QDialog::StateNone, QDialogState::StateError, QDialogState::StateHighlight (write-only) |
$AppendTo,
$AutoOpen,
$Buttons,
$CloseOnEscape,
$CloseText,
$DialogClass,
$Draggable,
$Height,
$Hide,
$MaxHeight,
$MaxWidth,
$MinHeight,
$MinWidth,
$Modal,
$Position,
$Resizable,
$Show,
$Title,
$Width
|
$AutoRenderChildren,
$DropTarget,
$Format,
$HorizontalAlign,
$HtmlEntities,
$ResizeHandleDirection,
$ResizeHandleMaximum,
$ResizeHandleMinimum,
$TagName,
$Template,
$Text,
$VerticalAlign
|
$AccessKey,
$AltText,
$BackColor,
$BorderCollapse,
$BorderColor,
$BorderStyle,
$BorderWidth,
$CssClass,
$Cursor,
$Data,
$Display,
$DisplayStyle,
$Enabled,
$FontBold,
$FontItalic,
$FontNames,
$FontOverline,
$FontSize,
$FontStrikeout,
$FontUnderline,
$ForeColor,
$Left,
$Margin,
$NoWrap,
$Opacity,
$OrderedListType,
$Overflow,
$Padding,
$ReadOnly,
$TabIndex,
$ToolTip,
$Top,
$UnorderedListStyle
|