X-Git-Url: http://git.samba.org/samba.git/?p=kai%2Fsamba.git;a=blobdiff_plain;f=swat%2Fscripting%2Fclient%2Fdesktop.js;h=9e1a34293609a156441d05adf991dd82801b8766;hp=b1c77dc6131bcc77a762327a8d8e3e9d42fd83ef;hb=223701c638def03541f456dc1fa2a2056e831408;hpb=721b22f9cdef811ac0e2738b62d7b978fad74dbc diff --git a/swat/scripting/client/desktop.js b/swat/scripting/client/desktop.js index b1c77dc6131..9e1a3429360 100644 --- a/swat/scripting/client/desktop.js +++ b/swat/scripting/client/desktop.js @@ -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()); -}