r9434: moved the registry editor into a common js library. Deryck, does this
[sfrench/samba-autobuild/.git] / swat / desktop / index.esp
1 <% 
2 /*** Reg stuff ***/
3 libinclude("base.js");
4         page_header("desktop", "Virtual Desktop Design Test", "desktop");
5 %>
6
7 <script type="text/javascript" src="/scripting/client/encoder.js"></script>
8 <script type="text/javascript" src="/scripting/client/call.js"></script>
9 <script type="text/javascript" src="/scripting/client/regedit.js"></script>
10
11 <script type="text/javascript">
12
13 /*** init the page for qooxdoo ***/
14 window.application.main = function()
15 {
16   // Don't declare local with var
17   doc = this.getClientWindow().getClientDocument();
18 }
19
20 function showReg()
21 {
22         var regedit = regedit_widget("ncalrpc:");
23         doc.add(regedit);
24         regedit.startup();
25 }
26
27 function startSwat()
28 {
29   // Don't declare local with var (for now)
30   w1 = new QxWindow("Welcome to SWAT.");
31   w1.setSpace(100, 100, 100, 100);
32   doc.add(w1);
33
34   var btn1 = new QxButton("View Registry");
35   btn1.set({ top: 20, left : 30 });
36   btn1.addEventListener("click", showReg)
37   w1.add(btn1);
38
39   w1.setVisible(true);
40 }
41 </script>
42
43 <div id="canvas" style="overflow:hidden;position:static;margin-top:38px;margin-left:10px;margin-right:700px;width:700px"></div>
44
45 <div id="toolbar">
46         <h3><a href="javascript:startSwat()">SWAT (Start)</a></h3>
47 </div>
48
49 <% page_footer(); %>