summaryrefslogtreecommitdiff
path: root/swat/scripting/client
diff options
context:
space:
mode:
authorDeryck Hodge <deryck@samba.org>2005-08-29 21:28:48 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:34:57 -0500
commit721b22f9cdef811ac0e2738b62d7b978fad74dbc (patch)
tree52395c7b0d6ee72db93d35fd3befbc6df92f3ac7 /swat/scripting/client
parentc1909be224a39490fded5c2d74b8d84072972303 (diff)
downloadsamba-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)
Diffstat (limited to 'swat/scripting/client')
-rw-r--r--swat/scripting/client/desktop.js23
1 files changed, 23 insertions, 0 deletions
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());
+}
+