diff options
author | Deryck Hodge <deryck@samba.org> | 2005-08-22 05:07:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:34:19 -0500 |
commit | 535c6fa43644b576fb793418121c77e6f073ae5e (patch) | |
tree | ccfe424005759c25f4df4a9e1c8e962e325dc4a7 /swat | |
parent | 656a885c226829e5fca8de732c0e298282f6d8d0 (diff) | |
download | samba-535c6fa43644b576fb793418121c77e6f073ae5e.tar.gz samba-535c6fa43644b576fb793418121c77e6f073ae5e.tar.bz2 samba-535c6fa43644b576fb793418121c77e6f073ae5e.zip |
r9471: Rough first pass at a menu system. It's hacked together, but
I wanted to just get it working to play with it. Only the
reg editor works from this menu. The rest will follow later.
deryck
(This used to be commit 93e648ade28eb7e0fd147fdde281b3edfb2e9367)
Diffstat (limited to 'swat')
-rw-r--r-- | swat/desktop/index.esp | 64 |
1 files changed, 55 insertions, 9 deletions
diff --git a/swat/desktop/index.esp b/swat/desktop/index.esp index e45a099156..e945215c27 100644 --- a/swat/desktop/index.esp +++ b/swat/desktop/index.esp @@ -124,17 +124,63 @@ function showReg() function startSwat() { - // Don't declare local with var (for now) - var w1 = new QxWindow("Welcome to SWAT."); - w1.setSpace("40%", 0, "35%", 0); - w.add(w1); + var sMenu = new QxMenu; + with(sMenu) { + setWidth(150); + setHeight(150); + } - var btn1 = new QxButton("View Registry"); - btn1.set({ top: 20, left : 30 }); - btn1.addEventListener("click", showReg) - w1.add(btn1); + var srvMenu = new QxMenu; + var srv1 = new QxMenuButton("LDAP Server", null); + var srv2 = new QxMenuButton("CDAP Server", null); + var srv3 = new QxMenuButton("RPC Server", null); + var srv4 = new QxMenuButton("NBT Server", null); + 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); + srvMenu.setVisible(false); + + var editReg = new QxCommand; + editReg.addEventListener("execute", function() { + showReg(); + }); - w1.setVisible(true); + var espMenu = new QxMenu; + var esp1 = new QxMenuButton("Registry Editor", null, editReg); + espMenu.add(esp1); + w.add(espMenu); + espMenu.setVisible(false); + + var opt1 = new QxMenuButton("Servers", null) + opt1.addEventListener("mouseover", function() { + srvMenu.setVisible(true); + srvMenu.setLeft(this.getComputedPageBoxRight() + 4); + srvMenu.setTop(this.getComputedPageBoxTop() - 3); + if (espMenu.getVisible()) { + espMenu.setVisible(false); + } + }); + var opt2 = new QxMenuButton("Installation", null); + var opt3 = new QxMenuButton("Configuration", null); + var opt4 = new QxMenuButton("ESP Tests", null); + opt4.addEventListener("mouseover", function() { + espMenu.setVisible(true); + espMenu.setLeft(this.getComputedPageBoxRight() + 4); + espMenu.setTop(this.getComputedPageBoxTop() - 3); + if (srvMenu.getVisible()) { + srvMenu.setVisible(false); + } + }); + var opt5 = new QxMenuButton("Documentation", null); + var sep1 = new QxMenuSeparator(); + var sep2 = new QxMenuSeparator(); + + sMenu.add(opt1, opt2, opt3, sep1, opt4, sep2, opt5); + sMenu.setLeft(0); + sMenu.setTop(docHeight() - 150); + w.add(sMenu); + sMenu.setVisible(true); } </script> |