2 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
\r
3 For licensing, see LICENSE.html or http://ckeditor.com/license
\r
7 * @fileOverview Defines the "virtual" dialog, dialog content and dialog button
\r
8 * definition classes.
\r
12 * This class is not really part of the API. It just illustrates the properties
\r
13 * that developers can use to define and create dialogs.
\r
14 * @name CKEDITOR.dialog.dialogDefinition
\r
17 * // There is no constructor for this class, the user just has to define an
\r
18 * // object with the appropriate properties.
\r
20 * CKEDITOR.dialog.add( 'testOnly', function( editor )
\r
23 * title : 'Test Dialog',
\r
24 * resizable : CKEDITOR.DIALOG_RESIZE_BOTH,
\r
30 * label : 'First Tab',
\r
31 * title : 'First Tab Title',
\r
36 * label : 'Test Text 1',
\r
38 * 'default' : 'hello world!'
\r
48 * The dialog title, displayed in the dialog's header. Required.
\r
49 * @name CKEDITOR.dialog.dialogDefinition.prototype.title
\r
56 * How the dialog can be resized, must be one of the four contents defined below.
\r
58 * <strong>CKEDITOR.DIALOG_RESIZE_NONE</strong><br />
\r
59 * <strong>CKEDITOR.DIALOG_RESIZE_WIDTH</strong><br />
\r
60 * <strong>CKEDITOR.DIALOG_RESIZE_HEIGHT</strong><br />
\r
61 * <strong>CKEDITOR.DIALOG_RESIZE_BOTH</strong><br />
\r
62 * @name CKEDITOR.dialog.dialogDefinition.prototype.resizable
\r
65 * @default CKEDITOR.DIALOG_RESIZE_NONE
\r
70 * The minimum width of the dialog, in pixels.
\r
71 * @name CKEDITOR.dialog.dialogDefinition.prototype.minWidth
\r
79 * The minimum height of the dialog, in pixels.
\r
80 * @name CKEDITOR.dialog.dialogDefinition.prototype.minHeight
\r
88 * The buttons in the dialog, defined as an array of
\r
89 * {@link CKEDITOR.dialog.buttonDefinition} objects.
\r
90 * @name CKEDITOR.dialog.dialogDefinition.prototype.buttons
\r
93 * @default [ CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton ]
\r
98 * The contents in the dialog, defined as an array of
\r
99 * {@link CKEDITOR.dialog.contentDefinition} objects. Required.
\r
100 * @name CKEDITOR.dialog.dialogDefinition.prototype.contents
\r
107 * The function to execute when OK is pressed.
\r
108 * @name CKEDITOR.dialog.dialogDefinition.prototype.onOk
\r
115 * The function to execute when Cancel is pressed.
\r
116 * @name CKEDITOR.dialog.dialogDefinition.prototype.onCancel
\r
123 * The function to execute when the dialog is displayed for the first time.
\r
124 * @name CKEDITOR.dialog.dialogDefinition.prototype.onLoad
\r
131 * This class is not really part of the API. It just illustrates the properties
\r
132 * that developers can use to define and create dialog content pages.
\r
133 * @name CKEDITOR.dialog.contentDefinition
\r
136 * // There is no constructor for this class, the user just has to define an
\r
137 * // object with the appropriate properties.
\r
141 * The id of the content page.
\r
142 * @name CKEDITOR.dialog.contentDefinition.prototype.id
\r
149 * The tab label of the content page.
\r
150 * @name CKEDITOR.dialog.contentDefinition.prototype.label
\r
157 * The popup message of the tab label.
\r
158 * @name CKEDITOR.dialog.contentDefinition.prototype.title
\r
165 * The CTRL hotkey for switching to the tab.
\r
166 * @name CKEDITOR.dialog.contentDefinition.prototype.accessKey
\r
170 * contentDefinition.accessKey = 'Q'; // Switch to this page when CTRL-Q is pressed.
\r
174 * The UI elements contained in this content page, defined as an array of
\r
175 * {@link CKEDITOR.dialog.uiElementDefinition} objects.
\r
176 * @name CKEDITOR.dialog.contentDefinition.prototype.elements
\r
183 * This class is not really part of the API. It just illustrates the properties
\r
184 * that developers can use to define and create dialog buttons.
\r
185 * @name CKEDITOR.dialog.buttonDefinition
\r
188 * // There is no constructor for this class, the user just has to define an
\r
189 * // object with the appropriate properties.
\r
193 * The id of the dialog button. Required.
\r
194 * @name CKEDITOR.dialog.buttonDefinition.prototype.id
\r
201 * The label of the dialog button. Required.
\r
202 * @name CKEDITOR.dialog.buttonDefinition.prototype.label
\r
209 * The popup message of the dialog button.
\r
210 * @name CKEDITOR.dialog.buttonDefinition.prototype.title
\r
217 * The CTRL hotkey for the button.
\r
218 * @name CKEDITOR.dialog.buttonDefinition.prototype.accessKey
\r
222 * exitButton.accessKey = 'X'; // Button will be pressed when user presses CTRL-X
\r
226 * Whether the button is disabled.
\r
227 * @name CKEDITOR.dialog.buttonDefinition.prototype.disabled
\r
235 * The function to execute when the button is clicked.
\r
236 * @name CKEDITOR.dialog.buttonDefinition.prototype.onClick
\r
243 * This class is not really part of the API. It just illustrates the properties
\r
244 * that developers can use to define and create dialog UI elements.
\r
245 * @name CKEDITOR.dialog.uiElementDefinition
\r
247 * @see CKEDITOR.ui.dialog.uiElement
\r
249 * // There is no constructor for this class, the user just has to define an
\r
250 * // object with the appropriate properties.
\r
254 * The id of the UI element.
\r
255 * @name CKEDITOR.dialog.uiElementDefinition.prototype.id
\r
262 * The type of the UI element. Required.
\r
263 * @name CKEDITOR.dialog.uiElementDefinition.prototype.type
\r
270 * The popup label of the UI element.
\r
271 * @name CKEDITOR.dialog.uiElementDefinition.prototype.title
\r
278 * CSS class names to append to the UI element.
\r
279 * @name CKEDITOR.dialog.uiElementDefinition.prototype.className
\r
286 * Inline CSS classes to append to the UI element.
\r
287 * @name CKEDITOR.dialog.uiElementDefinition.prototype.style
\r
294 * Function to execute the first time the UI element is displayed.
\r
295 * @name CKEDITOR.dialog.uiElementDefinition.prototype.onLoad
\r
302 * Function to execute whenever the UI element's parent dialog is displayed.
\r
303 * @name CKEDITOR.dialog.uiElementDefinition.prototype.onShow
\r
310 * Function to execute whenever the UI element's parent dialog is closed.
\r
311 * @name CKEDITOR.dialog.uiElementDefinition.prototype.onHide
\r