-#
-# 2006-15-9
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-
-import time
-import BaseHTTPServer
-import sys, os
-
-import deluge
-
-
-# Constants
-
-HOST_NAME = 'localhost'
-PORT_NUMBER = 9999
-
-
-# WebUI Core class
-
-class WebUICore:
- def __init__(self):
- self.running = False
-
- def start(self):
- self.manager = deluge.manager("DE", "0511", "Deluge WebUI",
- os.path.expanduser("~") + "/Temp")#, blank_slate=True)
- self.running = True
-
- def quit(self):
- self.manager.quit()
- self.manager = None
-
- self.running = False
-
- def get_state(self):
- return self.manager.get_state()
-
-# print "# torrents:", manager.get_num_torrents()
-# for unique_ID in manager.get_unique_IDs():
-# print unique_ID, manager.get_torrent_state(unique_ID)
-# manager.handle_events()
-# print ""
-
-BUTTONS = { "Start" : WebUICore.start,
- "Quit" : WebUICore.quit }
-
-# WebUIHandler class - respond to http requests
-
-class WebUIHandler(BaseHTTPServer.BaseHTTPRequestHandler):
- def do_HEAD(self):
- self.send_response(200)
- self.send_header("Content-type", "text/html")
- self.end_headers()
-
- def do_GET(self):
- """Respond to a GET request."""
- self.send_response(200)
- self.send_header("Content-type", "text/html")
- self.end_headers()
-
- self.wfile.write("WebUI ")
-
- if not self.path[-(len(self.get_secret_str())):] == self.get_secret_str():
- self.wfile.write("Invalid access. Run 'webui SECRET', then access 'localhost:9999/?SECRET'.
")
- else:
- self.handle_request()
-
- self.wfile.write("")
-
- def handle_request(self):
- self.wfile.write("WebUI 0.5.1.1 ")
-
- command = self.path[1:self.path.find("?")]
- print command
- if command[:len("button")] == "button":
- # Execute button command
- command = command[len("button"):]
- BUTTONS[command](core)
-
- # Main screen
- self.write_buttons()
- if core.running:
- self.write_dict(core.get_state())
-
-# def get_self_ref(self):
-# return ""#self.client_address[0] + ":" + str(self.client_address[1]) + "/"
-
- def get_secret_str(self):
- return "?" + secret
-
- def write_buttons(self):
- self.wfile.write("")
-
- def write_dict(self, data):
- if data is not None:
- keys = data.keys()
- keys.sort()
-
- self.wfile.write("")
- for key in keys:
- self.wfile.write("" + key + " " + str(data[key]) + " ")
- self.wfile.write("
")
-
-
-########
-# Main #
-########
-
-print "-------------"
-print "WebUI 0.5.1.1"
-print "-------------"
-print ""
-
-try:
- secret = sys.argv[1]
-except IndexError:
- print "USAGE: 'webui.py S', where S is the secret password used to access WebUI via a browser"
- secret = ""
-
-if not secret == "":
- core = WebUICore()
-
- httpd = BaseHTTPServer.HTTPServer((HOST_NAME, PORT_NUMBER), WebUIHandler)
-
- print time.asctime(), "Server Started - %s:%s" % (HOST_NAME, PORT_NUMBER)
-
- try:
- httpd.serve_forever()
- except KeyboardInterrupt:
- pass
-
- print time.asctime(), "Server Stopped - %s:%s" % (HOST_NAME, PORT_NUMBER)
-
- core.quit()
diff --git a/webui/webuiserver.py b/webui/webuiserver.py
deleted file mode 100644
index 0a3c60759..000000000
--- a/webui/webuiserver.py
+++ /dev/null
@@ -1,211 +0,0 @@
-#
-# Copyright (c) 2006 Alon Zakai ('Kripken')
-#
-# 2006-15-9
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-
-# Docs:
-#
-# All httpserver-related issues are done through GET (html, javascript, css,
-# etc.). All torrentcore issues are doen through POST.
-#
-
-import time
-import BaseHTTPServer
-import sys, os
-import webbrowser
-
-sys.path.append("/media/sda2/svn/deluge-trac/trunk/library")
-
-import flood # or whatever the core is renamed to be
-import json
-
-# Constants
-
-HOST_NAME = 'localhost'
-PORT_NUMBER = 9999
-
-HTML_DIR = "www/com.WebUI.WebUIApp"
-
-HEADERS_TEXT = "text/plain"
-HEADERS_HTML = "text/html"
-HEADERS_CSS = "text/css"
-HEADERS_JS = "text/javascript"
-
-manager = None
-httpd = None
-
-class webuiServerHandler(BaseHTTPServer.BaseHTTPRequestHandler):
- def get_secret_str(self):
- return "?" + secret
-
- def pulse(self):
- global manager
-
- manager.handle_events()
-
- def write_headers(self, content_type, data_length=None):
- self.send_response(200)
- self.send_header("Content-type", content_type)
- if data_length is not None:
- self.send_header("Content-length", data_length)
- self.end_headers()
-
- def do_POST(self):
- global manager
-
- input_length = int(self.headers.get('Content-length'))
- command = self.rfile.read(input_length)
- print "POST command:", command
-
- if command == "quit":
- httpd.ready = False
-
-# self.write_headers(HEADERS_TEXT)
-# self.wfile.write("OK: quit")
- # List torrents, and pulse the heartbeat
- elif command == "list":
- self.pulse() # Start by ticking the clock
-
- data = []
- unique_IDs = manager.get_unique_IDs()
- for unique_ID in unique_IDs:
- temp = manager.get_torrent_state(unique_ID)
- temp["unique_ID"] = unique_ID # We add the unique_ID ourselves
- data.append(temp)
-
- self.write_headers(HEADERS_TEXT)
- self.wfile.write(json.write(data))
- else:
- # Basically we can just send Python commands, to be run in exec(command)... but that
- # would be slow, I guess
- print "UNKNOWN POST COMMAND:", command
-
- def do_GET(self):
-# self.wfile.write("webuiServer 0.5.1.1 ")
-
- print "Contacted from:", self.client_address
-
- if "?" in self.path:
- command = self.path[1:self.path.find("?")]
- else:
- command = self.path[1:]
-
- if command == "":
- command = "WebUI.html"
-
- if not self.path[-(len(self.get_secret_str())):] == self.get_secret_str():
- self.write_headers(HEADERS_HTML)
- self.wfile.write("webuiServer ")
- self.wfile.write("Invalid access. Run 'webuiserver SECRET', then access 'localhost:9999/?SECRET'.
")
- self.wfile.write("")
- return
-
- if "." in command:
- extension = command[command.rfind("."):]
- else:
- extension = ""
-
- print "Handling: ", self.path, ":", command, ":", extension
-
- try:
- filey = open("./" + HTML_DIR + "/" + command, 'rb')
- lines = filey.readlines()
- filey.close()
-
- data = "".join(lines)
-
- if extension == ".html":
- self.write_headers(HEADERS_HTML, len(data))
- elif extension == ".js":
- self.write_headers(HEADERS_JS, len(data))
- elif extension == ".css":
- self.write_headers(HEADERS_CSS, len(data))
- else:
- print "What is this?", extension
-
- self.wfile.write(data)
- except IOError:
- self.write_headers(HEADERS_HTML)
- self.wfile.write("webuiServer ")
- self.wfile.write("webuiServer 0.5.1.1 ")
- self.wfile.write("No such command: " + command)
-
-
-class webuiServer(BaseHTTPServer.HTTPServer):
- def serve_forever(self):
- self.ready = True
- while self.ready:
- self.handle_request()
- self.server_close()
-
-########
-# Main #
-########
-
-print "-------------------"
-print "webuiServer 0.5.1.1"
-print "-------------------"
-print ""
-
-try:
- secret = sys.argv[1]
-except IndexError:
- print "USAGE: 'webuiserver.py S', where S is the secret password used to access via a browser"
- secret = ""
-
-if not secret == "":
-
-# manager.add_torrent("xubuntu-6.10-desktop-i386.iso.torrent",
-# os.path.expanduser("~") + "/Temp", True)
-
- httpd = webuiServer((HOST_NAME, PORT_NUMBER), webuiServerHandler)
- print time.asctime(), "HTTP Server Started - %s:%s" % (HOST_NAME, PORT_NUMBER)
-
- manager = flood.manager("FL", "0500", "webui",
- os.path.expanduser("~") + "/Temp")#, blank_slate=True)
-
- webbrowser.open("localhost:9999/?" + secret)
-
- try:
- httpd.serve_forever()
- except KeyboardInterrupt:
- pass
-
- print time.asctime(), "HTTP Server Stopped - %s:%s" % (HOST_NAME, PORT_NUMBER)
-
- print "Shutting down manager..."
- manager.quit()
-
-
-### OLD
-# # Check if the manager is running
-# if not command == "init":
-# if manager is None:
-# self.write_headers(HEADERS_TEXT)
-# self.wfile.write("ERROR: manager is None")
-# return
-#
-# if command == "init":
-# if manager is not None:
-# print "ERROR: Trying to init, but already active"
-# return
-#
-# manager = webui.manager("FL", "0500", "webui",
-# os.path.expanduser("~") + "/Temp")#, blank_slate=True)
-# self.write_headers(HEADERS_TEXT)
-# self.wfile.write("OK: init")
diff --git a/webui/www/com.WebUI.WebUIApp/10953E833A2B9B18DAA93BB081DC8A7D.cache.html b/webui/www/com.WebUI.WebUIApp/10953E833A2B9B18DAA93BB081DC8A7D.cache.html
deleted file mode 100644
index 5163e1d44..000000000
--- a/webui/www/com.WebUI.WebUIApp/10953E833A2B9B18DAA93BB081DC8A7D.cache.html
+++ /dev/null
@@ -1,797 +0,0 @@
-
-
-
-This script is part of module
-com.WebUI.WebUIApp
-
diff --git a/webui/www/com.WebUI.WebUIApp/10953E833A2B9B18DAA93BB081DC8A7D.cache.xml b/webui/www/com.WebUI.WebUIApp/10953E833A2B9B18DAA93BB081DC8A7D.cache.xml
deleted file mode 100644
index 03ee61345..000000000
--- a/webui/www/com.WebUI.WebUIApp/10953E833A2B9B18DAA93BB081DC8A7D.cache.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/webui/www/com.WebUI.WebUIApp/11D20AAC454AFEE8A60D7380D38B0693.cache.html b/webui/www/com.WebUI.WebUIApp/11D20AAC454AFEE8A60D7380D38B0693.cache.html
deleted file mode 100644
index 41b3db173..000000000
--- a/webui/www/com.WebUI.WebUIApp/11D20AAC454AFEE8A60D7380D38B0693.cache.html
+++ /dev/null
@@ -1,800 +0,0 @@
-
-
-
-This script is part of module
-com.WebUI.WebUIApp
-
diff --git a/webui/www/com.WebUI.WebUIApp/11D20AAC454AFEE8A60D7380D38B0693.cache.xml b/webui/www/com.WebUI.WebUIApp/11D20AAC454AFEE8A60D7380D38B0693.cache.xml
deleted file mode 100644
index ad65ed482..000000000
--- a/webui/www/com.WebUI.WebUIApp/11D20AAC454AFEE8A60D7380D38B0693.cache.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/webui/www/com.WebUI.WebUIApp/6A33FFDB2E9418B40D144BFD01370A52.cache.html b/webui/www/com.WebUI.WebUIApp/6A33FFDB2E9418B40D144BFD01370A52.cache.html
deleted file mode 100644
index a94f4e078..000000000
--- a/webui/www/com.WebUI.WebUIApp/6A33FFDB2E9418B40D144BFD01370A52.cache.html
+++ /dev/null
@@ -1,797 +0,0 @@
-
-
-
-This script is part of module
-com.WebUI.WebUIApp
-
diff --git a/webui/www/com.WebUI.WebUIApp/6A33FFDB2E9418B40D144BFD01370A52.cache.xml b/webui/www/com.WebUI.WebUIApp/6A33FFDB2E9418B40D144BFD01370A52.cache.xml
deleted file mode 100644
index cc77b668d..000000000
--- a/webui/www/com.WebUI.WebUIApp/6A33FFDB2E9418B40D144BFD01370A52.cache.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/webui/www/com.WebUI.WebUIApp/C7527B531338C30501EFDC3455BB151E.cache.html b/webui/www/com.WebUI.WebUIApp/C7527B531338C30501EFDC3455BB151E.cache.html
deleted file mode 100644
index 5db1aff47..000000000
--- a/webui/www/com.WebUI.WebUIApp/C7527B531338C30501EFDC3455BB151E.cache.html
+++ /dev/null
@@ -1,797 +0,0 @@
-
-
-
-This script is part of module
-com.WebUI.WebUIApp
-
diff --git a/webui/www/com.WebUI.WebUIApp/C7527B531338C30501EFDC3455BB151E.cache.xml b/webui/www/com.WebUI.WebUIApp/C7527B531338C30501EFDC3455BB151E.cache.xml
deleted file mode 100644
index 6534357ad..000000000
--- a/webui/www/com.WebUI.WebUIApp/C7527B531338C30501EFDC3455BB151E.cache.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/webui/www/com.WebUI.WebUIApp/WebUI.css b/webui/www/com.WebUI.WebUIApp/WebUI.css
deleted file mode 100644
index 4f75caa73..000000000
--- a/webui/www/com.WebUI.WebUIApp/WebUI.css
+++ /dev/null
@@ -1,268 +0,0 @@
-body {
- background-color: white;
- color: black;
- font-family: Arial, sans-serif;
- font-size: medium;
- margin: 20px 20px 20px 20px;
-}
-
-code {
- font-size: small;
-}
-
-a {
- color: darkblue;
-}
-
-a:visited {
- color: darkblue;
-}
-
-.gwt-BorderedPanel {
-}
-
-.gwt-Button {
-}
-
-.gwt-Canvas {
-}
-
-.gwt-CheckBox {
- font-size: smaller;
-}
-
-.gwt-DialogBox {
- sborder: 8px solid #C3D9FF;
- border: 2px outset;
- background-color: white;
-}
-
-.gwt-DialogBox .Caption {
- background-color: #C3D9FF;
- padding: 3px;
- margin: 2px;
- font-weight: bold;
- cursor: default;
-}
-
-.gwt-FileUpload {
-}
-
-.gwt-Frame {
-}
-
-.gwt-HorizontalSplitter .Bar {
- width: 8px;
- background-color: #C3D9FF;
-}
-
-.gwt-VerticalSplitter .Bar {
- height: 8px;
- background-color: #C3D9FF;
-}
-
-.gwt-HTML {
- font-size: small;
-}
-
-.gwt-Hyperlink {
-}
-
-.gwt-Image {
-}
-
-.gwt-Label {
- font-size: medium;
-}
-
-.gwt-ListBox {
-}
-
-.gwt-MenuBar {
- background-color: #C3D9FF;
- border: 1px solid #87B3FF;
- cursor: default;
-}
-
-.gwt-MenuBar .gwt-MenuItem {
- padding: 1px 4px 1px 4px;
- font-size: medium;
- cursor: default;
-}
-
-.gwt-MenuBar .gwt-MenuItem-selected {
- background-color: #E8EEF7;
-}
-
-.gwt-PasswordTextBox {
-}
-
-.gwt-RadioButton {
- font-size: smaller;
-}
-
-.gwt-TabPanel {
-}
-
-.gwt-TabPanelBottom {
- border-left: 1px solid #87B3FF;
-}
-
-.gwt-TabBar {
- background-color: #C3D9FF;
- font-size: smaller;
-}
-
-.gwt-TabBar .gwt-TabBarFirst {
- height: 100%;
- border-bottom: 1px solid #87B3FF;
- padding-left: 3px;
-}
-
-.gwt-TabBar .gwt-TabBarRest {
- border-bottom: 1px solid #87B3FF;
- padding-right: 3px;
-}
-
-.gwt-TabBar .gwt-TabBarItem {
- border-top: 1px solid #C3D9FF;
- border-bottom: 1px solid #87B3FF;
- padding: 2px;
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-TabBar .gwt-TabBarItem-selected {
- font-weight: bold;
- background-color: #E8EEF7;
- border-top: 1px solid #87B3FF;
- border-left: 1px solid #87B3FF;
- border-right: 1px solid #87B3FF;
- border-bottom: 1px solid #E8EEF7;
- padding: 2px;
- cursor: default;
-}
-
-.gwt-TextArea {
-}
-
-.gwt-TextBox {
-}
-
-.gwt-Tree {
-}
-
-.gwt-Tree .gwt-TreeItem {
- font-size: smaller;
-}
-
-.gwt-Tree .gwt-TreeItem-selected {
- background-color: #C3D9FF;
-}
-
-.gwt-StackPanel {
-}
-
-.gwt-StackPanel .gwt-StackPanelItem {
- background-color: #C3D9FF;
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-StackPanel .gwt-StackPanelItem-selected {
-}
-
-.webui-Info {
- background-color: #C3D9FF;
- padding: 10px 10px 2px 10px;
- font-size: smaller;
-}
-
-/* --------------------------------------------------------------------------
-.ks-Sink {
- border: 8px solid #C3D9FF;
- background-color: #E8EEF7;
- width: 100%;
- height: 24em;
-}
-
-
-.ks-List {
- margin-top: 8px;
- margin-bottom: 8px;
- font-size: smaller;
-}
-
-.ks-List .ks-SinkItem {
- width: 100%;
- padding: 0.3em;
- padding-right: 16px;
- cursor: pointer;
- cursor: hand;
-}
-
-.ks-List .ks-SinkItem-selected {
- background-color: #C3D9FF;
-}
-
-.ks-images-Image {
- margin: 8px;
-}
-
-.ks-images-Button {
- margin: 8px;
- cursor: pointer;
- cursor: hand;
-}
-
-.ks-layouts {
- margin: 8px;
-}
-
-.ks-layouts-Label {
- background-color: #C3D9FF;
- font-weight: bold;
- margin-top: 1em;
- padding: 2px 0px 2px 0px;
- width: 100%;
-}
-
-.ks-layouts-Scroller {
- height: 128px;
- border: 2px solid #C3D9FF;
- padding: 8px;
- margin: 8px;
-}
-
-.ks-popups-Popup {
- background-color: white;
- border: 1px solid #87B3FF;
- padding: 4px;
-}
-
-.infoProse {
- margin: 8px;
-}
-
-------*/
-
-table.torrentlist {
- margin: 1ex 0ex 1ex 0ex;
-// border-spacing: 5.5ex 5.5ex 6.5ex 5.5ex;
- border: medium solid black;
-// border-color: black;
-}
-
-table.torrentlist td {
-// border: 50em;
- padding: 1ex;
-}
-
-.torrentList-Title {
- background-color: rgb(175,175,255);
-}
-
-.torrentList-SelectedRow {
- background-color: rgb(140,140,255);
-}
-
diff --git a/webui/www/com.WebUI.WebUIApp/WebUI.html b/webui/www/com.WebUI.WebUIApp/WebUI.html
deleted file mode 100644
index 296c6b368..000000000
--- a/webui/www/com.WebUI.WebUIApp/WebUI.html
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-
-
-
- WebUI 0.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/webui/www/com.WebUI.WebUIApp/com.WebUI.WebUIApp.nocache.html b/webui/www/com.WebUI.WebUIApp/com.WebUI.WebUIApp.nocache.html
deleted file mode 100644
index 693952658..000000000
--- a/webui/www/com.WebUI.WebUIApp/com.WebUI.WebUIApp.nocache.html
+++ /dev/null
@@ -1,118 +0,0 @@
-
-
-
-This script is part of module com.WebUI.WebUIApp
-
-
diff --git a/webui/www/com.WebUI.WebUIApp/gwt.js b/webui/www/com.WebUI.WebUIApp/gwt.js
deleted file mode 100644
index 916359fdd..000000000
--- a/webui/www/com.WebUI.WebUIApp/gwt.js
+++ /dev/null
@@ -1,578 +0,0 @@
-// Copyright 2006 Google Inc. All Rights Reserved.
-// This startup script should be included in host pages either just after
-// or inside the after module tags.
-//
-
-//////////////////////////////////////////////////////////////////////////////
-// DynamicResources
-//
-
-function DynamicResources() {
- this.pendingElemsBySrc_ = {};
- this.pendingScriptElems_ = new Array();
-}
-DynamicResources.prototype = {};
-
-// The array is set up such that, pairwise, the entries are (src, readyFnStr).
-// Called once for each module that is attached to the host page.
-// It is theoretically possible that addScripts() could be called reentrantly
-// if the browser event loop is pumped during this function and an iframe loads;
-// we may want to enhance this method in the future to support that case.
-DynamicResources.prototype.addScripts = function(scriptArray, insertBeforeElem) {
- var wasEmpty = (this.pendingScriptElems_.length == 0);
- var anyAdded = false;
- for (var i = 0, n = scriptArray.length; i < n; i += 2) {
- var src = scriptArray[i];
- if (this.pendingElemsBySrc_[src]) {
- // Don't load the same script twice.
- continue;
- }
- // Set up the element but don't add it to the DOM until its turn.
- anyAdded = true;
- var e = document.createElement("script");
- this.pendingElemsBySrc_[src] = e;
- var readyFn;
- eval("readyFn = " + scriptArray[i+1]);
- e.__readyFn = readyFn;
- e.type = "text/javascript";
- e.src = src;
- e.__insertBeforeElem = insertBeforeElem;
- this.pendingScriptElems_ = this.pendingScriptElems_.concat(e);
- }
-
- if (wasEmpty && anyAdded) {
- // Kickstart.
- this.injectScript(this.pendingScriptElems_[0]);
- }
-}
-
-DynamicResources.prototype.injectScript = function(scriptElem) {
- var parentElem = scriptElem.__insertBeforeElem.parentNode;
- parentElem.insertBefore(scriptElem, scriptElem.__insertBeforeElem);
-}
-
-DynamicResources.prototype.addStyles = function(styleSrcArray, insertBeforeElem) {
- var parent = insertBeforeElem.parentNode;
- for (var i = 0, n = styleSrcArray.length; i < n; ++i) {
- var src = styleSrcArray[i];
- if (this.pendingElemsBySrc_[src])
- continue;
- var e = document.createElement("link");
- this.pendingElemsBySrc_[src] = e;
- e.type = "text/css";
- e.rel = "stylesheet";
- e.href = src;
- parent.insertBefore(e, insertBeforeElem);
- }
-}
-
-DynamicResources.prototype.isReady = function() {
- var elems = this.pendingScriptElems_;
- if (elems.length > 0) {
- var e = elems[0];
- if (!e.__readyFn()) {
- // The pending script isn't ready yet.
- return false;
- }
-
- // The pending script has now finished loading. Enqueue the next, if any.
- e.__readyFn = null;
- elems.shift();
- if (elems.length > 0) {
- // There is another script.
- this.injectScript(elems[0]);
- return false;
- }
- }
-
- // There are no more pending scripts.
- return true;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// ModuleControlBlock
-//
-function ModuleControlBlock(metaElem, rawName) {
- var parts = ["", rawName];
- var i = rawName.lastIndexOf("=");
- if (i != -1) {
- parts[0] = rawName.substring(0, i) + '/';
- parts[1] = rawName.substring(i+1);
- }
-
- this.metaElem_ = metaElem;
- this.baseUrl_ = parts[0];
- this.name_ = parts[1];
- this.compilationLoaded_ = false;
- this.frameWnd_ = null;
-}
-ModuleControlBlock.prototype = {};
-
-/**
- * Determines whether this module is fully loaded and ready to run.
- */
-ModuleControlBlock.prototype.isReady = function() {
- return this.compilationLoaded_;
-};
-
-/**
- * Called when the compilation for this module is loaded.
- */
-ModuleControlBlock.prototype.compilationLoaded = function(frameWnd) {
- this.frameWnd_ = frameWnd;
- this.compilationLoaded_ = true;
-}
-
-/**
- * Gets the logical module name, not including a base url prefix if one was
- * specified.
- */
-ModuleControlBlock.prototype.getName = function() {
- return this.name_;
-}
-
-/**
- * Gets the base URL of the module, guaranteed to end with a slash.
- */
-ModuleControlBlock.prototype.getBaseURL = function() {
- return this.baseUrl_;
-}
-
-/**
- * Gets the window of the module's frame.
- */
-ModuleControlBlock.prototype.getModuleFrameWindow = function() {
- return this.frameWnd_;
-}
-
-/**
- * Injects a set of dynamic scripts.
- * The array is set up such that, pairwise, the entries are (src, readyFnStr).
- */
-ModuleControlBlock.prototype.addScripts = function(scriptSrcArray) {
- return ModuleControlBlocks.dynamicResources_.addScripts(scriptSrcArray, this.metaElem_);
-}
-
-/**
- * Injects a set of dynamic styles.
- */
-ModuleControlBlock.prototype.addStyles = function(styleSrcArray) {
- return ModuleControlBlocks.dynamicResources_.addStyles(styleSrcArray, this.metaElem_);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// ModuleControlBlocks
-//
-function ModuleControlBlocks() {
- this.blocks_ = [];
-}
-ModuleControlBlocks.dynamicResources_ = new DynamicResources(); // "static"
-ModuleControlBlocks.prototype = {};
-
-/**
- * Adds a module control control block for the named module.
- * @param metaElem the meta element that caused the module to be added
- * @param name the name of the module being added, optionally preceded by
- * an alternate base url of the form "_path_=_module_".
- */
-ModuleControlBlocks.prototype.add = function(metaElem, name) {
- var mcb = new ModuleControlBlock(metaElem, name);
- this.blocks_ = this.blocks_.concat(mcb);
-};
-
-/**
- * Determines whether all the modules are loaded and ready to run.
- */
-ModuleControlBlocks.prototype.isReady = function() {
- for (var i = 0, n = this.blocks_.length; i < n; ++i) {
- var mcb = this.blocks_[i];
- if (!mcb.isReady()) {
- return false;
- }
- }
-
- // Are there any pending dynamic resources (e.g. styles, scripts)?
- if (!ModuleControlBlocks.dynamicResources_.isReady()) {
- // No, we're still waiting on one or more dynamic resources.
- return false;
- }
-
- return true;
-}
-
-/**
- * Determines whether there are any module control blocks.
- */
-ModuleControlBlocks.prototype.isEmpty = function() {
- return this.blocks_.length == 0;
-}
-
-/**
- * Gets the module control block at the specified index.
- */
-ModuleControlBlocks.prototype.get = function(index) {
- return this.blocks_[index];
-}
-
-/**
- * Injects an iframe for each module.
- */
-ModuleControlBlocks.prototype.injectFrames = function() {
- for (var i = 0, n = this.blocks_.length; i < n; ++i) {
- var mcb = this.blocks_[i];
-
- // Insert an iframe for the module
- var iframe = document.createElement("iframe");
- var selectorUrl = mcb.getBaseURL() + mcb.getName() + ".nocache.html";
- selectorUrl += "?" + (__gwt_isHosted() ? "h&" : "" ) + i;
- var unique = new Date().getTime();
- selectorUrl += "&" + unique;
- iframe.style.border = '0px';
- iframe.style.width = '0px';
- iframe.style.height = '0px';
-
- // Fragile browser-specific ordering issues below
-
-/*@cc_on
- // prevent extra clicky noises on IE
- iframe.src = selectorUrl;
-@*/
-
- if (document.body.firstChild) {
- document.body.insertBefore(iframe, document.body.firstChild);
- } else {
- document.body.appendChild(iframe);
- }
-
-/*@cc_on
- // prevent extra clicky noises on IE
- return;
-@*/
-
- if (iframe.contentWindow) {
- // Older Mozilla has a caching bug for the iframe and won't reload the nocache.
- iframe.contentWindow.location.replace(selectorUrl);
- } else {
- // Older Safari doesn't have a contentWindow.
- iframe.src = selectorUrl;
- }
- }
-}
-
-/**
- * Runs the entry point for each module.
- */
-ModuleControlBlocks.prototype.run = function() {
- for (var i = 0, n = this.blocks_.length; i < n; ++i) {
- var mcb = this.blocks_[i];
- var name = mcb.getName();
- var frameWnd = mcb.getModuleFrameWindow();
- if (__gwt_isHosted()) {
- if (!window.external.gwtOnLoad(frameWnd, name)) {
- // Module failed to load.
- if (__gwt_onLoadError) {
- __gwt_onLoadError(name);
- } else {
- window.alert("Failed to load module '" + name +
- "'.\nPlease see the log in the development shell for details.");
- }
- }
- } else {
- // The compilation itself handles calling the error function.
- frameWnd.gwtOnLoad(__gwt_onLoadError, name);
- }
- }
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// Globals
-//
-
-var __gwt_retryWaitMillis = 10;
-var __gwt_isHostPageLoaded = false;
-var __gwt_metaProps = {};
-var __gwt_onPropertyError = null;
-var __gwt_onLoadError = null;
-var __gwt_moduleControlBlocks = new ModuleControlBlocks();
-
-//////////////////////////////////////////////////////////////////////////////
-// Common
-//
-
-/**
- * Determines whether or not the page is being loaded in the GWT hosted browser.
- */
-function __gwt_isHosted() {
- if (window.external && window.external.gwtOnLoad) {
- // gwt.hybrid makes the hosted browser pretend not to be
- if (document.location.href.indexOf("gwt.hybrid") == -1) {
- return true;
- }
- }
- return false;
-}
-
-/**
- * Tries to get a module control block based on a query string passed in from
- * the caller. Used by iframes to get references back to their mcbs.
- * @param queryString the entire query string as returned by location.search,
- * which notably includes the leading '?' if one is specified
- * @return the relevant module control block, or null
if it cannot
- * be derived based on queryString
- */
-function __gwt_tryGetModuleControlBlock(queryString) {
- if (queryString.length > 0) {
- // The pattern is ?[h&][&]
- var queryString = queryString.substring(1);
- if (queryString.indexOf("h&") == 0) {
- // Ignore the hosted mode flag here; only GWTShellServlet cares about it.
- queryString = queryString.substring(2);
- }
- var pos = queryString.indexOf("&");
- if (pos >= 0) {
- queryString = queryString.substring(0, pos);
- }
- var mcbIndex = parseInt(queryString);
- if (!isNaN(mcbIndex)) {
- var mcb = __gwt_moduleControlBlocks.get(mcbIndex);
- return mcb;
- }
- // Ignore the unique number that remains on the query string.
- }
- return null;
-}
-
-/**
- * Parses meta tags from the host html.
- *
- *
- * causes the specified module to be loaded
- *
- *
- * statically defines a deferred binding client property
- *
- *
- * specifies the name of a function to call if a client property is set to
- * an invalid value (meaning that no matching compilation will be found)
- *
- *
- * specifies the name of a function to call if an exception happens during
- * bootstrapping or if a module throws an exception out of onModuleLoad();
- * the function should take a message parameter
- */
-function __gwt_processMetas() {
- var metas = document.getElementsByTagName("meta");
- for (var i = 0, n = metas.length; i < n; ++i) {
- var meta = metas[i];
- var name = meta.getAttribute("name");
- if (name) {
- if (name == "gwt:module") {
- var moduleName = meta.getAttribute("content");
- if (moduleName) {
- __gwt_moduleControlBlocks.add(meta, moduleName);
- }
- } else if (name == "gwt:property") {
- var content = meta.getAttribute("content");
- if (content) {
- var name = content, value = "";
- var eq = content.indexOf("=");
- if (eq != -1) {
- name = content.substring(0, eq);
- value = content.substring(eq+1);
- }
- __gwt_metaProps[name] = value;
- }
- } else if (name == "gwt:onPropertyErrorFn") {
- var content = meta.getAttribute("content");
- if (content) {
- try {
- __gwt_onPropertyError = eval(content);
- } catch (e) {
- window.alert("Bad handler \"" + content +
- "\" for \"gwt:onPropertyErrorFn\"");
- }
- }
- } else if (name == "gwt:onLoadErrorFn") {
- var content = meta.getAttribute("content");
- if (content) {
- try {
- __gwt_onLoadError = eval(content);
- } catch (e) {
- window.alert("Bad handler \"" + content +
- "\" for \"gwt:onLoadErrorFn\"");
- }
- }
- }
- }
- }
-}
-
-/**
- * Determines the value of a deferred binding client property specified
- * statically in host html.
- */
-function __gwt_getMetaProperty(name) {
- var value = __gwt_metaProps[name];
- if (value) {
- return value;
- } else {
- return null;
- }
-}
-
-/**
- * Determines whether or not a particular property value is allowed.
- * @param wnd the caller's window object (not $wnd!)
- * @param propName the name of the property being checked
- * @param propValue the property value being tested
- */
-function __gwt_isKnownPropertyValue(wnd, propName, propValue) {
- return propValue in wnd["values$" + propName];
-}
-
-/**
- * Called by the selection script when a property has a bad value or is missing.
- * 'allowedValues' is an array of strings. Can be hooked in the host page using
- * gwt:onPropertyErrorFn.
- */
-function __gwt_onBadProperty(moduleName, propName, allowedValues, badValue) {
- if (__gwt_onPropertyError) {
- __gwt_onPropertyError(moduleName, propName, allowedValues, badValue);
- return;
- } else {
- var msg = "While attempting to load module \"" + moduleName + "\", ";
- if (badValue != null) {
- msg += "property \"" + propName + "\" was set to the unexpected value \""
- + badValue + "\"";
- } else {
- msg += "property \"" + propName + "\" was not specified";
- }
-
- msg += "\n\nAllowed values: " + allowedValues;
-
- window.alert(msg);
- }
-}
-
-/**
- * Called directly from compiled code.
- */
-function __gwt_initHandlers(resize, beforeunload, unload) {
- var oldOnResize = window.onresize;
- window.onresize = function() {
- resize();
- if (oldOnResize)
- oldOnResize();
- };
-
- var oldOnBeforeUnload = window.onbeforeunload;
- window.onbeforeunload = function() {
- var ret = beforeunload();
-
- var oldRet;
- if (oldOnBeforeUnload)
- oldRet = oldOnBeforeUnload();
-
- if (ret !== null)
- return ret;
- return oldRet;
- };
-
- var oldOnUnload = window.onunload;
- window.onunload = function() {
- unload();
- if (oldOnUnload)
- oldOnUnload();
- };
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// Hosted Mode
-//
-function __gwt_onUnloadHostedMode() {
- window.external.gwtOnLoad(null, null);
- if (__gwt_onUnloadHostedMode.oldUnloadHandler) {
- __gwt_onUnloadHostedMode.oldUnloadHandler();
- }
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// Bootstrap
-//
-
-/**
- * Waits until all startup preconditions are satisfied, then launches the
- * user-defined startup code for each module.
- */
-function __gwt_latchAndLaunch() {
- var ready = true;
-
- // Are there any compilations still pending?
- if (ready && !__gwt_moduleControlBlocks.isReady()) {
- // Yes, we're still waiting on one or more compilations.
- ready = false;
- }
-
- // Has the host html onload event fired?
- if (ready && !__gwt_isHostPageLoaded) {
- // No, the host html page hasn't fully loaded.
- ready = false;
- }
-
- // Are we ready to run user code?
- if (ready) {
- // Yes: run entry points.
- __gwt_moduleControlBlocks.run();
- } else {
- // No: try again soon.
- window.setTimeout(__gwt_latchAndLaunch, __gwt_retryWaitMillis);
- }
-}
-
-/**
- * Starts the module-loading sequence after meta tags have been processed and
- * the body element exists.
- */
-function __gwt_loadModules() {
- // Make sure the body element exists before starting.
- if (!document.body) {
- // Try again soon.
- window.setTimeout(__gwt_loadModules, __gwt_retryWaitMillis);
- return;
- }
-
- // Inject a frame for each module.
- __gwt_moduleControlBlocks.injectFrames();
-
- // Try to launch module entry points once everything is ready.
- __gwt_latchAndLaunch();
-}
-
-/**
- * The very first thing to run, and it runs exactly once unconditionally.
- */
-function __gwt_bootstrap() {
- // Hook onunload for hosted mode.
- if (__gwt_isHosted()) {
- __gwt_onUnloadHostedMode.oldUnloadHandler = window.onunload;
- window.onunload = __gwt_onUnloadHostedMode;
- }
-
- // Hook the current window onload handler.
- var oldHandler = window.onload;
- window.onload = function() {
- __gwt_isHostPageLoaded = true;
- if (oldHandler) {
- oldHandler();
- }
- };
-
- // Parse meta tags from host html.
- __gwt_processMetas();
-
- // Load any modules.
- __gwt_loadModules();
-}
-
-// Go.
-__gwt_bootstrap();
diff --git a/webui/www/com.WebUI.WebUIApp/history.html b/webui/www/com.WebUI.WebUIApp/history.html
deleted file mode 100644
index 409eaf2dc..000000000
--- a/webui/www/com.WebUI.WebUIApp/history.html
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/webui/www/com.WebUI.WebUIApp/tree_closed.gif b/webui/www/com.WebUI.WebUIApp/tree_closed.gif
deleted file mode 100644
index 1348f450c..000000000
Binary files a/webui/www/com.WebUI.WebUIApp/tree_closed.gif and /dev/null differ
diff --git a/webui/www/com.WebUI.WebUIApp/tree_open.gif b/webui/www/com.WebUI.WebUIApp/tree_open.gif
deleted file mode 100644
index c1ff81f40..000000000
Binary files a/webui/www/com.WebUI.WebUIApp/tree_open.gif and /dev/null differ
diff --git a/webui/www/com.WebUI.WebUIApp/tree_white.gif b/webui/www/com.WebUI.WebUIApp/tree_white.gif
deleted file mode 100644
index ce4881fda..000000000
Binary files a/webui/www/com.WebUI.WebUIApp/tree_white.gif and /dev/null differ