1: <?php
2: /**
3: * Triggered when a dialog is about to close. If canceled, the dialog
4: * will not close.
5: *
6: * * event Type: Event
7: * * ui Type: Object
8: *
9: * _Note: The ui object is empty but included for consistency with other
10: * events._ */
11: class QDialog_BeforeCloseEvent extends QJqUiEvent {
12: const EventName = 'dialogbeforeclose';
13: }
14: /**
15: * Triggered when the dialog is closed.
16: *
17: * * event Type: Event
18: * * ui Type: Object
19: *
20: * _Note: The ui object is empty but included for consistency with other
21: * events._ */
22: class QDialog_CloseEvent extends QJqUiEvent {
23: const EventName = 'dialogclose';
24: }
25: /**
26: * Triggered when the dialog is created.
27: *
28: * * event Type: Event
29: * * ui Type: Object
30: *
31: * _Note: The ui object is empty but included for consistency with other
32: * events._ */
33: class QDialog_CreateEvent extends QJqUiEvent {
34: const EventName = 'dialogcreate';
35: }
36: /**
37: * Triggered while the dialog is being dragged.
38: *
39: * * event Type: Event
40: *
41: * * ui Type: Object
42: *
43: * * position Type: Object The current CSS position of the dialog.
44: * * offset Type: Object The current offset position of the dialog.
45: *
46: */
47: class QDialog_DragEvent extends QJqUiEvent {
48: const EventName = 'dialogdrag';
49: }
50: /**
51: * Triggered when the user starts dragging the dialog.
52: *
53: * * event Type: Event
54: *
55: * * ui Type: Object
56: *
57: * * position Type: Object The current CSS position of the dialog.
58: * * offset Type: Object The current offset position of the dialog.
59: *
60: */
61: class QDialog_DragStartEvent extends QJqUiEvent {
62: const EventName = 'dialogdragstart';
63: }
64: /**
65: * Triggered after the dialog has been dragged.
66: *
67: * * event Type: Event
68: *
69: * * ui Type: Object
70: *
71: * * position Type: Object The current CSS position of the dialog.
72: * * offset Type: Object The current offset position of the dialog.
73: *
74: */
75: class QDialog_DragStopEvent extends QJqUiEvent {
76: const EventName = 'dialogdragstop';
77: }
78: /**
79: * Triggered when the dialog gains focus.
80: *
81: * * event Type: Event
82: * * ui Type: Object
83: *
84: * _Note: The ui object is empty but included for consistency with other
85: * events._ */
86: class QDialog_FocusEvent extends QJqUiEvent {
87: const EventName = 'dialogfocus';
88: }
89: /**
90: * Triggered when the dialog is opened.
91: *
92: * * event Type: Event
93: * * ui Type: Object
94: *
95: * _Note: The ui object is empty but included for consistency with other
96: * events._ */
97: class QDialog_OpenEvent extends QJqUiEvent {
98: const EventName = 'dialogopen';
99: }
100: /**
101: * Triggered while the dialog is being resized.
102: *
103: * * event Type: Event
104: *
105: * * ui Type: Object
106: *
107: * * originalPosition Type: Object The CSS position of the dialog prior
108: * to being resized.
109: * * position Type: Object The current CSS position of the dialog.
110: * * originalSize Type: Object The size of the dialog prior to being
111: * resized.
112: * * size Type: Object The current size of the dialog.
113: *
114: */
115: class QDialog_ResizeEvent extends QJqUiEvent {
116: const EventName = 'dialogresize';
117: }
118: /**
119: * Triggered when the user starts resizing the dialog.
120: *
121: * * event Type: Event
122: *
123: * * ui Type: Object
124: *
125: * * originalPosition Type: Object The CSS position of the dialog prior
126: * to being resized.
127: * * position Type: Object The current CSS position of the dialog.
128: * * originalSize Type: Object The size of the dialog prior to being
129: * resized.
130: * * size Type: Object The current size of the dialog.
131: *
132: */
133: class QDialog_ResizeStartEvent extends QJqUiEvent {
134: const EventName = 'dialogresizestart';
135: }
136: /**
137: * Triggered after the dialog has been resized.
138: *
139: * * event Type: Event
140: *
141: * * ui Type: Object
142: *
143: * * originalPosition Type: Object The CSS position of the dialog prior
144: * to being resized.
145: * * position Type: Object The current CSS position of the dialog.
146: * * originalSize Type: Object The size of the dialog prior to being
147: * resized.
148: * * size Type: Object The current size of the dialog.
149: *
150: */
151: class QDialog_ResizeStopEvent extends QJqUiEvent {
152: const EventName = 'dialogresizestop';
153: }
154:
155: /* Custom "property" event classes for this control */
156:
157: /**
158: * Generated QDialogGen class.
159: *
160: * This is the QDialogGen class which is automatically generated
161: * by scraping the JQuery UI documentation website. As such, it includes all the options
162: * as listed by the JQuery UI website, which may or may not be appropriate for QCubed. See
163: * the QDialogBase class for any glue code to make this class more
164: * usable in QCubed.
165: *
166: * @see QDialogBase
167: * @package Controls\Base
168: * @property mixed $AppendTo
169: * Which element the dialog (and overlay, if modal) should be appended
170: * to. Note: The appendTo option should not be changed while the dialog
171: * is open. (version added: 1.10.0)
172: *
173: * @property boolean $AutoOpen
174: * If set to true, the dialog will automatically open upon
175: * initialization. If false, the dialog will stay hidden until the open()
176: * method is called.
177: *
178: * @property mixed $Buttons
179: * Specifies which buttons should be displayed on the dialog. The context
180: * of the callback is the dialog element; if you need access to the
181: * button, it is available as the target of the event object.Multiple
182: * types supported:
183: *
184: * * Object: The keys are the button labels and the values are the
185: * callbacks for when the associated button is clicked.
186: * * Array: Each element of the array must be an object defining the
187: * attributes, properties, and event handlers to set on the button. In
188: * addition, a key of icons can be used to control buttons icons option,
189: * and a key of showText can be used to control buttons text option.
190: *
191:
192: *
193: * @property boolean $CloseOnEscape
194: * Specifies whether the dialog should close when it has focus and the
195: * user presses the escape (ESC) key.
196: *
197: * @property string $CloseText
198: * Specifies the text for the close button. Note that the close text is
199: * visibly hidden when using a standard theme.
200: *
201: * @property string $DialogClass
202: * The specified class name(s) will be added to the dialog, for
203: * additional theming.
204: *
205: * @property boolean $Draggable
206: * If set to true, the dialog will be draggable by the title bar.
207: * Requires the jQuery UI Draggable widget to be included.
208: *
209: * @property mixed $Height
210: * The height of the dialog.Multiple types supported:
211: *
212: * * Number: The height in pixels.
213: * * String: The only supported string value is "auto" which will allow
214: * the dialog height to adjust based on its content.
215: *
216:
217: *
218: * @property mixed $Hide
219: * If and how to animate the hiding of the dialog.Multiple types
220: * supported:
221: *
222: * * Boolean: When set to false, no animation will be used and the
223: * dialog will be hidden immediately. When set to true, the dialog will
224: * fade out with the default duration and the default easing.
225: * * Number: The dialog will fade out with the specified duration and
226: * the default easing.
227: * * String: The dialog will be hidden using the specified effect. The
228: * value can either be the name of a built-in jQuery animation method,
229: * such as "slideUp", or the name of a jQuery UI effect, such as "fold".
230: * In either case the effect will be used with the default duration and
231: * the default easing.
232: * * Object: If the value is an object, then effect, delay, duration,
233: * and easing properties may be provided. If the effect property contains
234: * the name of a jQuery method, then that method will be used; otherwise
235: * it is assumed to be the name of a jQuery UI effect. When using a
236: * jQuery UI effect that supports additional settings, you may include
237: * those settings in the object and they will be passed to the effect. If
238: * duration or easing is omitted, then the default values will be used.
239: * If effect is omitted, then "fadeOut" will be used. If delay is
240: * omitted, then no delay is used.
241: *
242:
243: *
244: * @property integer $MaxHeight
245: * The maximum height to which the dialog can be resized, in pixels.
246: *
247: * @property integer $MaxWidth
248: * The maximum width to which the dialog can be resized, in pixels.
249: *
250: * @property integer $MinHeight
251: * The minimum height to which the dialog can be resized, in pixels.
252: *
253: * @property integer $MinWidth
254: * The minimum width to which the dialog can be resized, in pixels.
255: *
256: * @property boolean $Modal
257: * If set to true, the dialog will have modal behavior; other items on
258: * the page will be disabled, i.e., cannot be interacted with. Modal
259: * dialogs create an overlay below the dialog but above other page
260: * elements.
261: *
262: * @property mixed $Position
263: * Specifies where the dialog should be displayed when opened. The dialog
264: * will handle collisions such that as much of the dialog is visible as
265: * possible.
266: *
267: * The of property defaults to the window, but you can specify another
268: * element to position against. You can refer to the jQuery UI Position
269: * utility for more details about the available properties.
270: *
271: * @property boolean $Resizable
272: * If set to true, the dialog will be resizable. Requires the jQuery UI
273: * Resizable widget to be included.
274: *
275: * @property mixed $Show
276: * If and how to animate the showing of the dialog.Multiple types
277: * supported:
278: *
279: * * Boolean: When set to false, no animation will be used and the
280: * dialog will be shown immediately. When set to true, the dialog will
281: * fade in with the default duration and the default easing.
282: * * Number: The dialog will fade in with the specified duration and
283: * the default easing.
284: * * String: The dialog will be shown using the specified effect. The
285: * value can either be the name of a built-in jQuery animation method,
286: * such as "slideDown", or the name of a jQuery UI effect, such as
287: * "fold". In either case the effect will be used with the default
288: * duration and the default easing.
289: * * Object: If the value is an object, then effect, delay, duration,
290: * and easing properties may be provided. If the effect property contains
291: * the name of a jQuery method, then that method will be used; otherwise
292: * it is assumed to be the name of a jQuery UI effect. When using a
293: * jQuery UI effect that supports additional settings, you may include
294: * those settings in the object and they will be passed to the effect. If
295: * duration or easing is omitted, then the default values will be used.
296: * If effect is omitted, then "fadeIn" will be used. If delay is omitted,
297: * then no delay is used.
298: *
299:
300: *
301: * @property string $Title
302: * Specifies the title of the dialog. If the value is null, the title
303: * attribute on the dialog source element will be used.
304: *
305: * @property integer $Width
306: * The width of the dialog, in pixels.
307: *
308: */
309:
310: class QDialogGen extends QPanel {
311: protected $strJavaScripts = __JQUERY_EFFECTS__;
312: protected $strStyleSheets = __JQUERY_CSS__;
313: /** @var mixed */
314: protected $mixAppendTo = null;
315: /** @var boolean */
316: protected $blnAutoOpen = null;
317: /** @var mixed */
318: protected $mixButtons = null;
319: /** @var boolean */
320: protected $blnCloseOnEscape = null;
321: /** @var string */
322: protected $strCloseText = null;
323: /** @var string */
324: protected $strDialogClass = null;
325: /** @var boolean */
326: protected $blnDraggable = null;
327: /** @var mixed */
328: protected $mixHeight = null;
329: /** @var mixed */
330: protected $mixHide = null;
331: /** @var integer */
332: protected $intMaxHeight = null;
333: /** @var integer */
334: protected $intMaxWidth = null;
335: /** @var integer */
336: protected $intMinHeight = null;
337: /** @var integer */
338: protected $intMinWidth = null;
339: /** @var boolean */
340: protected $blnModal = null;
341: /** @var mixed */
342: protected $mixPosition = null;
343: /** @var boolean */
344: protected $blnResizable = null;
345: /** @var mixed */
346: protected $mixShow = null;
347: /** @var string */
348: protected $strTitle = null;
349: /** @var integer */
350: protected $intWidth = null;
351:
352: /**
353: * Builds the option array to be sent to the widget constructor.
354: *
355: * @return array key=>value array of options
356: */
357: protected function MakeJqOptions() {
358: $jqOptions = null;
359: if (!is_null($val = $this->AppendTo)) {$jqOptions['appendTo'] = $val;}
360: if (!is_null($val = $this->AutoOpen)) {$jqOptions['autoOpen'] = $val;}
361: if (!is_null($val = $this->Buttons)) {$jqOptions['buttons'] = $val;}
362: if (!is_null($val = $this->CloseOnEscape)) {$jqOptions['closeOnEscape'] = $val;}
363: if (!is_null($val = $this->CloseText)) {$jqOptions['closeText'] = $val;}
364: if (!is_null($val = $this->DialogClass)) {$jqOptions['dialogClass'] = $val;}
365: if (!is_null($val = $this->Draggable)) {$jqOptions['draggable'] = $val;}
366: if (!is_null($val = $this->Height)) {$jqOptions['height'] = $val;}
367: if (!is_null($val = $this->Hide)) {$jqOptions['hide'] = $val;}
368: if (!is_null($val = $this->MaxHeight)) {$jqOptions['maxHeight'] = $val;}
369: if (!is_null($val = $this->MaxWidth)) {$jqOptions['maxWidth'] = $val;}
370: if (!is_null($val = $this->MinHeight)) {$jqOptions['minHeight'] = $val;}
371: if (!is_null($val = $this->MinWidth)) {$jqOptions['minWidth'] = $val;}
372: if (!is_null($val = $this->Modal)) {$jqOptions['modal'] = $val;}
373: if (!is_null($val = $this->Position)) {$jqOptions['position'] = $val;}
374: if (!is_null($val = $this->Resizable)) {$jqOptions['resizable'] = $val;}
375: if (!is_null($val = $this->Show)) {$jqOptions['show'] = $val;}
376: if (!is_null($val = $this->Title)) {$jqOptions['title'] = $val;}
377: if (!is_null($val = $this->Width)) {$jqOptions['width'] = $val;}
378: return $jqOptions;
379: }
380:
381: /**
382: * Return the JavaScript function to call to associate the widget with the control.
383: *
384: * @return string
385: */
386: public function GetJqSetupFunction() {
387: return 'dialog';
388: }
389:
390: /**
391: * Returns the script that attaches the JQueryUI widget to the html object.
392: *
393: * @return string
394: */
395: public function GetEndScript() {
396: $strId = $this->GetJqControlId();
397: $jqOptions = $this->makeJqOptions();
398: $strFunc = $this->getJqSetupFunction();
399:
400: if ($strId !== $this->ControlId && QApplication::$RequestMode == QRequestMode::Ajax) {
401: // If events are not attached to the actual object being drawn, then the old events will not get
402: // deleted during redraw. We delete the old events here. This must happen before any other event processing code.
403: QApplication::ExecuteControlCommand($strId, 'off', QJsPriority::High);
404: }
405:
406: // Attach the javascript widget to the html object
407: if (empty($jqOptions)) {
408: QApplication::ExecuteControlCommand($strId, $strFunc, QJsPriority::High);
409: } else {
410: QApplication::ExecuteControlCommand($strId, $strFunc, $jqOptions, QJsPriority::High);
411: }
412:
413: return parent::GetEndScript();
414: }
415:
416: /**
417: * Closes the dialog.
418: *
419: * * This method does not accept any arguments.
420: */
421: public function Close() {
422: QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "close", QJsPriority::Low);
423: }
424: /**
425: * Removes the dialog functionality completely. This will return the
426: * element back to its pre-init state.
427: *
428: * * This method does not accept any arguments.
429: */
430: public function Destroy() {
431: QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "destroy", QJsPriority::Low);
432: }
433: /**
434: * Retrieves the dialogs instance object. If the element does not have an
435: * associated instance, undefined is returned.
436: *
437: * Unlike other widget methods, instance() is safe to call on any element
438: * after the dialog plugin has loaded.
439: *
440: * * This method does not accept any arguments.
441: */
442: public function Instance() {
443: QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "instance", QJsPriority::Low);
444: }
445: /**
446: * Whether the dialog is currently open.
447: *
448: * * This method does not accept any arguments.
449: */
450: public function IsOpen() {
451: QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "isOpen", QJsPriority::Low);
452: }
453: /**
454: * Moves the dialog to the top of the dialog stack.
455: *
456: * * This method does not accept any arguments.
457: */
458: public function MoveToTop() {
459: QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "moveToTop", QJsPriority::Low);
460: }
461: /**
462: * Opens the dialog.
463: *
464: * * This method does not accept any arguments.
465: */
466: public function Open() {
467: QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "open", QJsPriority::Low);
468: }
469: /**
470: * Gets the value currently associated with the specified optionName.
471: *
472: * Note: For options that have objects as their value, you can get the
473: * value of a specific key by using dot notation. For example, "foo.bar"
474: * would get the value of the bar property on the foo option.
475: *
476: * * optionName Type: String The name of the option to get.
477: * @param $optionName
478: */
479: public function Option($optionName) {
480: QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "option", $optionName, QJsPriority::Low);
481: }
482: /**
483: * Gets an object containing key/value pairs representing the current
484: * dialog options hash.
485: *
486: * * This signature does not accept any arguments.
487: */
488: public function Option1() {
489: QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "option", QJsPriority::Low);
490: }
491: /**
492: * Sets the value of the dialog option associated with the specified
493: * optionName.
494: *
495: * Note: For options that have objects as their value, you can set the
496: * value of just one property by using dot notation for optionName. For
497: * example, "foo.bar" would update only the bar property of the foo
498: * option.
499: *
500: * * optionName Type: String The name of the option to set.
501: * * value Type: Object A value to set for the option.
502: * @param $optionName
503: * @param $value
504: */
505: public function Option2($optionName, $value) {
506: QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "option", $optionName, $value, QJsPriority::Low);
507: }
508: /**
509: * Sets one or more options for the dialog.
510: *
511: * * options Type: Object A map of option-value pairs to set.
512: * @param $options
513: */
514: public function Option3($options) {
515: QApplication::ExecuteControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), "option", $options, QJsPriority::Low);
516: }
517:
518:
519: public function __get($strName) {
520: switch ($strName) {
521: case 'AppendTo': return $this->mixAppendTo;
522: case 'AutoOpen': return $this->blnAutoOpen;
523: case 'Buttons': return $this->mixButtons;
524: case 'CloseOnEscape': return $this->blnCloseOnEscape;
525: case 'CloseText': return $this->strCloseText;
526: case 'DialogClass': return $this->strDialogClass;
527: case 'Draggable': return $this->blnDraggable;
528: case 'Height': return $this->mixHeight;
529: case 'Hide': return $this->mixHide;
530: case 'MaxHeight': return $this->intMaxHeight;
531: case 'MaxWidth': return $this->intMaxWidth;
532: case 'MinHeight': return $this->intMinHeight;
533: case 'MinWidth': return $this->intMinWidth;
534: case 'Modal': return $this->blnModal;
535: case 'Position': return $this->mixPosition;
536: case 'Resizable': return $this->blnResizable;
537: case 'Show': return $this->mixShow;
538: case 'Title': return $this->strTitle;
539: case 'Width': return $this->intWidth;
540: default:
541: try {
542: return parent::__get($strName);
543: } catch (QCallerException $objExc) {
544: $objExc->IncrementOffset();
545: throw $objExc;
546: }
547: }
548: }
549:
550: public function __set($strName, $mixValue) {
551: switch ($strName) {
552: case 'AppendTo':
553: $this->mixAppendTo = $mixValue;
554: $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'appendTo', $mixValue);
555: break;
556:
557: case 'AutoOpen':
558: try {
559: $this->blnAutoOpen = QType::Cast($mixValue, QType::Boolean);
560: $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'autoOpen', $this->blnAutoOpen);
561: break;
562: } catch (QInvalidCastException $objExc) {
563: $objExc->IncrementOffset();
564: throw $objExc;
565: }
566:
567: case 'Buttons':
568: $this->mixButtons = $mixValue;
569: $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'buttons', $mixValue);
570: break;
571:
572: case 'CloseOnEscape':
573: try {
574: $this->blnCloseOnEscape = QType::Cast($mixValue, QType::Boolean);
575: $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'closeOnEscape', $this->blnCloseOnEscape);
576: break;
577: } catch (QInvalidCastException $objExc) {
578: $objExc->IncrementOffset();
579: throw $objExc;
580: }
581:
582: case 'CloseText':
583: try {
584: $this->strCloseText = QType::Cast($mixValue, QType::String);
585: $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'closeText', $this->strCloseText);
586: break;
587: } catch (QInvalidCastException $objExc) {
588: $objExc->IncrementOffset();
589: throw $objExc;
590: }
591:
592: case 'DialogClass':
593: try {
594: $this->strDialogClass = QType::Cast($mixValue, QType::String);
595: $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'dialogClass', $this->strDialogClass);
596: break;
597: } catch (QInvalidCastException $objExc) {
598: $objExc->IncrementOffset();
599: throw $objExc;
600: }
601:
602: case 'Draggable':
603: try {
604: $this->blnDraggable = QType::Cast($mixValue, QType::Boolean);
605: $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'draggable', $this->blnDraggable);
606: break;
607: } catch (QInvalidCastException $objExc) {
608: $objExc->IncrementOffset();
609: throw $objExc;
610: }
611:
612: case 'Height':
613: $this->mixHeight = $mixValue;
614: $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'height', $mixValue);
615: break;
616:
617: case 'Hide':
618: $this->mixHide = $mixValue;
619: $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'hide', $mixValue);
620: break;
621:
622: case 'MaxHeight':
623: try {
624: $this->intMaxHeight = QType::Cast($mixValue, QType::Integer);
625: $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'maxHeight', $this->intMaxHeight);
626: break;
627: } catch (QInvalidCastException $objExc) {
628: $objExc->IncrementOffset();
629: throw $objExc;
630: }
631:
632: case 'MaxWidth':
633: try {
634: $this->intMaxWidth = QType::Cast($mixValue, QType::Integer);
635: $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'maxWidth', $this->intMaxWidth);
636: break;
637: } catch (QInvalidCastException $objExc) {
638: $objExc->IncrementOffset();
639: throw $objExc;
640: }
641:
642: case 'MinHeight':
643: try {
644: $this->intMinHeight = QType::Cast($mixValue, QType::Integer);
645: $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'minHeight', $this->intMinHeight);
646: break;
647: } catch (QInvalidCastException $objExc) {
648: $objExc->IncrementOffset();
649: throw $objExc;
650: }
651:
652: case 'MinWidth':
653: try {
654: $this->intMinWidth = QType::Cast($mixValue, QType::Integer);
655: $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'minWidth', $this->intMinWidth);
656: break;
657: } catch (QInvalidCastException $objExc) {
658: $objExc->IncrementOffset();
659: throw $objExc;
660: }
661:
662: case 'Modal':
663: try {
664: $this->blnModal = QType::Cast($mixValue, QType::Boolean);
665: $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'modal', $this->blnModal);
666: break;
667: } catch (QInvalidCastException $objExc) {
668: $objExc->IncrementOffset();
669: throw $objExc;
670: }
671:
672: case 'Position':
673: $this->mixPosition = $mixValue;
674: $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'position', $mixValue);
675: break;
676:
677: case 'Resizable':
678: try {
679: $this->blnResizable = QType::Cast($mixValue, QType::Boolean);
680: $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'resizable', $this->blnResizable);
681: break;
682: } catch (QInvalidCastException $objExc) {
683: $objExc->IncrementOffset();
684: throw $objExc;
685: }
686:
687: case 'Show':
688: $this->mixShow = $mixValue;
689: $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'show', $mixValue);
690: break;
691:
692: case 'Title':
693: try {
694: $this->strTitle = QType::Cast($mixValue, QType::String);
695: $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'title', $this->strTitle);
696: break;
697: } catch (QInvalidCastException $objExc) {
698: $objExc->IncrementOffset();
699: throw $objExc;
700: }
701:
702: case 'Width':
703: try {
704: $this->intWidth = QType::Cast($mixValue, QType::Integer);
705: $this->AddAttributeScript($this->getJqSetupFunction(), 'option', 'width', $this->intWidth);
706: break;
707: } catch (QInvalidCastException $objExc) {
708: $objExc->IncrementOffset();
709: throw $objExc;
710: }
711:
712:
713: default:
714: try {
715: parent::__set($strName, $mixValue);
716: break;
717: } catch (QCallerException $objExc) {
718: $objExc->IncrementOffset();
719: throw $objExc;
720: }
721: }
722: }
723:
724: /**
725: * If this control is attachable to a codegenerated control in a ModelConnector, this function will be
726: * used by the ModelConnector designer dialog to display a list of options for the control.
727: * @return QModelConnectorParam[]
728: **/
729: public static function GetModelConnectorParams() {
730: return array_merge(parent::GetModelConnectorParams(), array(
731: new QModelConnectorParam (get_called_class(), 'AutoOpen', 'If set to true, the dialog will automatically open uponinitialization. If false, the dialog will stay hidden until the open()method is called.', QType::Boolean),
732: new QModelConnectorParam (get_called_class(), 'CloseOnEscape', 'Specifies whether the dialog should close when it has focus and theuser presses the escape (ESC) key.', QType::Boolean),
733: new QModelConnectorParam (get_called_class(), 'CloseText', 'Specifies the text for the close button. Note that the close text isvisibly hidden when using a standard theme.', QType::String),
734: new QModelConnectorParam (get_called_class(), 'DialogClass', 'The specified class name(s) will be added to the dialog, foradditional theming.', QType::String),
735: new QModelConnectorParam (get_called_class(), 'Draggable', 'If set to true, the dialog will be draggable by the title bar.Requires the jQuery UI Draggable widget to be included.', QType::Boolean),
736: new QModelConnectorParam (get_called_class(), 'MaxHeight', 'The maximum height to which the dialog can be resized, in pixels.', QType::Integer),
737: new QModelConnectorParam (get_called_class(), 'MaxWidth', 'The maximum width to which the dialog can be resized, in pixels.', QType::Integer),
738: new QModelConnectorParam (get_called_class(), 'MinHeight', 'The minimum height to which the dialog can be resized, in pixels.', QType::Integer),
739: new QModelConnectorParam (get_called_class(), 'MinWidth', 'The minimum width to which the dialog can be resized, in pixels.', QType::Integer),
740: new QModelConnectorParam (get_called_class(), 'Modal', 'If set to true, the dialog will have modal behavior; other items onthe page will be disabled, i.e., cannot be interacted with. Modaldialogs create an overlay below the dialog but above other pageelements.', QType::Boolean),
741: new QModelConnectorParam (get_called_class(), 'Resizable', 'If set to true, the dialog will be resizable. Requires the jQuery UIResizable widget to be included.', QType::Boolean),
742: new QModelConnectorParam (get_called_class(), 'Title', 'Specifies the title of the dialog. If the value is null, the titleattribute on the dialog source element will be used.', QType::String),
743: new QModelConnectorParam (get_called_class(), 'Width', 'The width of the dialog, in pixels.', QType::Integer),
744: ));
745: }
746: }