summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-08-04 20:28:49 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-08-04 20:28:49 +0000
commitff9b4c1eb95ff546aba7d325c6579c69757f6799 (patch)
treeea1cdef4a82787674453fc16137e52880c93cbb2 /java
parentb4384d70fc8c4dc583f0677a94372efa054d6516 (diff)
Fixed Javascript warnings, use elementByID() to get references to UI elements instead of referencing global variables directly.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@682495 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r--java/sca/modules/domain-manager/src/main/resources/cloud.html6
-rw-r--r--java/sca/modules/domain-manager/src/main/resources/composite.html6
-rw-r--r--java/sca/modules/domain-manager/src/main/resources/files-gadget.html11
-rw-r--r--java/sca/modules/domain-manager/src/main/resources/files.html8
-rw-r--r--java/sca/modules/domain-manager/src/main/resources/home.html8
-rw-r--r--java/sca/modules/domain-manager/src/main/resources/workspace.html6
6 files changed, 41 insertions, 4 deletions
diff --git a/java/sca/modules/domain-manager/src/main/resources/cloud.html b/java/sca/modules/domain-manager/src/main/resources/cloud.html
index 2a64f91f54..d661d5d38b 100644
--- a/java/sca/modules/domain-manager/src/main/resources/cloud.html
+++ b/java/sca/modules/domain-manager/src/main/resources/cloud.html
@@ -44,6 +44,12 @@
</body>
<script type="text/javascript">
+ var toolbarGadgetDiv = elementByID(document, 'toolbarGadgetDiv');
+ var cloudGadgetDiv = elementByID(document, 'cloudGadgetDiv');
+
+ var toolbarGadget = elementByID(document, 'toolbarGadget');
+ var cloudGadget = elementByID(document, 'cloudGadget');
+
function ongadget(win, doc) {
if (doc == content(toolbarGadget)) {
toolbarGadgetDiv.innerHTML = doc.body.innerHTML;
diff --git a/java/sca/modules/domain-manager/src/main/resources/composite.html b/java/sca/modules/domain-manager/src/main/resources/composite.html
index f7fcec868f..b0631e1d66 100644
--- a/java/sca/modules/domain-manager/src/main/resources/composite.html
+++ b/java/sca/modules/domain-manager/src/main/resources/composite.html
@@ -44,6 +44,12 @@
</body>
<script type="text/javascript">
+ var toolbarGadgetDiv = elementByID(document, 'toolbarGadgetDiv');
+ var compositeGadgetDiv = elementByID(document, 'compositeGadgetDiv');
+
+ var toolbarGadget = elementByID(document, 'toolbarGadget');
+ var compositeGadget = elementByID(document, 'compositeGadget');
+
function ongadget(win, doc) {
if (doc == content(toolbarGadget)) {
toolbarGadgetDiv.innerHTML = doc.body.innerHTML;
diff --git a/java/sca/modules/domain-manager/src/main/resources/files-gadget.html b/java/sca/modules/domain-manager/src/main/resources/files-gadget.html
index b5f36782b7..e1c337f327 100644
--- a/java/sca/modules/domain-manager/src/main/resources/files-gadget.html
+++ b/java/sca/modules/domain-manager/src/main/resources/files-gadget.html
@@ -54,10 +54,13 @@
</body>
<script type="text/javascript">
- var gadget = gadget(window, document);
-
//@Reference
var files = new Reference("files");
+
+ var gadget = gadget(window, document);
+
+ var filesElement = elementByID(gadget, 'files');
+ var uploadFileForm = elementByID(gadget, 'uploadFileForm');
function getFiles() {
files.get("", getFilesResponse);
@@ -74,7 +77,7 @@
'<a href=\"' + location + '\">' + id + '</a></td></tr>';
}
list += "</table>";
- gadget.getElementById("files").innerHTML = list;
+ filesElement.innerHTML = list;
}
}
@@ -93,7 +96,7 @@
}
function uploadFile() {
- gadget.uploadFileForm.submit();
+ uploadFileForm.submit();
}
getFiles();
diff --git a/java/sca/modules/domain-manager/src/main/resources/files.html b/java/sca/modules/domain-manager/src/main/resources/files.html
index defcaae9be..37d89e7665 100644
--- a/java/sca/modules/domain-manager/src/main/resources/files.html
+++ b/java/sca/modules/domain-manager/src/main/resources/files.html
@@ -44,11 +44,19 @@
</body>
<script type="text/javascript">
+ var toolbarGadgetDiv = elementByID(document, 'toolbarGadgetDiv');
+ var filesGadgetDiv = elementByID(document, 'filesGadgetDiv');
+
+ var toolbarGadget = elementByID(document, 'toolbarGadget');
+ var filesGadget = elementByID(document, 'filesGadget');
+
function ongadget(win, doc) {
if (doc == content(toolbarGadget)) {
toolbarGadgetDiv.innerHTML = doc.body.innerHTML;
+ return toolbarGadgetDiv;
} else if (doc == content(filesGadget)) {
filesGadgetDiv.innerHTML = doc.body.innerHTML;
+ return filesGadgetDiv;
}
return document;
}
diff --git a/java/sca/modules/domain-manager/src/main/resources/home.html b/java/sca/modules/domain-manager/src/main/resources/home.html
index 0274799de4..aad1856621 100644
--- a/java/sca/modules/domain-manager/src/main/resources/home.html
+++ b/java/sca/modules/domain-manager/src/main/resources/home.html
@@ -44,11 +44,19 @@
</body>
<script type="text/javascript">
+ var toolbarGadgetDiv = elementByID(document, 'toolbarGadgetDiv');
+ var homeGadgetDiv = elementByID(document, 'homeGadgetDiv');
+
+ var toolbarGadget = elementByID(document, 'toolbarGadget');
+ var homeGadget = elementByID(document, 'homeGadget');
+
function ongadget(win, doc) {
if (doc == content(toolbarGadget)) {
toolbarGadgetDiv.innerHTML = doc.body.innerHTML;
+ return toolbarGadgetDiv;
} else if (doc == content(homeGadget)) {
homeGadgetDiv.innerHTML = doc.body.innerHTML;
+ return homeGadgetDiv;
}
return document;
}
diff --git a/java/sca/modules/domain-manager/src/main/resources/workspace.html b/java/sca/modules/domain-manager/src/main/resources/workspace.html
index 9d40a2ecc6..36c02ab1e6 100644
--- a/java/sca/modules/domain-manager/src/main/resources/workspace.html
+++ b/java/sca/modules/domain-manager/src/main/resources/workspace.html
@@ -43,6 +43,12 @@
</body>
<script type="text/javascript">
+ var toolbarGadgetDiv = elementByID(document, 'toolbarGadgetDiv');
+ var workspaceGadgetDiv = elementByID(document, 'workspaceGadgetDiv');
+
+ var toolbarGadget = elementByID(document, 'toolbarGadget');
+ var workspaceGadget = elementByID(document, 'workspaceGadget');
+
function ongadget(win, doc) {
if (doc == content(toolbarGadget)) {
toolbarGadgetDiv.innerHTML = doc.body.innerHTML;