]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/on-line/javascript/control.js
annotationHelper now working again. A control frame has been added to
[helm.git] / helm / on-line / javascript / control.js
index de22891cc09b3fc74d4fa2c11b17448bfe30116a..fbc08f3f9b692e38f3fd33c53992cb3fa308b93d 100644 (file)
@@ -103,6 +103,12 @@ function refreshtheoryHeader(headerURL)
    return true;
 }
 
+function getCICMathMLKeys()
+{
+  //Important note: do not modify this function without modifying makeURL
+  return escape("C1,C2,L");
+}
+
 function makeURL(type,uri,cicflags,typesflags)
 {
   var mode = top.mode;
@@ -113,7 +119,8 @@ function makeURL(type,uri,cicflags,typesflags)
   var keys = "";
   var url = "";
 
-  var interfaceURL = chopSlash(chopSlash(top.topurl)) + "/cic/index.html";
+  var interfaceURL = chopSlash(chopSlash(top.topurl)) +
+   ((type == "cic") ? "/cic/index.html" : "/theory/index.html");
 
   var output = mode_list[0];
   var format;
@@ -128,6 +135,8 @@ function makeURL(type,uri,cicflags,typesflags)
      "&patch_dtd=" + mode_list[6];
   } else {
     if (format == "html" && type == "cic") {
+      //Important note: do not modify this function without modifying
+      //getCICMathMLKeys
       keys = escape("C1,HC2,L")+"&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
        "&prop.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
@@ -183,6 +192,9 @@ function makeURL(type,uri,cicflags,typesflags)
     url = processorURL + "apply?xmluri=" + escape(getterURL + "getxml?uri=" + uri) + "&keys=" + keys + "&param.CICURI=" + uri + "&param.naturalLanguage=" + naturalLanguage + "&param.annotations=" + annotations;
   }
 
-  return interfaceURL + "?url=" + escape(url);
+  if (output == "raw")
+   return url
+  else
+   return interfaceURL + "?url=" + escape(url);
 }