]> matita.cs.unibo.it Git - helm.git/commitdiff
Changes in raw mode interface
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 19 Mar 2001 18:05:45 +0000 (18:05 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 19 Mar 2001 18:05:45 +0000 (18:05 +0000)
helm/on-line/html/library/control.html
helm/on-line/javascript/control.js
helm/on-line/javascript/defaults.js

index 7b8806e2b290241c0a25b7f078ed59bffcadd7c2..57c6c3900e83920432cdbc3f97e61146697fdc41 100644 (file)
@@ -30,8 +30,9 @@
        var mode = getParam('mode');
        var mode_list = mode.split(',');
        if (mode_list[0] == "raw") {
-         outputOption(document, "cic", "CIC", mode_list[1]);
-         outputOption(document, "zcic", "CIC GZipped", mode_list[1]);
+         outputOption(document, "cic",   "CIC", mode_list[1]);
+         outputOption(document, "types", "TYPES", mode_list[1]);
+         outputOption(document, "ann",   "ANN", mode_list[1]);
        } else {
          outputOption(document, "html", "HTML", mode_list[2]);
          outputOption(document, "mml_cont", "MathML Content", mode_list[2]);
       <script>
        var mode = getParam('mode');
        var mode_list = mode.split(',');
-        outputCheckbox(document, "updateNatural(this)", "&nbsp;Natural Language", mode_list[3] == "yes");
-        outputCheckbox(document, "updateAnnotations(this)", "&nbsp;Annotations", mode_list[4] == "yes");
+       if (mode_list[0] == "raw") {
+         outputCheckbox(document, "updateCompressed(this)",
+          "&nbsp;Compressed", mode_list[5] == "yes");
+         outputCheckbox(document, "updateDTDPatched(this)",
+          "&nbsp;Resolve DTD URL", mode_list[6] == "yes");
+        } else {
+         outputCheckbox(document, "updateNatural(this)",
+          "&nbsp;Natural Language", mode_list[3] == "yes");
+         outputCheckbox(document, "updateAnnotations(this)",
+          "&nbsp;Annotations", mode_list[4] == "yes");
+        }
       </script>
     </td>
     <td>
index 8debc89f8d486e1ed17c5d40bd6792cb3914def3..8ad40ce64ceaa580520e4dd13919c9a28aa1179c 100644 (file)
@@ -1,4 +1,3 @@
-
 function updateMode(i, s)
 {
   var mode = top.mode;
@@ -63,6 +62,20 @@ function updateAnnotations(checkbox)
   refreshReload();
 }
 
+function updateCompressed(checkbox)
+{
+  if (checkbox.checked) updateMode(5, "gz");
+  else updateMode(5, "normal");
+  refreshReload();
+}
+
+function updateDTDPatched(checkbox)
+{
+  if (checkbox.checked) updateMode(6, "yes");
+  else updateMode(6, "no");
+  refreshReload();
+}
+
 function refreshReload()
 {
    var search = 
@@ -106,8 +119,11 @@ function makeURL(type,uri,cicflags,typesflags)
   else format = mode_list[2];
   
   if (output == "raw") {
-    url = getterURL + "getxml?uri=" + uri +
-     "&format=" + (format == "zcic" ? "gz" : "normal");
+    var ext = "";
+    if (format == "types") ext = ".types"
+    else if (format == "ann") ext = ".ann";
+    url = getterURL + "getxml?uri=" + uri + ext + "&format=" + mode_list[5] +
+     "&patched_dtd=" + mode_list[6];
   } else {
     if (format == "html" && type == "cic") {
       keys = "C1,HC2,L&param.processorURL=" + escape(processorURL) +
index f6abf7f875984de5bdf6f08e8592415860e2b629..54d51002ff60b7cfccdb7f27e5eff0fb96270dd9 100644 (file)
@@ -11,7 +11,7 @@ function getDefaultParam(name)
   case "theoryuri":
     return "theory:/";
   case "mode":
-    return "processed,cic,html,yes,no";
+    return "processed,cic,html,yes,no,normal,no";
   }
   
   return "???";