summaryrefslogtreecommitdiff
path: root/swat/scripting/client/js_scripts.js
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2006-12-31 20:12:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:35:23 -0500
commitd1e09e2e6f9db62bbab84abb53e23ee73764178a (patch)
tree18e57f756611c9d3e10fb41bf7c09eeb795028dd /swat/scripting/client/js_scripts.js
parent710dfce70ca9024d2f026518638bb193e914f4a0 (diff)
downloadsamba-d1e09e2e6f9db62bbab84abb53e23ee73764178a.tar.gz
samba-d1e09e2e6f9db62bbab84abb53e23ee73764178a.tar.bz2
samba-d1e09e2e6f9db62bbab84abb53e23ee73764178a.zip
r20446: rename swat directory to swat.obsolete; keeping it around since there is lots of useful info in it.
(This used to be commit 5f9f72a9cfab80561b23284001b67c4ea961757b)
Diffstat (limited to 'swat/scripting/client/js_scripts.js')
-rw-r--r--swat/scripting/client/js_scripts.js60
1 files changed, 0 insertions, 60 deletions
diff --git a/swat/scripting/client/js_scripts.js b/swat/scripting/client/js_scripts.js
deleted file mode 100644
index 1c6e5806f4..0000000000
--- a/swat/scripting/client/js_scripts.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- Beginnnigs of a script manager for SWAT.
-
- Copyright (C) Deryck Hodge 2005
- released under the GNU GPL Version 2 or later
-*/
-
-var head = document.getElementsByTagName('head')[0];
-var scripts = document.getElementsByTagName('script');
-
-function __has_js_script(file)
-{
- var i;
- for (i=0; i<scripts.length; i++) {
- if (scripts[i].src.indexOf(file) > -1) {
- return true;
- } else {
- return false;
- }
- }
-}
-
-function __get_js_script(file)
-{
- var i;
- for (i=0; i<scripts.length; i++) {
- if (scripts[i].src.indexOf(file) > -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;
-