]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/uwobo-panel/control.js
...
[helm.git] / helm / uwobo-panel / control.js
index 258163f97e71395d721f5ad94a85b25b8ce1e1ee..0202f25c81e5be4a1344b05e7cc7aa4974cf4533 100644 (file)
@@ -103,35 +103,34 @@ function getStylesheetURL()
 
 function loadStylesheet()
 {
-  top.result.location = getUwoboURL() + "add?xsluri=" + getStylesheetURL() + "&key=" + document.stylesheetKey.elements[0].value;
+  top.result.location.replace(getUwoboURL() + "add?bind=" + document.stylesheetKey.elements[0].value + "," + getStylesheetURL());
 }
 
 function removeStylesheet()
 {
-  top.result.location = getUwoboURL() + "remove?key=" + document.stylesheetKey.elements[0].value;
+  top.result.location.replace(getUwoboURL() + "remove?keys=" + document.stylesheetKey.elements[0].value);
 }
 
 function removeAllStylesheets()
 {
-  top.result.location = getUwoboURL() + "remove";
+  top.result.location.replace(getUwoboURL() + "remove");
 }
 
 function reloadStylesheet()
 {
-  top.result.location = getUwoboURL() + "reload?key=" + document.stylesheetKey.elements[0].value;
+  top.result.location.replace(getUwoboURL() + "reload?keys=" + document.stylesheetKey.elements[0].value);
 }
 
 function loadAllPredefined()
 {
   with (document.predefinedStylesheets.elements[0]) {
     var i;
+    var request = "dummy=0";
 
     for (i = 1; i < length; i++)
-      open(getUwoboURL() +
-       "add?xsluri=" +  escape((getPredefinedStylesheetUseGetter(i) == "true" ? (getGetterURL() + "getxslt?uri=") : "") + getPredefinedStylesheetURI(i)) +
-       "&key=" + getPredefinedStylesheetKey(i),
-       getPredefinedStylesheetKey(i),
-       "toolbar=0,location=0,directories=0,status=0,menubar=0,width=400,height=200");
+      request +=
+        "&bind=" + getPredefinedStylesheetKey(i) + "," +  escape((getPredefinedStylesheetUseGetter(i) == "true" ? (getGetterURL() + "getxslt?uri=") : "") + getPredefinedStylesheetURI(i));
+    top.result.location.replace(getUwoboURL() + "add?" + request);
   }
 }
 
@@ -139,11 +138,11 @@ function removeAllPredefined()
 {
   with (document.predefinedStylesheets.elements[0]) {
     var i;
+    var request = "";
 
     for (i = 1; i < length; i++)
-      open(getUwoboURL() + "remove?key=" + getPredefinedStylesheetKey(i),
-       getPredefinedStylesheetKey(i),
-       "toolbar=0,location=0,directories=0,status=0,menubar=0,width=400,height=200");
+      request += getPredefinedStylesheetKey(i) + ",";
+    top.result.location.replace(getUwoboURL() + "remove?keys=" + request);
   }
 }
 
@@ -182,5 +181,5 @@ function applyStylesheets()
         url += "&param." + paramList[i];
     }
   
-  top.result.location = url;
+  top.result.location.replace(url);
 }