Window
Extends:
Window Implementation
Static Method Summary
Static Public Methods | ||
public static |
getWindows(): Window[] Get a list of all windows |
|
public static |
lastWindow(): Window Gets the lastly focused Window |
Constructor Summary
Public Constructor | ||
public |
constructor(core: Core, options: WindowOptions) Create window |
Member Summary
Public Members | ||
public |
$content: Element The content container |
|
public |
$element: Element The window container |
|
public |
$header: Element The header container |
|
public |
$icon: Element The icon container |
|
public |
$title: Element The title container |
|
public |
The window attributes |
|
public |
Child windows (via 'parent') |
|
public |
Core instance reference |
|
public |
The window destruction state |
|
public |
The Window ID |
|
public |
The window was inited |
|
public |
Parent Window reference |
|
public |
The window rendered state |
|
public |
The window state |
|
public |
The Window ID |
Private Members | ||
private |
Last DOM update data attributes |
|
private |
Last DOM update CSS text |
|
private |
Internal timeout reference used for triggering the loading overlay. |
|
private |
Custom destructor callback |
|
private |
Internal variable to signal not to use default position given by user (used for restore) |
|
private |
The window template |
Method Summary
Public Methods | ||
public |
Blur (un-focus) the window |
|
public |
clampToViewport(update: boolean) Clamps the position to viewport |
|
public |
Close the window |
|
public |
destroy() Destroy window |
|
public |
Focus the window |
|
public |
Get a snapshot of the Window session |
|
public |
getState(n: *): * Gets a astate |
|
public |
Gravitates window towards a certain area |
|
public |
init(): * Initialize window |
|
public |
Maximize the window |
|
public |
Minimize (hide) the window |
|
public |
Raise (un-minimize) the window |
|
public |
Render window |
|
public |
resizeFit(container: Element) Resize to fit to current container |
|
public |
Restore (un-maximize) the window |
|
public |
setDimension(dimension: WindowDimension) Set the Window dimension |
|
public |
Set the Window icon |
|
public |
setNextZindex(force: boolean) Sets the Window to next z index |
|
public |
setPosition(position: WindowPosition, preventDefault: boolean) Set the Window position |
|
public |
Set a state by value |
|
public |
Set the Window title |
|
public |
Set the Window z index |
Private Methods | ||
private |
Checks the modal state of the window upon render |
|
private |
Check if we have to set next zindex |
|
private |
_focus() Internal for focus |
|
private |
Initializes window behavior |
|
private |
Initializes window template |
|
private |
Internal for Maximize or restore |
|
private |
Sets the initial class names |
|
private |
Internal method for setting state |
|
private |
_toggleState(name: string, value: any, eventName: string, update: boolean): boolean Internal method for toggling state |
|
private |
Updates window data in DOM |
|
private |
Updates the window buttons in DOM |
|
private |
Updates window header decoration in DOM |
|
private |
Updates window icon decoration in DOM |
|
private |
Updates window style in DOM |
|
private |
Updates window title in DOM |
Static Public Methods
Public Constructors
public constructor(core: Core, options: WindowOptions) source
Create window
Params:
Name | Type | Attribute | Description |
core | Core | Core reference |
|
options | WindowOptions |
|
Options |
Public Members
Private Members
private _loadingDebounce: boolean source
Internal timeout reference used for triggering the loading overlay.
Public Methods
public clampToViewport(update: boolean) source
Clamps the position to viewport
Params:
Name | Type | Attribute | Description |
update | boolean |
|
Update DOM |
public gravitate(gravity: string) source
Gravitates window towards a certain area
Params:
Name | Type | Attribute | Description |
gravity | string | Gravity |
public render(callback: Function): Window source
Render window
Params:
Name | Type | Attribute | Description |
callback | Function |
|
Callback when window DOM has been constructed |
public resizeFit(container: Element) source
Resize to fit to current container
Params:
Name | Type | Attribute | Description |
container | Element |
|
The DOM element to use |
public setDimension(dimension: WindowDimension) source
Set the Window dimension
Params:
Name | Type | Attribute | Description |
dimension | WindowDimension | The dimension |
public setIcon(uri: string) source
Set the Window icon
Params:
Name | Type | Attribute | Description |
uri | string | Icon URI |
public setNextZindex(force: boolean) source
Sets the Window to next z index
Params:
Name | Type | Attribute | Description |
force | boolean |
|
Force next index |
public setPosition(position: WindowPosition, preventDefault: boolean) source
Set the Window position
Params:
Name | Type | Attribute | Description |
position | WindowPosition | The position |
|
preventDefault | boolean |
|
Prevents any future position setting in init procedure |
public setTitle(title: string) source
Set the Window title
Params:
Name | Type | Attribute | Description |
title | string | Title |
public setZindex(zIndex: Number) source
Set the Window z index
Params:
Name | Type | Attribute | Description |
zIndex | Number | the index |
Private Methods
private _maximize(toggle: boolean): boolean source
Internal for Maximize or restore
Params:
Name | Type | Attribute | Description |
toggle | boolean | Maximize or restore |
private _setState(name: string, value: *, update: boolean, updateAll: boolean) source
Internal method for setting state