documentation.html.svn-base
来自「一个很好的无线搜索、自动连接脚本」· SVN-BASE 代码 · 共 456 行 · 第 1/2 页
SVN-BASE
456 行
<span class="explanation">Modal mode</span> </p> </div> <div class="function window" title="showCenter"><a name="showCenter"></a> <p class="title"><span class="function">showCenter(modal, top, left)</span> Shows window in page's center. You can set top (or left) if you want to center only left (or top) value</p> <p class="parameter"> <span class="field">modal (default false)</span> <span class="field">top (default null)</span> <span class="field">left (default null)</span> <span class="explanation">Modal mode</span> </p> </div> <div class="function window" title="minimize"><a name="minimize"></a> <p class="title"><span class="function">minimize()</span> Minimizes the window, only top bar will be displayed</p> </div> <div class="function window" title="maximize"><a name="maximize"></a> <p class="title"><span class="function">maximize()</span> Maximizes the window, the window will fit the viewable area of the page</p> </div> <div class="function window" title="isMinimized"><a name="isMinimized"></a> <p class="title"><span class="function">isMinimized()</span> Returns true if the window is minimized</p> </div> <div class="function window" title="isMaximized"><a name="isMaximized"></a> <p class="title"><span class="function">isMaximized()</span> Returns true if the window is maximized</p> </div> <div class="function window" title="setOpacity"><a name="setOpacity"></a> <p class="title"><span class="function">setOpacity(opacity)</span> Sets window opacity</p> <p class="parameter"> <span class="field">opacity</span> <span class="explanation">Float value between 0 and 1</span> </p> </div> <div class="function window" title="setZIndex"><a name="setZIndex"></a> <p class="title"><span class="function">setZIndex(zindex)</span> Sets window zindex</p> <p class="parameter"> <span class="field">zindex</span> <span class="explanation">Int value</span> </p> </div> <div class="function window" title="setTitle"><a name="setTitle"></a> <p class="title"><span class="function">setTitle(title)</span> Sets window title</p> <p class="parameter"> <span class="field">title</span> <span class="explanation">Window title (can be null)</span> </p> </div> <div class="function window" title="setStatusBar"><a name="setStatusBar"></a> <p class="title"><span class="function">setStatusBar(element)</span> Sets window status bar</p> <p class="parameter"> <span class="field">element</span> <span class="explanation">Can be HTML code or an element</span> </p> </div> <h2> Dialog module</h2> Dialog factory to open alert/confirm/info modal panels<br/><br/> <div class="function dialogmodule" title="confirm"><a name="confirm"></a> <p class="title"><span class="function">confirm(content, options)</span> Opens a modal dialog with two buttons (ok/cancel for example)</p> <p class="parameter"> <span class="field">content</span> <span class="explanation"> - If the content is a string, it will be the message displayed in the dialog (HTML code)<br> - If the content is an hash map, it will be used for setting content with an AJAX request. The hashmap must have url key and an optional options key (ajax options request) </span> </p> <p class="parameter"> <span class="field">options</span> <span class="explanation"> Hash map of dialog options, here is the key list: <table> <tr><th>Key</th> <th>Default</th> <th>Description </th></tr> <tr><td class="key">top</td> <td class="default">null</td> <td class="detail">Top position </td></tr> <tr><td class="key">left</td> <td class="default">null</td> <td class="detail">Left position </td></tr> <tr><td class="key">okLabel</td> <td class="default">Ok</td> <td class="detail">Ok button label </td></tr> <tr><td class="key">cancelLabel</td> <td class="default">Cancel</td> <td class="detail">Cancel button label </td></tr> <tr><td class="key">ok</td> <td class="default">none</td> <td class="detail">Ok callback function called on ok button</td></tr> <tr><td class="key">cancel</td> <td class="default">none</td> <td class="detail">Cancel callback function called on ok button </td></tr> <tr><td class="key">buttonClass</td> <td class="default">none</td> <td class="detail">Ok/Cancel button css class name </td></tr> <tr><td class="key">windowParameters (hash map)</td> <td class="default">none</td> <td class="detail">Window constructor options </td></tr> </table> </span> </p> </div> <div class="function dialogmodule" title="alert"><a name="alert"></a> <p class="title"><span class="function">alert(content, options)</span> Opens a modal alert with one button (ok for example)</p> <p class="parameter"> <span class="field">content</span> <span class="explanation"> - If the content is a string, it will be the message displayed in the dialog (HTML code)<br> - If the content is an hash map, it will be used for setting content with an AJAX request. The hashmap must have url key and an optional options key (ajax options request) </span> </p> <p class="parameter"> <span class="field">options</span> <span class="explanation"> Hash map of dialog options, here is the key list: <table> <tr><th>Key</th> <th>Default</th> <th>Description </th></tr> <tr><td class="key">top</td> <td class="default">null</td> <td class="detail">Top position </td></tr> <tr><td class="key">left</td> <td class="default">null</td> <td class="detail">Left position </td></tr> <tr><td class="key">okLabel</td> <td class="default">Ok</td> <td class="detail">Ok button label </td></tr> <tr><td class="key">okCallback</td> <td class="default">none</td> <td class="detail">Ok callback function called on ok button</td></tr> <tr><td class="key">buttonClass</td> <td class="default">none</td> <td class="detail">Ok/Cancel button css class name </td></tr> <tr><td class="key">windowParameters (hash map)</td> <td class="default">none</td> <td class="detail">Window constructor options </td></tr> </table> </span> </p> </div> <div class="function dialogmodule" title="info"><a name="info"></a> <p class="title"><span class="function">info(content, options)</span> Opens a modal info panel without any button. It can have a progress image (Used to display submit waiting message for example)</p> <p class="parameter"> <span class="field">content</span> <span class="explanation"> - If the content is a string, it will be the message displayed in the dialog (HTML code)<br> - If the content is an hash map, it will be used for setting content with an AJAX request. The hashmap must have url key and an optional options key (ajax options request) </span> </p> <p class="parameter"> <span class="field">options</span> <span class="explanation"> Hash map of dialog options, here is the key list: <table> <tr><th>Key</th> <th>Default</th> <th>Description </th></tr> <tr><td class="key">top</td> <td class="default">null</td> <td class="detail">Top position </td></tr> <tr><td class="key">left</td> <td class="default">null</td> <td class="detail">Left position </td></tr> <tr><td class="key">showProgress</td> <td class="default">false</td> <td class="detail">Add a progress image (info found in the css file) </td></tr> <tr><td class="key">windowParameters (hash map)</td> <td class="default">none</td> <td class="detail">Window constructor options </td></tr> </table> </span> </p> </div> <div class="function dialogmodule" title="setInfoMessage"><a name="setInfoMessage"></a> <p class="title"><span class="function">setInfoMessage(message)</span> Sets info message (Used to display waiting information like 32% done for example)</p> <p class="parameter"> <span class="field">message</span> <span class="explanation">New info message</span> </p> </div> <div class="function dialogmodule" title="closeInfo"><a name="closeInfo"></a> <p class="title"><span class="function">closeInfo()</span> Closes the current modal dialog</p> </div> <div style="clear:both"></div> <h2> Windows</h2> Windows factory. Handles created windows, and windows observers<br/><br/> <div class="function windows" title="addObserver"><a name="addObserver"></a> <p class="title"><span class="function">addObserver(observer)</span> Registers a new windows observer. Should be able to respond to onStartResize(), onEndResize(), onStartMove(), onEndMove(), onClose(), onDestroy(), onMaximize(), onMinimize(), onFocus(), onHide(), onShow() functions</p> <p class="parameter"> <span class="field">observer</span> <span class="explanation">Observer object</span> </p> </div> <div class="function windows" title="removeObserver"><a name="removeObserver"></a> <p class="title"><span class="function">removeObserver(observer)</span> Unregisters a windows observer. </p> <p class="parameter"> <span class="field">observer</span> <span class="explanation">Observer object</span> </p> </div> <div class="function windows" title="closeAll"><a name="closeAll"></a> <p class="title"><span class="function">closeAll()</span> Closes all closeable windows. </p> </div> <div class="function windows" title="getFocusedWindow"><a name="getFocusedWindow"></a> <p class="title"><span class="function">getFocusedWindow()</span> Returns the last focused window. </p> </div> <h2> Add-ons</h2> Add-on behaviors to PWC<br/><br/> <div class="function addons" title="WindowsStore.init"><a name="WindowsStore.init"></a> <p class="title"><span class="function">WindowsStore.init(cookieName, expired)</span> Save automatically show/hide window status. Just add WindowsStore.init() at the end of you HTML file. </p> <p class="parameter"> <span class="field">cookieName</span> <span class="explanation">Cookie name used to store window information (default: <em>__window_store__</em>)</span> </p> <p class="parameter"> <span class="field">expired</span> <span class="explanation">Cookie expiration date (default: <em>In 3 years!!</em>)</span> </p> </div> <div class="function addons" title="WindowCloseKey.init"><a name="WindowCloseKey.init"></a> <p class="title"><span class="function">WindowCloseKey.init(keyCode)</span> Handle key to close windows or dialogs. Just add WindowsStore.init() at the end of you HTML file. </p> <p class="parameter"> <span class="field">keyCode</span> <span class="explanation">Key used to close windows (default: <em>Event.KEY_ESC</em>)</span> </p> </div> <div class="function addons" title="TooltipManager"><a name="TooltipManager"></a> <p class="title"><span class="function">TooltipManager</span> Singleton to handle tooltips using PWC. </p> <p class="parameter"> <span class="explanation">Tooltips are not "regular" tooltips that show/hide on specific areas. Those tooltips are PWC windows that keeps alive in you move the mouse over it. Like this, you can have forms, links are anything you want in your tooltips.<br/><br/> Tooltips content can be set by giving a html element already present in the page (usually hidden), by ajax using an url or by url. It works in two modes: <li>An unobtrusive mode using specific class name. In this mode only HTML and Ajax content are supported</li> <li>Regular mode by adding tooltip using javascript code.</li> <br/> Check sample code in samples/tooltips/tooltip.html to see how it works. </span> </p> </div> </div> <br/> <br/></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?