Introduction
This is documentation for window widget.
Options
Option name and values | Description |
---|---|
Option name:appendTo Default value: "body" Allowed values: selector jQuery object |
Element to which window should be appended. |
Option name:buttons Default value: [] Allowed values: array of objects representing each button config |
Buttons that should be appended to bottom of the window. See related demo for details on implementation.
Related demo: |
Option name:closable Default value: true Allowed values: false true
|
Whether user can close window. This option does not affect behaviour of API method close.
Related options:
Related method:
Related events:
Related demo: |
Option name:closeOnEscape Default value: false Allowed values: false true
|
Specifies whether the dialog should close when it has focus and the user presses the escape (ESC) key.
Related option:
Related method: |
Option name:confirmClose Default value:
Allowed values: object with keys exactly as shown above |
This object hold configuration for confirmClose functionality. See detailed options for more information.
Details: Confirm close window inherit most of it's options from parent window.
Related method:
Related demo: |
Option name:confirmClose.confirm Default value: false Allowed values: false true
|
Specifies whether the confirmClose functionality should be on. When it's on, a window will appear when user want to close window, asking if he's sure.
From API point of view, when confirmClose is on, calling
Related demo: |
Option name:confirmClose.modal Default value: false Allowed values: false true
|
Specifies whether the confirm close window should be modal.
Related demo: |
Option name:confirmClose.minimizable Default value: false Allowed values: false true
|
Specifies whether the confirm close window should be minimizable.
Related demo: |
Option name:confirmClose.no Default value: null Allowed values: null string |
Button label for "no" button.
If both confirmClose.no and confirmClose.noLocalized are not equal to
Related demo: |
Option name:confirmClose.noLocalized Default value: "confirmCloseNo" Allowed values: null string equal to key name in dictionary |
Dictionary key for label for "no" button.
If both confirmClose.no and confirmClose.noLocalized are not equal to
Related demo: |
Option name:confirmClose.text Default value: null Allowed values: null string |
Confirm close window body, typically containing question about whether user is positive about closing a window.
If both confirmClose.text and confirmClose.textLocalized are not equal to
Related demo: |
Option name:confirmClose.textLocalized Default value: "confirmCloseText" Allowed values: null string equal to key name in dictionary |
Dictionary key for confirm close window body, typically containing question about whether user is positive about closing a window.
If both confirmClose.text and confirmClose.textLocalized are not equal to
Related demo: |
Option name:confirmClose.title Default value: null Allowed values: null string |
Confirm close window title.
If both confirmClose.title and confirmClose.titleLocalized are not equal to
Related demo: |
Option name:confirmClose.titleLocalized Default value: "confirmCloseText" Allowed values: null string equal to key name in dictionary |
Dictionary key for confirm close window title.
If both confirmClose.title and confirmClose.titleLocalized are not equal to
Related demo: |
Option name:confirmClose.yes Default value: null Allowed values: null string |
Button label for "yes" button.
If both confirmClose.yes and confirmClose.yesLocalized are not equal to
Related demo: |
Option name:confirmClose.yesLocalized Default value: "confirmCloseNo" Allowed values: null string equal to key name in dictionary |
Dictionary key for label for "yes" button.
If both confirmClose.yes and confirmClose.yesLocalized are not equal to
Related demo: |
Option name:containment Default value: "inherit" Allowed values: "inherit" "viewport" "visible"
|
Defines containment for window. Three values are possible:
|
Option name:draggable Default value: true Allowed values: false true
|
If set to |
Option name:durations Default value:
Allowed values: object with keys exactly as shown above |
This is a object holding various animation durations. Every key in this object is responsible for duration of one particular animation. See detailed options for more information.
Note: Changing duration when animation is in progress will not change duration of this animation. This is the intended behaviour. If you need to end animation immediately, use maximize, minimize, restore, or show methods with a parameter
Details:
Related demo: |
Option name:durations.maximize Default value: "default" Allowed values: valid value for jQuery UI Tooltip's "hide" options false for no animation
|
How much should window maximize take. This applies to user interactions and calling method maximize without parameters.
Related methods:
Related demo: |
Option name:durations.minimize Default value: "default" Allowed values: valid value for jQuery UI Tooltip's "hide" options false for no animation
|
How much should window minimize take. This applies to user interactions and calling method minimize without parameters.
Related methods:
Related demo: |
Option name:durations.restore Default value: "default" Allowed values: valid value for jQuery UI Tooltip's "hide" options false for no animation
|
How much should window restore take. This applies to user interactions and calling method restore without parameters.
Related methods:
Related demo: |
Option name:durations.show Default value: "default" Allowed values: valid value for jQuery UI Tooltip's "hide" options false for no animation
|
How much should window show take. This applies to user interactions and calling method show without parameters.
Related methods:
Related demo: |
Option name:embeddedContent Default value: false Allowed values: false true
|
When window contains embedded content, like iframe, Flash game, or QuickTime video, set this option to true. This will put an overlay over window when it's not on top, allowing to bring it back to top when it's clicked. Normally, click event would not be propagated from embedded content to DOM. Styling guide has a section on this option.
Related demo: |
Option name:group Default value: null Allowed values: null string |
This option allow grouping windows. Windows that share the same Group name could be any string, but it's recommended that it contain only characters that can be safely used in CSS selectors (in short: use letter, numbers, hypens, and underscores, and you'll be fine). When built-in translations are used, group name can be hidden from user, but if no translations are used, group name will be exposed in button label. Related demo contains the details on implementation.
Related demo: |
Option name:height Default value: "auto" Allowed values: "auto" integer |
Window height. It can either be calculated automatically (best for most cases) or set explicitly. This option value is used to set CSS height, not outerHeight. |
Option name:icons Default value:
Allowed values: object with keys exactly as shown above |
Details:
Related demos: |
Option name:icons.close Default value: "ui-icon-closethick" Allowed values: valid jQuery icon value any custom class name that adds icon |
Icon for close button.
This option will have no visible effect if closable option is set to |
Option name:icons.confirmClose Default value: "ui-icon-help" Allowed values: valid jQuery icon value any custom class name that adds icon |
Option that's gonna be propagated to confirmClose window This option will have no visible effect confirmClose functionality is not on. |
Option name:icons.main Default value: null Allowed values: valid jQuery icon value any custom class name that adds icon |
Main window icon. This icon will be visible in window titlebar and on window button or in window group menu. |
Option name:icons.maximize Default value: "ui-icon-arrow-4-diag" Allowed values: valid jQuery icon value any custom class name that adds icon |
Icon for maximize button for when window is not maximized.
This option will have no visible effect if maximizable option is set to |
Option name:icons.minimize Default value: "ui-icon-minusthick" Allowed values: valid jQuery icon value any custom class name that adds icon |
Icon for minimize button.
This option will have no visible effect if minimizable option is set to |
Option name:icons.restore Default value: "ui-icon-newwin" Allowed values: valid jQuery icon value any custom class name that adds icon |
Icon for maximize button for when window is maximized.
This option will have no visible effect if maximizable option is set to |
Option name:maxHeight Default value: null Allowed values: null integer |
Max window height. Applied to both auto-sizing capabilities (when height is set to This option value is used to set CSS height, not outerHeight. |
Option name:maximizable Default value: true Allowed values: false true
|
Whether the window can be maximized by user. This option does not affect behaviour of API method maximize.
Related options:
Related methods:
Related demo: |
Option name:maximizedDraggable Default value: true Allowed values: false true
|
Whether the window can be dragged when it's maximized, therefore becoming restored when drag starts.
Related option:
Related demo: |
Option name:maxWidth Default value: null Allowed values: null integer |
Max window width. Applied to resizable. This option value is used to set CSS width, not outerWidth. |
Option name:minHeight Default value: 150 Allowed values: integer |
Minimal window height. Applied to both auto-sizing capabilities (when height is set to This option value is used to set CSS height, not outerHeight. |
Option name:minimizable Default value: true Allowed values: false true
|
Whether the window can be minimized by user. This option does not affect behaviour of API method minimize.
Related options:
Related methods:
Related demo: |
Option name:minWidth Default value: 150 Allowed values: integer |
Minimal window width. Applied to resizable. This option value is used to set CSS width, not outerWidth. |
Option name:modal Default value: false Allowed values: false true
|
Whether the window is modal. Modal creates an overlay over all elements, optionally filtered by modalOverlay option and modalOverlaySetsCreated event.
Related option:
Related event:
Related method:
Related demo: |
Option name:modalOverlay Default value: "all" Allowed values: "all" "viewport" jQuery object |
Specifies what elements should be covered by overlay, when modal window is on top. Three values are possible:
Related option:
Related event:
Related method:
Related demo: |
Option name:position Default value:
Allowed values: object with keys exactly as shown above |
Specifies where the dialog should be displayed when opened. The dialog will handle collisions such that as much of the dialog is visible as possible. The of property defaults to the window, but you can specify another element to position against. You can refer to the jQuery UI Position utility for more details about the available properties. Window position will be corrected if needed to fit into whatever containment has been specified. |
Option name:resizable Default value: true Allowed values: false true
|
If set to
Related events: |
Option name:taskbar Default value: "simone-taskbar:eq(0)" Allowed values: selector jQuery object |
Taskbar the window should be bound to. When invalid option value is passed—selector not matching taskbar instance, or jQuery object not containing taskbar instance—there are two scenarios:
Related event:
Related method |
Option name:title Default value: null Allowed values: null string with title |
Title of the window. Title will be visible in window titlebar and on window button or in window group menu.
If both title and titleLocalized are not equal to
Related option:
Related method: |
Option name:titleLocalized Default value: null Allowed values: null string with title |
Dictionary key for title of the window. Title will be visible in window titlebar and on window button or in window group menu.
If both title and titleLocalized are not equal to
Related option:
Related method: |
Option name:widgetClass Default value: "" Allowed values: string |
Class that gonna be added to window widget (a parent of element that
Related method: |
Option name:width Default value: 300 Allowed values: integer |
Window width. It can only be set explicitly. This option value is used to set CSS width, not outerWidth. |
Events
Event name and UI object | Description |
---|---|
Event name:every event Every UI object contains:
|
In addition to event-specific properties, every UI object contains additional properties, as shown on the left.
|
Event name:beforeClose Cancelable: yes Example UI object (in addition to what every event UI object has):
|
Triggered when window is about to be closed. This event will not be triggered when destroy method was called.
Related option:
Related event:
Related method: |
Event name:close Cancelable: no Example UI object (in addition to what every event UI object has):
|
Triggered after window is destroyed and closed.
Related option:
Related event:
Related method: |
Event name:create Cancelable: no Example UI object (in addition to what every event UI object has):
|
This event if triggered when window widget is successfully created. This event if triggered only once. If this event fails to fire, taskbarNotFound likely fired.
This event will not be triggered if widget creation failed. If that happens, set taskbar's debug.environment to |
Event name:dragStart Cancelable: no Example UI object (in addition to what every event UI object has):
|
Triggered when window draggable starts.
This event caries properties from Original draggable start event object is passed.
Related demo: |
Event name:drag Cancelable: no Example UI object (in addition to what every event UI object has):
|
Triggered when window draggable in in progress.
This event caries properties from Original draggable drag event object is passed.
Related demo: |
Event name:dragStop Cancelable: no Example UI object (in addition to what every event UI object has):
This event caries properties from jQuery UI Draggable stop event.
|
Triggered when window draggable stops.
This event caries properties from Original draggable stop event object is passed.
Related demo: |
Event name:focus Cancelable: no Example UI object (in addition to what every event UI object has):
|
Triggered when window is focused. |
Event name:beforeMaximize Cancelable: yes Example UI object (in addition to what every event UI object has):
|
Triggered when window is about to be maximized. Canceling this event will prevent window from maximizing.
Related event:
Related methods: |
Event name:maximize Cancelable: no Example UI object (in addition to what every event UI object has):
|
Triggered when window has been fully maximized.
Related event:
Related methods: |
Event name:beforeMinimize Cancelable: yes Example UI object (in addition to what every event UI object has):
|
Triggered when window is about to be minimized. Canceling this event will prevent window from minimizing.
Related event:
Related methods: |
Event name:minimize Cancelable: no Example UI object (in addition to what every event UI object has):
|
Triggered when window has been fully minimized.
Related event:
Related methods: |
Event name:modalOverlaySetsCreated Cancelable: no Example UI object (in addition to what every event UI object has):
|
Triggered when modal overlay sets are created, based on modal and modalOverlay options. Both sets can be modified in this event. See related demo for details on how to do this.
Related options:
Related method:
Related demo: |
Event name:moveToBackground Cancelable: no Example UI object (in addition to what every event UI object has):
|
Triggered when window was on top and is moved to background, therefore becoming a not active window.
Related methods: |
Event name:moveToTop Cancelable: no Example UI object (in addition to what every event UI object has):
|
Triggered when window was not on top and is moved to top, therefore becoming active window.
Related methods: |
Event name:resizeStart Cancelable: no Example UI object (in addition to what every event UI object has):
|
Triggered when window resize starts.
This event caries properties from Original resizable start event object is passed.
Related demo: |
Event name:resize Cancelable: no Example UI object (in addition to what every event UI object has):
|
Triggered during window resize.
This event caries properties from Original resizable resize event object is passed.
Related demo: |
Event name:resizeStop Cancelable: no Example UI object (in addition to what every event UI object has):
|
Triggered when window resize stops.
This event caries properties from Original resizable stop event object is passed.
Related demo: |
Event name:beforeRestore Cancelable: yes Example UI object (in addition to what every event UI object has):
|
Triggered when window is about to be restored. Canceling this event will prevent window from restoring.
Related event: |
Event name:restore Cancelable: no Example UI object (in addition to what every event UI object has):
|
Triggered when window has been fully restored.
Related event: |
Event name:beforeShow Cancelable: yes Example UI object (in addition to what every event UI object has):
|
Triggered when window is about to be shown. showing Canceling this event will prevent window from showing.
Related event: |
Event name:show Cancelable: no Example UI object (in addition to what every event UI object has):
|
Triggered when window has been fully shown.
Related event: |
Event name:taskbarNotFound Cancelable: no Example UI object (in addition to what every event UI object has):
|
Triggered when taskbar passed in taskbar option was not found, either on initialization or after initialization.
Related option:
Related method |
Methods
Method name | Description |
---|---|
Method name:button Parameters: none |
Returns button connected to a window, or empty jQuery object if window is not bound to taskbar. |
Method name:close Parameters: none |
Closes the window. If confirmClose.confirm is set to
Related option:
Related events:
Related method: |
Method name:confirmCloseWindow Parameters: none |
Returns confirm close window if confirm close window is currently opened, or empty jQuery object otherwise.
Related option: |
Method name:containment Parameters: none |
Returns real window containment, either
That is different from getter for containment option, that could also return
Related option: |
Method name:destroy Parameters: none |
Removes the window functionality completely. This will return the element back to its pre-init state.
Related method: |
Method name:instance Parameters: none |
Available since jQuery UI 1.11.
Retrieves the window's instance object. If the element does not have an associated instance, instance() is safe to call on any element after the dialog plugin has loaded.
|
Method name:maximize Parameters: none |
Maximizes window. If window is already maximized, nothing will happen.
Related events:
Related methods:
Related demo: |
Method name:maximized Parameters: none |
Returns
Related events:
Related methods: |
Method name:maximizing Parameters: none |
Returns
Related events: |
Method name:minimize Parameters: none |
Minimizes window. If window is already minimized, nothing will happen.
Related events:
Related methods:
Related demo: |
Method name:minimized Parameters: none |
Returns
Related events:
Related methods: |
Method name:minimizing Parameters: none |
Returns
Related events: |
Method name:modalOverlay Parameters: none |
Returns jQuery element representing modal overlay, or empty jQuery object if modal overlay is not present.
Related options:
Related event: |
Method name:moveToTop Parameters: none |
Move window to top, making it an active window. If modal window is present and current window is not modal, window will not be moved to top. This method only moves window to top if this window is not minimized or minimizing. You might want to check for that before using this method.
Related events:
Related method: |
Method name:option Parameters: option name (mandatory) option value (optional) |
Serves as getter or a setter for options. When only option name is passed, this method act as getter.
When option name and option value is passed, a new option value is set.
Alternatively, an object can be passed as option name, acting as a setter:
This will set both |
Method name:refreshPosition Parameters: none |
Refreshes position and dimension of window. Internally, this method is called whenever it's needed to reposition window, or change it's dimension.
On occasions this method should be called from your application, for example, when you have a window with height set to |
Method name:restore Parameters: none |
Restores window. If window is already restored, nothing will happen.
Related events: |
Method name:restored Parameters: none |
Returns
Related events: |
Method name:restoring Parameters: none |
Returns
Related events: |
Method name:show Parameters: none |
Shows window. If window is already shown, nothing will happen.
Related events: |
Method name:shown Parameters: none |
Returns
Related events: |
Method name:showing Parameters: none |
Returns
Related events: |
Method name:taskbar Parameters: none |
Returns taskbar the window is bound to, or empty jQuery object if window is not bound to taskbar.
Related option: |
Method name:title Parameters: none |
Returns real window title, that is the title currently shown on titlebar.
Related options: |
Method name:widget Parameters: none |
Returns parent of element on which
Related option: |
Method name:windowSetup Parameters: options (mandatory) propagateToInstances (optional, passed as first parameter if used) |
Changes the default window setup, and optionally propagate changes to existing window instances. See related demo for details on usage.
Related demo: |