summaryrefslogtreecommitdiff
path: root/swat/scripting/client/regedit.js
diff options
context:
space:
mode:
authorDeryck Hodge <deryck@samba.org>2005-08-26 05:25:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:34:36 -0500
commitc6b592a5b79bd8449a675012192c5654ddc4442c (patch)
treeb7f193ddd8d393133ffba26aed91728422c5008f /swat/scripting/client/regedit.js
parenta45c4fd5e24c8ae50bd86c6c84d1a3278e1bdab6 (diff)
downloadsamba-c6b592a5b79bd8449a675012192c5654ddc4442c.tar.gz
samba-c6b592a5b79bd8449a675012192c5654ddc4442c.tar.bz2
samba-c6b592a5b79bd8449a675012192c5654ddc4442c.zip
r9635: Seperate window logic from registry js file.
This allows for flexibility in display format, which will make more sense when I start working on windows, tabs, etc. Add the beginnings of a document.js object that allows us to add and remove scripts as we use them, which will ensure we only load what we need. A desktop GUI runs from a single page, so we can't load js files by changing pages. deryck (This used to be commit b4f6f81d7bbf87fcb7c7c9bd4a7164aabaeedc1c)
Diffstat (limited to 'swat/scripting/client/regedit.js')
-rw-r--r--swat/scripting/client/regedit.js31
1 files changed, 7 insertions, 24 deletions
diff --git a/swat/scripting/client/regedit.js b/swat/scripting/client/regedit.js
index 5942f25991..9175017c2e 100644
--- a/swat/scripting/client/regedit.js
+++ b/swat/scripting/client/regedit.js
@@ -121,12 +121,9 @@ function __values_table()
*/
function regedit_widget(binding)
{
- var regedit = new QxWindow("Registry Editor");
- regedit.setSpace(300, 600, 300, 600);
-
var fieldSet = new QxFieldSet();
- regedit.binding = binding;
+ fieldSet.binding = binding;
with(fieldSet) {
setWidth("100%");
@@ -138,19 +135,17 @@ function regedit_widget(binding)
gl.setCellPaddingTop(3);
gl.setCellPaddingBottom(3);
- regedit.add(fieldSet);
-
- var t = __registry_tree(regedit.binding);
+ var t = __registry_tree(fieldSet.binding);
function change_binding(e) {
- regedit.binding = e.getNewValue();
- srv_printf("changed binding to %s\\n", regedit.binding);
+ fieldSet.binding = e.getNewValue();
+ srv_printf("changed binding to %s\\n", fieldSet.binding);
gl.remove(t);
- t = __registry_tree(regedit.binding);
+ t = __registry_tree(fieldSet.binding);
gl.add(t, { row : 2, col : 1 });
}
- var b = new QxTextField(regedit.binding);
+ var b = new QxTextField(fieldSet.binding);
b.addEventListener("changeText", change_binding);
var values = new __values_table();
@@ -160,18 +155,6 @@ function regedit_widget(binding)
// gl.add(values, { row : 2, col : 2 });
fieldSet.add(gl);
- regedit.add(fieldSet);
-
- /*
- call the startup() method to display the widget
- */
- regedit.startup = function() {
- this.setVisible(true);
- this.setMoveable(true);
- this.setResizeable(true);
- this.setResizeMethod("frame");
- this.setMoveable(true);
- }
- return regedit;
+ return fieldSet;
};