]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/uwobo-panel/control.js
ocaml 3.09 transition
[helm.git] / helm / uwobo-panel / control.js
index e9376ec97c8b52cb2aa7cbf5155387d1c4b2719c..9858fe1400c6d8a53f8a8e27d2b089ca37b33154 100644 (file)
@@ -15,17 +15,17 @@ function getParam(name, def)
 
 function getInitialPort()
 {
-  return "68080";
+  return "38080";
 }
 
 function getInitialProcessorURL()
 {
-  return getParam("processorURL", "http://phd.cs.unibo.it:8080/helm/servlet/uwobo/");
+  return getParam("processorURL", "http://mowgli.cs.unibo.it:58080/");
 }
 
 function getInitialGetterURL()
 {
-  return getParam("getterURL", "http://phd.cs.unibo.it:8081/");
+  return getParam("getterURL", "http://mowgli.cs.unibo.it:58081/");
 }
 
 function getUwoboURL()
@@ -43,7 +43,7 @@ function selectUwoboURL(ss)
   if (ss.selectedIndex == 0) {
     document.uwoboURL.elements[0].value = "";
   } else {
-    document.uwoboURL.elements[0].value = "http://" + ss.options[ss.selectedIndex].value + ":8080/helm/servlet/uwobo/";
+    document.uwoboURL.elements[0].value = "http://" + ss.options[ss.selectedIndex].value + ":58080/";
   }
 }
 
@@ -91,6 +91,44 @@ function selectPredefinedStylesheet(ss)
   document.loadEscape.elements[0].checked = true;
 }
 
+function getProfileParams()
+{
+  var password = document.getParamsProfilePassword.elements[0].value;
+  if (password != "") { password = "&password=" + password; };
+
+  top.result.location.replace(getUwoboURL() + "getparams?id=" + document.getParamsProfileID.elements[0].value + password);
+}
+
+function setProfileParam()
+{
+  var password = document.setParamProfilePassword.elements[0].value;
+  if (password != "") { password = "&password=" + password; };
+
+  top.result.location.replace(getUwoboURL() + "setparam?id=" + document.setParamProfileID.elements[0].value + "&key=" + document.setParamProfileKey.elements[0].value + "&value=" + document.setParamProfileValue.elements[0].value + password);
+}
+
+function createProfile()
+{
+  var id = document.createProfileID.elements[0].value;
+  if (id != "") { id = "&id=" + id; };
+
+  var password = document.createProfilePassword.elements[0].value;
+  if (password != "") { password = "&password=" + password; };
+
+  var clone = document.createProfileClone.elements[0].value;
+  if (clone != "") { clone = "&orig=" + clone; };
+
+  top.result.location.replace(getUwoboURL() + "createprofile?foo=x" + id + password + clone);
+}
+
+function removeProfile()
+{
+  var password = document.removeProfilePassword.elements[0].value;
+  if (password != "") { password = "&password=" + password; };
+
+  top.result.location.replace(getUwoboURL() + "removeprofile?id=" + document.removeProfileID.elements[0].value + password);
+}
+
 function getStylesheetURL()
 {
   var s;