Author: deryck
Date: 2005-09-14 21:48:03 +0000 (Wed, 14 Sep 2005)
New Revision: 10228

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10228

Log:
Reorganizing a bit, trying to simplify.  This is an attempt
to find what's going wrong in IE formatting.

This is some better, but still IE needs help.

deryck

Modified:
   branches/SAMBA_4_0/swat/desktop/index.esp
   branches/SAMBA_4_0/swat/scripting/client/desktop.js
   branches/SAMBA_4_0/swat/scripting/header_desktop.esp


Changeset:
Modified: branches/SAMBA_4_0/swat/desktop/index.esp
===================================================================
--- branches/SAMBA_4_0/swat/desktop/index.esp   2005-09-14 18:48:55 UTC (rev 
10227)
+++ branches/SAMBA_4_0/swat/desktop/index.esp   2005-09-14 21:48:03 UTC (rev 
10228)
@@ -35,39 +35,22 @@
                setBottom(2);
        }
        ok.addEventListener("click", function() {
-               w.remove(message);
+               doc.remove(message);
        });
 
        message.add(note);
        message.add(ok);
-       w.add(message);
+       doc.add(message);
        message.setVisible(true);
 }
 
 function blankW()
 {
        var blank = new Window.standard('SWAT');
-       w.add(blank);
+       doc.add(blank);
        blank.setVisible(true);
 }
 
-// Always open with stats
-var win = new QxWindow();
-document.js.add('/scripting/client/status.js');
-win._onclosebuttonclick = function(e)
-{
-       this.close();
-       e.stopPropagation();
-       document.js.remove('/scripting/client/status.js');
-};
-with(win) {
-       setTop(50);
-       setRight(50);
-       setHeight(175);
-}
-w.add(win);
-getServerStatus(win);
-
 function showReg()
 {
        document.js.add('/scripting/client/regedit.js');
@@ -88,7 +71,7 @@
        
        var regedit = regedit_widget("ncalrpc:");
        regWin.add(regedit);
-       w.add(regWin);
+       doc.add(regWin);
        regWin.setVisible('true');
 }
 
@@ -112,7 +95,7 @@
 
        cmenu.setLeft(e.getClientX());
        cmenu.setTop(e.getClientY());
-       w.add(cmenu);
+       doc.add(cmenu);
        cmenu.setVisible(true);
 }
 
@@ -150,7 +133,7 @@
        var srv5 = new QxMenuButton("WINS Server", null);
        var srv6 = new QxMenuButton("Kerberos Server", null);
        srvMenu.add(srv1, srv2, srv3, srv4, srv5, srv6);
-       w.add(srvMenu);
+       doc.add(srvMenu);
        srvMenu.setVisible(false);
 
        var editReg = new QxCommand;
@@ -161,7 +144,7 @@
        var espMenu = new QxMenu;
        var esp1 = new QxMenuButton("Registry Editor", null, editReg);
        espMenu.add(esp1);
-       w.add(espMenu);
+       doc.add(espMenu);
        espMenu.setVisible(false);
 
        var opt1 = new QxMenuButton("Servers", null)
@@ -184,7 +167,7 @@
        var newMenu = new QxMenu;
        var new1 = new QxMenuButton("Window", null, openWin);
        newMenu.add(new1);
-       w.add(newMenu);
+       doc.add(newMenu);
        newMenu.setVisible(false);
 
        var opt2 = new QxMenuButton("Installation", null);
@@ -218,9 +201,61 @@
        sMenu.add(opt1, opt2, opt3, sep1, opt4, sep2, opt5, opt6);
        sMenu.setLeft(0);
        sMenu.setTop(docY() - 150);
-       w.add(sMenu);
+       doc.add(sMenu);
        sMenu.setVisible(true);
 }
+
+function contextMenu(e)
+{      
+       var t = e.getTarget()
+       var tObj = t.getHtmlAttribute("class")
+
+       if (tObj == 'QxClientDocument QxThemeWin9x') {
+               clientContextMenu(e);
+       } else if (tObj == 'QxWindowPane') {
+               windowContextMenu(t, e);
+       }
+}
+
+window.application.main = function()
+{
+       doc = this.getClientWindow().getClientDocument();
+       doc.addEventListener("contextmenu", contextMenu);
+
+       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);
+
+       doc.add(bar);
+
+       // Always open with stats
+       var win = new QxWindow();
+       document.js.add('/scripting/client/status.js');
+       win._onclosebuttonclick = function(e)
+       {
+               this.close();
+               e.stopPropagation();
+               document.js.remove('/scripting/client/status.js');
+       };
+       with(win) {
+               setTop(50);
+               setRight(50);
+               setHeight(175);
+       }
+       doc.add(win);
+       getServerStatus(win);
+}
 </script>
 
 <% page_footer(); %>

Modified: branches/SAMBA_4_0/swat/scripting/client/desktop.js
===================================================================
--- branches/SAMBA_4_0/swat/scripting/client/desktop.js 2005-09-14 18:48:55 UTC 
(rev 10227)
+++ branches/SAMBA_4_0/swat/scripting/client/desktop.js 2005-09-14 21:48:03 UTC 
(rev 10228)
@@ -5,10 +5,6 @@
    released under the GNU GPL Version 2 or later
 */
 
-
-// The global widget we attach everything to
-var w = new QxWidget();
-
 /* 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. */
@@ -122,53 +118,4 @@
 Window.standard = StandardWindow;
 Window.large = LargeWindow;
 
-function contextMenu(e)
-{      
-       var t = e.getTarget()
-       var tObj = t.getHtmlAttribute("class")
 
-       if (tObj == 'QxWidget') {
-               clientContextMenu(e);
-       } else if (tObj == 'QxWindowPane') {
-               windowContextMenu(t, e);
-       }
-}
-
-
-window.application.main = function()
-{
-       with(w) {
-               setTop(0);
-               setLeft(0);
-               setWidth(docX());
-               setHeight(docY());
-       }
-
-       var doc = this.getClientWindow().getClientDocument();
-       doc.addEventListener("contextmenu", contextMenu);
-       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());
-}
-

Modified: branches/SAMBA_4_0/swat/scripting/header_desktop.esp
===================================================================
--- branches/SAMBA_4_0/swat/scripting/header_desktop.esp        2005-09-14 
18:48:55 UTC (rev 10227)
+++ branches/SAMBA_4_0/swat/scripting/header_desktop.esp        2005-09-14 
21:48:03 UTC (rev 10228)
@@ -17,15 +17,6 @@
 body {
   background-color:#3A6EA5;
 }
-#toolbar {
-  background-color:ThreeDFace;
-  position:fixed;
-  bottom:0;
-  height:25px;
-  width:100%;
-  line-height:25px;
-  border-top:1px outset #000;
-}
 </style>
 
 </head>

Reply via email to