[esb-java-dev] svn commit r779 - trunk/esb/java/modules/distribution/src/main/www/extensions/core/js

svn at wso2.org svn at wso2.org
Tue Feb 6 20:36:49 PST 2007


Author: ruwan
Date: Tue Feb  6 20:36:31 2007
New Revision: 779

Modified:
   trunk/esb/java/modules/distribution/src/main/www/extensions/core/js/_proxyservices.js
Log:
fixing proxy edit bugs

Modified: trunk/esb/java/modules/distribution/src/main/www/extensions/core/js/_proxyservices.js
==============================================================================
--- trunk/esb/java/modules/distribution/src/main/www/extensions/core/js/_proxyservices.js	(original)
+++ trunk/esb/java/modules/distribution/src/main/www/extensions/core/js/_proxyservices.js	Tue Feb  6 20:36:31 2007
@@ -675,7 +675,15 @@
     proxydatacollect["step2"]();
     internalmodel.proxy.appendChild(
             createesbelement("<syn:property name='' value='' xmlns:syn='http://ws.apache.org/ns/synapse'/>"));
-    editproxysteps(document.getElementById("proxystepdiv" + 2), 2);
+    addeditwrapper(2);
+}
+
+function addeditwrapper(index) {
+    if(doingadd) {
+        editproxysteps(document.getElementById("addproxystep"), index);
+    } else {
+        editproxysteps(document.getElementById("proxystepdiv" + index), index);
+    }
 }
 
 function deleteproxyparameter(name) {
@@ -684,7 +692,7 @@
     
     deleteproperty(name);
 
-    editproxysteps(document.getElementById("proxystepdiv" + 2), 2);
+    addeditwrapper(2);
 }
 
 function deleteproperty(name) {
@@ -704,6 +712,11 @@
 function addpolicyview() {
     var objdiv = document.getElementById("proxypolicydiv");
 
+//    objdiv.innerHTML = "<label>Policy Key</label><div id='propertyset' class='property-set'/>";
+//
+//    populatePropertySet("propertyset", "");
+//
+//    objdiv.innerHTML += "<br/><input type='button' onclick='addpolicy()' value='Add Policy'/>";
     // todo: replace with the propper control
     objdiv.innerHTML = "<label>Policy Key </label><input type='text' id='policykey'/><br/><br/>"
             + "<input type='button' onclick='addpolicy()' value='Add Policy'/>";
@@ -713,7 +726,7 @@
     
     proxydatacollect["step3"]();
 
-    editproxysteps(document.getElementById("proxystepdiv" + 3), 3);
+    addeditwrapper(3);
 }
 
 function removepolicy(key) {
@@ -727,7 +740,7 @@
         internalmodel.proxy.removeChild(policies[i]);
     }
 
-    editproxysteps(document.getElementById("proxystepdiv" + 3), 3);
+    addeditwrapper(3);
 }
 
 function removewsdl() {
@@ -743,7 +756,7 @@
         internalmodel.proxy.removeChild(wsdl[0]);
     }
 
-    editproxysteps(document.getElementById("proxystepdiv" + 4), 4);
+    addeditwrapper(4);
 }
 
 function newwsdl() {
@@ -774,5 +787,5 @@
                 + wsdl.value + "' xmlns:syn='http://ws.apache.org/ns/synapse'/>"));
     }
 
-    editproxysteps(document.getElementById("proxystepdiv" + 4), 4);
+    addeditwrapper(4);
 }
\ No newline at end of file




More information about the Esb-java-dev mailing list