From 626bb8efb0c825f332c937ffaaadc9b402079539 Mon Sep 17 00:00:00 2001 From: Derrell Lipman Date: Wed, 3 Jan 2007 20:17:37 +0000 Subject: r20517: re-add cleaned-up webapps (This used to be commit 5a3d6ad0b7cf0ecf8b57b4088b19f7d4291c990b) --- webapps/scripting/client/call.js | 118 ++++++++++++++++++++++++ webapps/scripting/client/desktop.js | 121 +++++++++++++++++++++++++ webapps/scripting/client/encoder.js | 84 +++++++++++++++++ webapps/scripting/client/js_scripts.js | 60 +++++++++++++ webapps/scripting/client/regedit.js | 160 +++++++++++++++++++++++++++++++++ webapps/scripting/client/status.js | 40 +++++++++ 6 files changed, 583 insertions(+) create mode 100644 webapps/scripting/client/call.js create mode 100644 webapps/scripting/client/desktop.js create mode 100644 webapps/scripting/client/encoder.js create mode 100644 webapps/scripting/client/js_scripts.js create mode 100644 webapps/scripting/client/regedit.js create mode 100644 webapps/scripting/client/status.js (limited to 'webapps/scripting/client') diff --git a/webapps/scripting/client/call.js b/webapps/scripting/client/call.js new file mode 100644 index 0000000000..2886471db2 --- /dev/null +++ b/webapps/scripting/client/call.js @@ -0,0 +1,118 @@ +/* + client side js functions for remote calls into the server + + Copyright Andrew Tridgell 2005 + released under the GNU GPL Version 2 or later +*/ + +var __call = new Object(); + +/* + we can't use the qooxdoo portability layer for this, as it assumes + you are using an XML transport, so instead replicate the portability + code for remote calls here. Don't look too closely or you will go + blind. +*/ +__call._activex = window.ActiveXObject && !(new QxClient).isOpera() ? true : false; +__call._activexobj = null; +__call._ok = QxXmlHttpLoader._http || QxXmlHttpLoader._activex; + +if (__call._activex) { + var servers = ["MSXML2", "Microsoft", "MSXML", "MSXML3"]; + for (var i=0; i -1) { + return true; + } else { + return false; + } + } +} + +function __get_js_script(file) +{ + var i; + for (i=0; i -1) { + return scripts[i]; + } + } +} + +function __add_js_script(path) +{ + // Create a unique ID for this script + var srcID = new Date().getTime(); + + var script = document.createElement('script'); + script.type = 'text/javascript'; + script.id = srcID; + + head.appendChild(script); + + // IE works only with the path set after appending to the document + document.getElementById(srcID).src = path; +} + +function __remove_js_script(path) +{ + var script = __get_js_script(path); + script.parentNode.removeChild(script); +} + +document.js = new Object(); +document.js.scripts = scripts; +document.js.hasScript = __has_js_script; +document.js.getScript = __get_js_script; +document.js.add = __add_js_script; +document.js.remove = __remove_js_script; + diff --git a/webapps/scripting/client/regedit.js b/webapps/scripting/client/regedit.js new file mode 100644 index 0000000000..9175017c2e --- /dev/null +++ b/webapps/scripting/client/regedit.js @@ -0,0 +1,160 @@ +/* + client side js functions for registry editing + + Copyright Andrew Tridgell 2005 + released under the GNU GPL Version 2 or later +*/ + + +/* + callback from the key enumeration call +*/ +function __folder_keys(fParent, list) +{ + var i; + if (fParent.working == 1) { + fParent.working = 0; + fParent.removeAll(); + } + for (i=0;i