]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/uwobo-panel/control.js
first moogle template checkin
[helm.git] / helm / uwobo-panel / control.js
index 0202f25c81e5be4a1344b05e7cc7aa4974cf4533..393bd3a68d647f01257041a7d91a09673731b9c7 100644 (file)
@@ -13,14 +13,19 @@ function getParam(name, def)
   return value;
 }
 
+function getInitialPort()
+{
+  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()
@@ -38,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/";
   }
 }
 
@@ -113,7 +118,7 @@ function removeStylesheet()
 
 function removeAllStylesheets()
 {
-  top.result.location.replace(getUwoboURL() + "remove");
+  top.result.location.replace(getUwoboURL() + "remove?keys=");
 }
 
 function reloadStylesheet()
@@ -121,15 +126,21 @@ function reloadStylesheet()
   top.result.location.replace(getUwoboURL() + "reload?keys=" + document.stylesheetKey.elements[0].value);
 }
 
+function reloadAllStylesheets()
+{
+  top.result.location.replace(getUwoboURL() + 'reload?keys=');
+}
+
 function loadAllPredefined()
 {
   with (document.predefinedStylesheets.elements[0]) {
     var i;
-    var request = "dummy=0";
+    var request = "";
 
     for (i = 1; i < length; i++)
       request +=
-        "&bind=" + getPredefinedStylesheetKey(i) + "," +  escape((getPredefinedStylesheetUseGetter(i) == "true" ? (getGetterURL() + "getxslt?uri=") : "") + getPredefinedStylesheetURI(i));
+        (request == "" ? "" : "&") +
+        "bind=" + getPredefinedStylesheetKey(i) + "," +  escape((getPredefinedStylesheetUseGetter(i) == "true" ? (getGetterURL() + "getxslt?uri=") : "") + getPredefinedStylesheetURI(i));
     top.result.location.replace(getUwoboURL() + "add?" + request);
   }
 }
@@ -141,7 +152,7 @@ function removeAllPredefined()
     var request = "";
 
     for (i = 1; i < length; i++)
-      request += getPredefinedStylesheetKey(i) + ",";
+      request += getPredefinedStylesheetKey(i) + (i == length - 1 ? "" : ",");
     top.result.location.replace(getUwoboURL() + "remove?keys=" + request);
   }
 }