r19282: make the recent qooxdoo work that Derrell has done available via the
[kai/samba.git] / swat / scripting / client / desktop.js
index 6383e58bdae4b9cd7f094102fdc2911455658a95..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. */
@@ -89,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);
@@ -121,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;
 }
@@ -148,33 +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);
-
-       var bar = new QxMenuBar;
-       with (bar) {
-               setBottom(0);
-               setLeft(0);
-               setWidth("100%");
-               setHeight(25);
-               setBackgroundColor("ThreeDFace");
-       }
-
-       var start = new QxMenuButton("START");
-       start.addEventListener("click", function() {
-               startMenu();
-       });
-       bar.add(start);
-
-       w.add(bar);
-}
-
-window.onresize = function() 
-{
-       w.setWidth(docX());
-       w.setHeight(docY());
-}