jQuery EasyUI widget - Window window
Extended from $ .fn.panel.defaults. By $ .fn.window.defaults override the default defaults.
Window (window) is a floating, draggable panels, can be used as the application window to use. By default, the window can be moved to adjust the size, it can be closed. Its content is defined either by a static html to be dynamically loaded by ajax.
rely
- draggable
- resizable
- panel
usage
Create a window (window)
1, from the tag to create a window (window).
<Div id = "win" class = "easyui-window" title = "My Window" style = "width: 600px; height: 400px" data-options = "iconCls: 'icon-save', modal: true"> Window Content </ Div>
2, using javascript to create a window (window).
<Div id = "win"> </ div>
$ ( '# Win'). Window ({ width: 600, height: 400, modal: true });
3, create a window (window) through the composite layout.
As usual, you can define the window layout. The following example demonstrates how to split the window area into two parts: the northern and central areas.
<Div id = "win" class = "easyui-window" title = "My Window" style = "width: 600px; height: 400px" data-options = "iconCls: 'icon-save', modal: true"> <Div class = "easyui-layout" data-options = "fit: true"> <Div data-options = "region: 'north', split: true" style = "height: 100px"> </ div> <Div data-options = "region: 'center'"> The Content. </ Div> </ Div> </ Div>
Window (window) action
Opening and closing windows (window).
$ ( '# Win') window ( 'open');. // Open a window $ ( '# Win') window ( 'close');. // Close a window
Loading window content via ajax.
$ ( '# Win') window ( 'refresh', 'get_content.php').;
Attributes
The property extends from the panel (panel), the following is a window (window) rewriting and properties added.
名称 | 类型 | 描述 | 默认值 |
---|---|---|---|
title | string | 窗口的标题文本。 | New Window |
collapsible | boolean | 定义是否显示折叠按钮。 | true |
minimizable | boolean | 定义是否显示最小化按钮。 | true |
maximizable | boolean | 定义是否显示最大化按钮。 | true |
closable | boolean | 定义是否显示关闭按钮。 | true |
closed | boolean | 定义是否关闭窗口。 | false |
zIndex | number | 从其开始增加的窗口的 z-index。 | 9000 |
draggable | boolean | 定义窗口是否可拖拽。 | true |
resizable | boolean | 定义窗口是否可调整尺寸。 | true |
shadow | boolean | 如果设置为 true,当窗口能够显示阴影的时候将会显示阴影。 | true |
inline | boolean | 定义如何放置窗口,当设置为 true 时则放在它的父容器里,当设置为 false 时则浮在所有元素的顶部。 | false |
modal | boolean | 定义窗口是不是模态(modal)窗口。 | true |
event
The event extends from the panel (panel).
method
The methods extend from panels (panel), the following is a method for the window (window) to add.
名称 | 参数 | 描述 |
---|---|---|
window | none | 返回外部窗口(window)对象。 |
hcenter | none | 水平居中窗口。该方法自版本 1.3.1 起可用。 |
vcenter | none | 垂直居中窗口。该方法自版本 1.3.1 起可用。 |
center | none | 居中窗口。该方法自版本 1.3.1 起可用。 |
jQuery EasyUI plugin