]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/on-line/javascript/control.js
New implementation of the graphs stuff: now every hard-coded URL has
[helm.git] / helm / on-line / javascript / control.js
index 472100b9f1fb6d1fa727bdd46d0bfdd0ea126589..3384875c6aedb950c2bb7a8d32fa38b7d691b0a0 100644 (file)
@@ -22,9 +22,11 @@ function updateOutput(output,format)
   var topurl = top.topurl;
   var processorURL = top.processorURL;
   var getterURL = top.getterURL;
+  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 + "&mode=";
+  var dest = "?theoryuri=" + theoryuri + "&cicuri=" + cicuri + "&topurl=" + topurl + "&processorURL=" + processorURL + "&getterURL=" + getterURL + "&draw_graphURL=" + draw_graphURL + "&uri_set_queueURL=" + uri_set_queueURL + "&mode=";
   
   if (new_mode != mode_list[0]) {
     updateMode(0, new_mode);
@@ -92,6 +94,8 @@ function refreshReload()
       "&theoryuri=" + top.theoryuri +
       "&processorURL=" + top.processorURL +
       "&getterURL=" + top.getterURL +
+      "&draw_graphURL=" + top.draw_graphURL +
+      "&uri_set_queueURL=" + top.uri_set_queueURL +
       "&UNICODEvsSYMBOL=" + top.UNICODEvsSYMBOL;
 
    var href =
@@ -132,6 +136,8 @@ function makeURL(type,uri,cicflags,typesflags)
   var mode = top.mode;
   var processorURL = top.processorURL;
   var getterURL = top.getterURL;
+  var draw_graphURL = top.draw_graphURL;
+  var uri_set_queueURL = top.uri_set_queueURL;
   var UNICODEvsSYMBOL = top.UNICODEvsSYMBOL;
   var mode_list = mode.split(",");
   
@@ -156,8 +162,11 @@ function makeURL(type,uri,cicflags,typesflags)
     if (format == "html" && type == "cic") {
       //Important note: do not modify this function without modifying
       //getCICMathMLKeys
-      keys = escape("d_c,C1,HC2,L")+"&param.processorURL=" + escape(processorURL) +
+      keys = escape("d_c,C1,HC2,L") +
+       "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
+       "&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" +
@@ -165,16 +174,18 @@ 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("C1,HC2,L") +
+       "&param.keys=" + escape("d_c,C1,HC2,L") +
        "&param.interfaceURL=" + escape(interfaceURL);
     } else if (format == "html" && type == "theory") {
       keys = escape("T1,T2,L,E")+
        "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
+       "&param.draw_graphURL=" + escape(draw_graphURL) +
+       "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
        "&param.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
-       "&param.keys=" + escape("C1,HC2,L") +
+       "&param.keys=" + escape("d_c,C1,HC2,L") +
        "&param.thkeys=" + escape("T1,T2,L,E") +
-       "&param.embedkeys=" + escape("TC1,HC2,L") +
+       "&param.embedkeys=" + escape("d_c,TC1,HC2,L") +
        "&param.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
        "&param.encoding=iso-8859-1" +
        "&param.thencoding=iso-8859-1" +
@@ -183,15 +194,17 @@ function makeURL(type,uri,cicflags,typesflags)
        "&param.interfaceURL=" + escape(interfaceURL) +
        "&param.thinterfaceURL=" + escape(thinterfaceURL);
     } else if (format == "mml_cont" && type == "cic") {
-      keys = "C1";
+      keys = escape("d_c,C1");
     } else if (format == "mml_cont" && type == "theory") {
       keys = escape("T1,L,E")+
-       "&param.keys=C1" +
+       "&param.keys=" + escape("d_c,C1") +
        "&param.thkeys=T1,L,E" +
-       "&param.embedkeys=TC1" +
+       "&param.embedkeys=" + escape("d_c,TC1") +
 
        "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
+       "&param.draw_graphURL=" + escape(draw_graphURL) +
+       "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
        "&param.doctype-public=" +
        "&param.encoding=" +
        "&param.thencoding=iso-8859-1" +
@@ -200,24 +213,28 @@ function makeURL(type,uri,cicflags,typesflags)
        "&param.interfaceURL=" + escape(interfaceURL) +
        "&param.thinterfaceURL=" + escape(thinterfaceURL);
     } else if (format == "mml_pres" && type == "cic") {
-      keys = escape("C1,G,C2,L")+
+      keys = escape("d_c,C1,G,C2,L")+
        "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
+       "&param.draw_graphURL=" + escape(draw_graphURL) +
+       "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
        "&prop.doctype-public="+
        "&prop.encoding=" +
        "&prop.media-type=text/xml" +
        "&param.doctype-public=" +
        "&param.encoding=" +
        "&param.media-type=text/xml" +
-       "&param.keys=" + escape("C1,G,C2,L") +
+       "&param.keys=" + escape("d_c,C1,G,C2,L") +
        "&param.interfaceURL=" + escape(interfaceURL);
     } else if (format == "mml_pres" && type == "theory") {
       keys = escape("T1,T2,L,E")+
-       "&param.keys=C1,G,C2,L" +
+       "&param.keys=d_c,C1,G,C2,L" +
        "&param.thkeys=T1,T2,L,E" +
-       "&param.embedkeys=TC1,G,C2,L" +
+       "&param.embedkeys=d_c,TC1,G,C2,L" +
        "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
+       "&param.draw_graphURL=" + escape(draw_graphURL) +
+       "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
        "&param.doctype-public=" +
        "&param.encoding=" +
        "&param.thencoding=iso-8859-1" +
@@ -235,7 +252,7 @@ function makeURL(type,uri,cicflags,typesflags)
     if (cicflags != "NO" || type == "theory") {
        annotations = mode_list[4];
     }
-    url = processorURL + "apply?xmluri=" + escape(getterURL + "getxml?uri=" + uri) + "&keys=" + keys + "&param.CICURI=" + uri + "&param.naturalLanguage=" + naturalLanguage + "&param.annotations=" + annotations;
+    url = processorURL + "apply?xmluri=" + escape(getterURL + "getxml?uri=" + uri) + "&keys=" + keys + "&param.CICURI=" + uri + "&param.naturalLanguage=" + naturalLanguage + "&param.annotations=" + annotations + "&param.topurl=" + top.topurl;
   }
 
   if (output == "raw")