r9761: Move initial widget setup to desktop library. Now, just by including
[kai/samba.git] / swat / scripting / client / desktop.js
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());
+}
+