]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/on-line/javascript/control.js
...
[helm.git] / helm / on-line / javascript / control.js
index e0e37bb05123ad4b14c4edd7769f4119f111294a..6734d4a133f5e6fc9ab60961b87fae73995bfc3a 100644 (file)
@@ -134,6 +134,16 @@ function getTheoryKeys()
   return escape("T1,T2,L,E");
 }
 
+function getEmbedKeys()
+{
+  return escape("d_c,TC1,HC2,L");
+}
+
+function getCICHTMLKeys()
+{
+  return escape("d_c,C1,HC2,L");
+}
+
 function makeURL(type,uri,cicflags,typesflags)
 {
   var mode = top.mode;
@@ -166,7 +176,7 @@ function makeURL(type,uri,cicflags,typesflags)
           mode_list[5] + "&patch_dtd=" + mode_list[6];
   } else {
     if (format == "html" && type == "cic") {
-      keys = escape("d_c,C1,HC2,L") +
+      keys = getCICHTMLKeys() +
        "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
        "&param.draw_graphURL=" + escape(draw_graphURL) +
@@ -178,7 +188,7 @@ function makeURL(type,uri,cicflags,typesflags)
        "&param.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
        "&param.encoding=iso-8859-1" +
        "&param.media-type=text/html" +
-       "&param.keys=" + escape("d_c,C1,HC2,L") +
+       "&param.keys=" + getCICHTMLKeys() +
        "&param.interfaceURL=" + escape(interfaceURL);
     } else if (format == "html" && type == "theory") {
       keys = getTheoryKeys()+
@@ -187,9 +197,9 @@ function makeURL(type,uri,cicflags,typesflags)
        "&param.draw_graphURL=" + escape(draw_graphURL) +
        "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
        "&param.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
-       "&param.keys=" + escape("d_c,C1,HC2,L") +
+       "&param.keys=" + getCICHTMLKeys() +
        "&param.thkeys=" + getTheoryKeys() +
-       "&param.embedkeys=" + escape("d_c,TC1,HC2,L") +
+       "&param.embedkeys=" + getEmbedKeys() +
        "&param.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
        "&param.encoding=iso-8859-1" +
        "&param.thencoding=iso-8859-1" +
@@ -198,7 +208,13 @@ function makeURL(type,uri,cicflags,typesflags)
        "&param.interfaceURL=" + escape(interfaceURL) +
        "&param.thinterfaceURL=" + escape(thinterfaceURL);
     } else if (format == "mml_cont" && type == "cic") {
-      keys = escape("d_c,C1");
+      keys = escape("d_c,C1")+
+       "&prop.doctype-public="+
+       "&prop.encoding=" +
+       "&prop.media-type=text/xml" +
+       "&param.doctype-public=" +
+       "&param.encoding=" +
+       "&param.media-type=text/xml";
     } else if (format == "mml_cont" && type == "theory") {
       keys = escape("T1,L,E")+
        "&param.keys=" + escape("d_c,C1") +
@@ -234,7 +250,7 @@ function makeURL(type,uri,cicflags,typesflags)
       keys = getTheoryKeys()+
        "&param.keys=" + getCICMathMLKeys() +
        "&param.thkeys=" + getTheoryKeys() +
-       "&param.embedkeys=" + escape(d_c,TC1,G,C2,L) +
+       "&param.embedkeys=" + escape("d_c,TC1,G,C2,L") +
        "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
        "&param.draw_graphURL=" + escape(draw_graphURL) +
@@ -248,11 +264,11 @@ function makeURL(type,uri,cicflags,typesflags)
        "&param.thinterfaceURL=" + escape(thinterfaceURL);
     }
 
-    var naturalLanguage = typesflags;
+    var naturalLanguage = typesflags.toLowerCase();
     if (typesflags != "NO" || type == "theory") {
        naturalLanguage = mode_list[3];
     }
-    var annotations = cicflags;
+    var annotations = cicflags.toLowerCase();
     if (cicflags != "NO" || type == "theory") {
        annotations = mode_list[4];
     }