r19282: make the recent qooxdoo work that Derrell has done available via the
[kai/samba.git] / swat / scripting / client / desktop.js
index b1c77dc6131bcc77a762327a8d8e3e9d42fd83ef..9e1a34293609a156441d05adf991dd82801b8766 100644 (file)
@@ -5,16 +5,6 @@
    released under the GNU GPL Version 2 or later
 */
 
-
-// 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. */
@@ -35,9 +25,8 @@ function docX()
 function docY()
 {
        var y;
-       // Less 25px to not cover the toolbar
        if (browser != "mshtml") {
-               y = window.innerHeight - 25;
+               y = window.innerHeight;
        } else {
                y = document.documentElement.clientHeight;
        }
@@ -90,26 +79,6 @@ function openIn(e)
        blank.setVisible(true);
 }
        
-function winMenu(e)
-{
-       var self = this;
-       var WinWin = new QxCommand();
-       WinWin.addEventListener("execute", function() {
-               var blank = new QxWindow();
-               self.add(blank);
-               blank.setVisible(true);
-       }); 
-
-       var inset = new QxMenu;
-       var sub1 = new QxMenuButton("Open window in a window", null, WinWin);
-
-       inset.add(sub1);
-       self.add(inset)
-
-       cmenu.setVisible(false);
-       inset.setVisible(true);
-}
-
 function Window(h, src, s)
 {
        this.self = new QxWindow(h);
@@ -122,7 +91,7 @@ function Window(h, src, s)
        this.self.setTop(getPosX(this.self));
        this.self.setLeft(getPosY(this.self));
 
-       this.self.addEventListener("contextmenu", winMenu);
+       this.self.addEventListener("contextmenu", contextMenu);
 
        return this.self;
 }
@@ -149,16 +118,4 @@ 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());
-}