tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
Subject svn commit: r682495 - in /tuscany/java/sca/modules/domain-manager/src/main/resources: cloud.html composite.html files-gadget.html files.html home.html workspace.html
Date Mon, 04 Aug 2008 20:28:49 GMT
Author: jsdelfino
Date: Mon Aug  4 13:28:49 2008
New Revision: 682495

URL: http://svn.apache.org/viewvc?rev=682495&view=rev
Log:
Fixed Javascript warnings, use elementByID() to get references to UI elements instead of referencing
global variables directly.

Modified:
    tuscany/java/sca/modules/domain-manager/src/main/resources/cloud.html
    tuscany/java/sca/modules/domain-manager/src/main/resources/composite.html
    tuscany/java/sca/modules/domain-manager/src/main/resources/files-gadget.html
    tuscany/java/sca/modules/domain-manager/src/main/resources/files.html
    tuscany/java/sca/modules/domain-manager/src/main/resources/home.html
    tuscany/java/sca/modules/domain-manager/src/main/resources/workspace.html

Modified: tuscany/java/sca/modules/domain-manager/src/main/resources/cloud.html
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/domain-manager/src/main/resources/cloud.html?rev=682495&r1=682494&r2=682495&view=diff
==============================================================================
--- tuscany/java/sca/modules/domain-manager/src/main/resources/cloud.html (original)
+++ tuscany/java/sca/modules/domain-manager/src/main/resources/cloud.html Mon Aug  4 13:28:49
2008
@@ -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;

Modified: tuscany/java/sca/modules/domain-manager/src/main/resources/composite.html
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/domain-manager/src/main/resources/composite.html?rev=682495&r1=682494&r2=682495&view=diff
==============================================================================
--- tuscany/java/sca/modules/domain-manager/src/main/resources/composite.html (original)
+++ tuscany/java/sca/modules/domain-manager/src/main/resources/composite.html Mon Aug  4 13:28:49
2008
@@ -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;

Modified: tuscany/java/sca/modules/domain-manager/src/main/resources/files-gadget.html
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/domain-manager/src/main/resources/files-gadget.html?rev=682495&r1=682494&r2=682495&view=diff
==============================================================================
--- tuscany/java/sca/modules/domain-manager/src/main/resources/files-gadget.html (original)
+++ tuscany/java/sca/modules/domain-manager/src/main/resources/files-gadget.html Mon Aug 
4 13:28:49 2008
@@ -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();

Modified: tuscany/java/sca/modules/domain-manager/src/main/resources/files.html
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/domain-manager/src/main/resources/files.html?rev=682495&r1=682494&r2=682495&view=diff
==============================================================================
--- tuscany/java/sca/modules/domain-manager/src/main/resources/files.html (original)
+++ tuscany/java/sca/modules/domain-manager/src/main/resources/files.html Mon Aug  4 13:28:49
2008
@@ -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;
 	}

Modified: tuscany/java/sca/modules/domain-manager/src/main/resources/home.html
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/domain-manager/src/main/resources/home.html?rev=682495&r1=682494&r2=682495&view=diff
==============================================================================
--- tuscany/java/sca/modules/domain-manager/src/main/resources/home.html (original)
+++ tuscany/java/sca/modules/domain-manager/src/main/resources/home.html Mon Aug  4 13:28:49
2008
@@ -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;
 	}

Modified: tuscany/java/sca/modules/domain-manager/src/main/resources/workspace.html
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/domain-manager/src/main/resources/workspace.html?rev=682495&r1=682494&r2=682495&view=diff
==============================================================================
--- tuscany/java/sca/modules/domain-manager/src/main/resources/workspace.html (original)
+++ tuscany/java/sca/modules/domain-manager/src/main/resources/workspace.html Mon Aug  4 13:28:49
2008
@@ -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;



Mime
View raw message