]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/on-line/javascript/control.js
first moogle template checkin
[helm.git] / helm / on-line / javascript / control.js
index 6734d4a133f5e6fc9ab60961b87fae73995bfc3a..79ed47fd7ef1c626592192a7c9852bc3c2175e1c 100644 (file)
@@ -22,11 +22,12 @@ function updateOutput(output,format)
   var topurl = top.topurl;
   var processorURL = top.processorURL;
   var getterURL = top.getterURL;
+  var proofcheckerURL = top.proofcheckerURL;
   var draw_graphURL = top.draw_graphURL;
   var uri_set_queueURL = top.uri_set_queueURL;
   var mode_list = mode.split(",");
   var new_mode = output.options[output.selectedIndex].value;
-  var dest = "?theoryuri=" + theoryuri + "&cicuri=" + cicuri + "&topurl=" + topurl + "&processorURL=" + processorURL + "&getterURL=" + getterURL + "&draw_graphURL=" + draw_graphURL + "&uri_set_queueURL=" + uri_set_queueURL + "&mode=";
+  var dest = "?theoryuri=" + theoryuri + "&cicuri=" + cicuri + "&topurl=" + topurl + "&processorURL=" + processorURL + "&getterURL=" + getterURL + "&proofcheckerURL=" + proofcheckerURL + "&draw_graphURL=" + draw_graphURL + "&uri_set_queueURL=" + uri_set_queueURL + "&mode=";
   
   if (new_mode != mode_list[0]) {
     updateMode(0, new_mode);
@@ -94,6 +95,7 @@ function refreshReload()
       "&theoryuri=" + top.theoryuri +
       "&processorURL=" + top.processorURL +
       "&getterURL=" + top.getterURL +
+      "&proofcheckerURL=" + top.proofcheckerURL +
       "&draw_graphURL=" + top.draw_graphURL +
       "&uri_set_queueURL=" + top.uri_set_queueURL +
       "&UNICODEvsSYMBOL=" + top.UNICODEvsSYMBOL;
@@ -144,11 +146,17 @@ function getCICHTMLKeys()
   return escape("d_c,C1,HC2,L");
 }
 
+function getCICProofTreeXHTMLMathMLKeys()
+{
+  return escape("HAT,G,HAO,L");
+}
+
 function makeURL(type,uri,cicflags,typesflags)
 {
   var mode = top.mode;
   var processorURL = top.processorURL;
   var getterURL = top.getterURL;
+  var proofcheckerURL = top.proofcheckerURL;
   var draw_graphURL = top.draw_graphURL;
   var uri_set_queueURL = top.uri_set_queueURL;
   var UNICODEvsSYMBOL = top.UNICODEvsSYMBOL;
@@ -175,16 +183,38 @@ function makeURL(type,uri,cicflags,typesflags)
     url = getterURL + "getxml?uri=" + rdfprefix + uri + ext + "&format=" +
           mode_list[5] + "&patch_dtd=" + mode_list[6];
   } else {
-    if (format == "html" && type == "cic") {
+    var uri_len = uri.length;
+    if (format == "html" && type == "cic" && uri.substring(uri.length - 10, uri.length) == "proof_tree") {
+      keys = getCICProofTreeXHTMLMathMLKeys() +
+       "&param.processorURL=" + escape(processorURL) +
+       "&param.getterURL=" + escape(getterURL) +
+       "&param.proofcheckerURL=" + escape(proofcheckerURL) +
+       "&param.draw_graphURL=" + escape(draw_graphURL) +
+       "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
+       "&param.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
+       "&prop.doctype-public="+escape("-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN")+
+       "&prop.doctype-system="+escape("http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd")+
+       "&prop.encoding=iso-8859-1" +
+       "&prop.media-type=text/xml" +
+       "&prop.method=xml" +
+       "&param.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
+       "&param.encoding=iso-8859-1" +
+       "&param.media-type=text/html" +
+       "&param.keys=" + getCICHTMLKeys() +
+       "&param.interfaceURL=" + escape(interfaceURL) +
+       "&param.framewidth=150";
+    } else if (format == "html" && type == "cic") {
       keys = getCICHTMLKeys() +
        "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
+       "&param.proofcheckerURL=" + escape(proofcheckerURL) +
        "&param.draw_graphURL=" + escape(draw_graphURL) +
        "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
        "&param.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
        "&prop.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
        "&prop.encoding=iso-8859-1" +
        "&prop.media-type=text/html" +
+       "&prop.method=html" +
        "&param.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
        "&param.encoding=iso-8859-1" +
        "&param.media-type=text/html" +
@@ -194,6 +224,7 @@ function makeURL(type,uri,cicflags,typesflags)
       keys = getTheoryKeys()+
        "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
+       "&param.proofcheckerURL=" + escape(proofcheckerURL) +
        "&param.draw_graphURL=" + escape(draw_graphURL) +
        "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
        "&param.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
@@ -209,20 +240,25 @@ function makeURL(type,uri,cicflags,typesflags)
        "&param.thinterfaceURL=" + escape(thinterfaceURL);
     } else if (format == "mml_cont" && type == "cic") {
       keys = escape("d_c,C1")+
+       "&param.processorURL=" + escape(processorURL) +
+       "&param.getterURL=" + escape(getterURL) +
        "&prop.doctype-public="+
-       "&prop.encoding=" +
+       //"&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.processorURL=" + escape(processorURL) +
+       "&param.getterURL=" + escape(getterURL) +
        "&param.keys=" + escape("d_c,C1") +
        "&param.thkeys=T1,L,E" +
        "&param.embedkeys=" + escape("d_c,TC1") +
 
        "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
+       "&param.proofcheckerURL=" + escape(proofcheckerURL) +
        "&param.draw_graphURL=" + escape(draw_graphURL) +
        "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
        "&param.doctype-public=" +
@@ -236,10 +272,11 @@ function makeURL(type,uri,cicflags,typesflags)
       keys = getCICMathMLKeys()+
        "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
+       "&param.proofcheckerURL=" + escape(proofcheckerURL) +
        "&param.draw_graphURL=" + escape(draw_graphURL) +
        "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
        "&prop.doctype-public="+
-       "&prop.encoding=" +
+       //"&prop.encoding=" +
        "&prop.media-type=text/xml" +
        "&param.doctype-public=" +
        "&param.encoding=" +
@@ -253,6 +290,7 @@ function makeURL(type,uri,cicflags,typesflags)
        "&param.embedkeys=" + escape("d_c,TC1,G,C2,L") +
        "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
+       "&param.proofcheckerURL=" + escape(proofcheckerURL) +
        "&param.draw_graphURL=" + escape(draw_graphURL) +
        "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
        "&param.doctype-public=" +