r9761: Move initial widget setup to desktop library. Now, just by including
authorDeryck Hodge <deryck@samba.org>
Mon, 29 Aug 2005 21:28:48 +0000 (21:28 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:34:57 +0000 (13:34 -0500)
desktop.js, you get the basic desktop layout.

deryck

swat/desktop/index.esp
swat/scripting/client/desktop.js

index 833ed08bbad2493384aaf6a1df416158f3bcf77e..21ca766f590a6023cce4c1d07f9cd8dd3bffcea5 100644 (file)
@@ -7,6 +7,7 @@ libinclude("base.js");
 <script type="text/javascript" src="/scripting/client/call.js"></script>
 <script type="text/javascript" src="/scripting/client/js_scripts.js"></script>
 <script type="text/javascript" src="/scripting/client/desktop.js"></script>
 <script type="text/javascript" src="/scripting/client/call.js"></script>
 <script type="text/javascript" src="/scripting/client/js_scripts.js"></script>
 <script type="text/javascript" src="/scripting/client/desktop.js"></script>
+<script type="text/javascript" src="/scripting/client/status.js"></script>
 
 <script type="text/javascript">
 
 
 <script type="text/javascript">
 
@@ -73,45 +74,22 @@ function showContextMenu(e)
        cmenu.setVisible(true);
 }
 
        cmenu.setVisible(true);
 }
 
-/*** init the page for qooxdoo ***/
+// Always open with stats
+var win = new QxWindow();
 document.js.add('/scripting/client/status.js');
 document.js.add('/scripting/client/status.js');
-window.application.main = function()
+win._onclosebuttonclick = function(e)
 {
 {
-       var doc = this.getClientWindow().getClientDocument();
-       // Don't declare local with var
-       w = new QxWidget();
-       with(w) {
-               setTop(0);
-               setLeft(0);
-               setWidth(docX());
-               setHeight(docY());
-       }
-       doc.addEventListener("contextmenu", showContextMenu);
-       doc.add(w);
-
-
-       // Always open with stats
-       var win = new QxWindow();
-       win._onclosebuttonclick = function(e)
-       {
-               this.close();
-               e.stopPropagation();
-               document.js.remove('/scripting/client/status.js');
-       };
-       with(win) {
-               setTop(50);
-               setRight(50);
-               setHeight(175);
-       }
-       w.add(win);
-       getServerStatus(win);
-}
-
-window.onresize = function() 
-{
-       w.setWidth(docX());
-       w.setHeight(docY());
+       this.close();
+       e.stopPropagation();
+       document.js.remove('/scripting/client/status.js');
+};
+with(win) {
+       setTop(50);
+       setRight(50);
+       setHeight(175);
 }
 }
+w.add(win);
+getServerStatus(win);
 
 function showReg()
 {
 
 function showReg()
 {
index 563af4907fbeaad6951d3d939d470e049e5e3089..b1c77dc6131bcc77a762327a8d8e3e9d42fd83ef 100644 (file)
@@ -6,6 +6,15 @@
 */
 
 
 */
 
 
+// The global widget we attach everything to
+var w = new QxWidget();
+with(w) {
+       setTop(0);
+       setLeft(0);
+       setWidth(docX());
+       setHeight(docY());
+}
+
 /* Qooxdoo's browser sniffer doesn't distinguish IE version.
 We'll cover IE 6 for now, but these checks need to be
 revisited for fuller browser coverage. */
 /* Qooxdoo's browser sniffer doesn't distinguish IE version.
 We'll cover IE 6 for now, but these checks need to be
 revisited for fuller browser coverage. */
@@ -139,3 +148,17 @@ function LargeWindow(h, src)
 Window.small = SmallWindow;
 Window.standard = StandardWindow;
 Window.large = LargeWindow;
 Window.small = SmallWindow;
 Window.standard = StandardWindow;
 Window.large = LargeWindow;
+
+window.application.main = function()
+{
+       var doc = this.getClientWindow().getClientDocument();
+       doc.addEventListener("contextmenu", showContextMenu);
+       doc.add(w);
+}
+
+window.onresize = function() 
+{
+       w.setWidth(docX());
+       w.setHeight(docY());
+}
+