diff options
author | Deryck Hodge <deryck@samba.org> | 2005-08-29 21:28:48 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:34:57 -0500 |
commit | 721b22f9cdef811ac0e2738b62d7b978fad74dbc (patch) | |
tree | 52395c7b0d6ee72db93d35fd3befbc6df92f3ac7 | |
parent | c1909be224a39490fded5c2d74b8d84072972303 (diff) | |
download | samba-721b22f9cdef811ac0e2738b62d7b978fad74dbc.tar.gz samba-721b22f9cdef811ac0e2738b62d7b978fad74dbc.tar.bz2 samba-721b22f9cdef811ac0e2738b62d7b978fad74dbc.zip |
r9761: Move initial widget setup to desktop library. Now, just by including
desktop.js, you get the basic desktop layout.
deryck
(This used to be commit 6acc7ec7c2957e1487ee72f883079e1680dd9896)
-rw-r--r-- | swat/desktop/index.esp | 50 | ||||
-rw-r--r-- | swat/scripting/client/desktop.js | 23 |
2 files changed, 37 insertions, 36 deletions
diff --git a/swat/desktop/index.esp b/swat/desktop/index.esp index 833ed08bba..21ca766f59 100644 --- a/swat/desktop/index.esp +++ b/swat/desktop/index.esp @@ -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/status.js"></script> <script type="text/javascript"> @@ -73,45 +74,22 @@ function showContextMenu(e) cmenu.setVisible(true); } -/*** init the page for qooxdoo ***/ +// Always open with stats +var win = new QxWindow(); 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() { diff --git a/swat/scripting/client/desktop.js b/swat/scripting/client/desktop.js index 563af4907f..b1c77dc613 100644 --- a/swat/scripting/client/desktop.js +++ b/swat/scripting/client/desktop.js @@ -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. */ @@ -139,3 +148,17 @@ function LargeWindow(h, src) 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()); +} + |