From 2997f4bd43420163ee01fcbacdf8cf958dedcfea Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 20 Aug 2005 22:45:48 +0000 Subject: r9434: moved the registry editor into a common js library. Deryck, does this look ok? Apologies if this treads on your toes. (This used to be commit 8295eb01c0e1eec4f7c5bd211eac80b92ff9549e) --- swat/desktop/index.esp | 127 +------------------------------ swat/esptest/registry.esp | 154 ++++++-------------------------------- swat/scripting/client/regedit.js | 118 +++++++++++++++++++++++++++++ swat/scripting/server/regedit.esp | 35 +++++++++ 4 files changed, 181 insertions(+), 253 deletions(-) create mode 100644 swat/scripting/client/regedit.js create mode 100644 swat/scripting/server/regedit.esp (limited to 'swat') diff --git a/swat/desktop/index.esp b/swat/desktop/index.esp index 8fe45ed4a0..a81581bf3c 100644 --- a/swat/desktop/index.esp +++ b/swat/desktop/index.esp @@ -1,96 +1,15 @@ <% /*** Reg stuff ***/ libinclude("base.js"); -libinclude("winreg.js"); -libinclude("server_call.js"); - -/* - server side call to return a listing of elements in a winreg path -*/ -function enum_path(binding, path) { - printf("enum_path(%s, %s)\n", binding, path); - var reg = winreg_init(); - security_init(reg); - - reg.credentials = session.authinfo.credentials; - - var status = reg.connect(binding); - if (status.is_ok != true) { - printVars(status); - return undefined; - } - var list = winreg_enum_path(reg, path); - return list; -} - -/* register a call for clients to make */ -var call = servCallObj(); -call.add('enum_path', enum_path); - -/* run the function that was asked for */ -call.run(); -/** endReg stuff *****/ - page_header("desktop", "Virtual Desktop Design Test", "desktop"); %> + +

Registry Editor

- + var qwidget = new QxWidget; + qwidget.setHeight(800); + qwidget.setWidth("100%"); + qwidget.setBorder(QxBorder.presets.groove); + + var btn1 = new QxButton("Registry Editor"); + btn1.set({ top: 20, left : 30 }); + btn1.addEventListener("click", function() { + var regedit = regedit_widget("ncalrpc:"); + qwidget.add(regedit); + regedit.startup(); + }); + qwidget.add(btn1); + inlineWidget.add(qwidget); + doc.add(inlineWidget, "canvas"); +} + -
+
<% page_footer(); %> diff --git a/swat/scripting/client/regedit.js b/swat/scripting/client/regedit.js new file mode 100644 index 0000000000..5769a88785 --- /dev/null +++ b/swat/scripting/client/regedit.js @@ -0,0 +1,118 @@ +/* + client side js functions for registry editing + + Copyright Andrew Tridgell 2005 + released under the GNU GPL Version 2 or later +*/ + +function __folder_list(fParent, list) +{ + var i; + fParent.removeAll(); + for (i=0;i -- cgit