]> matita.cs.unibo.it Git - helm.git/commitdiff
Code improvement: more code shared.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 9 Nov 2001 18:45:44 +0000 (18:45 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 9 Nov 2001 18:45:44 +0000 (18:45 +0000)
helm/on-line/javascript/control.js
helm/on-line/javascript/graphLinks.js

index 01ee82f2a7782727664ef76f2cc462e69c681f41..e0e37bb05123ad4b14c4edd7769f4119f111294a 100644 (file)
@@ -114,7 +114,6 @@ function refreshReload()
 
 function refreshcicHeader(headerURL)
 {
-// Qui e sotto da modificare per usare UWOBO!!!
    top.cicheader.location.search = "?keys=GP&xmluri=" + headerURL + "&param.uri=" + top.cicuri;
    return true;
 }
@@ -127,10 +126,14 @@ function refreshtheoryHeader(headerURL)
 
 function getCICMathMLKeys()
 {
-  //Important note: do not modify this function without modifying makeURL
   return escape("d_c,C1,G,C2,L");
 }
 
+function getTheoryKeys()
+{
+  return escape("T1,T2,L,E");
+}
+
 function makeURL(type,uri,cicflags,typesflags)
 {
   var mode = top.mode;
@@ -163,8 +166,6 @@ function makeURL(type,uri,cicflags,typesflags)
           mode_list[5] + "&patch_dtd=" + mode_list[6];
   } else {
     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) +
        "&param.getterURL=" + escape(getterURL) +
@@ -180,14 +181,14 @@ function makeURL(type,uri,cicflags,typesflags)
        "&param.keys=" + escape("d_c,C1,HC2,L") +
        "&param.interfaceURL=" + escape(interfaceURL);
     } else if (format == "html" && type == "theory") {
-      keys = escape("T1,T2,L,E")+
+      keys = getTheoryKeys()+
        "&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("d_c,C1,HC2,L") +
-       "&param.thkeys=" + escape("T1,T2,L,E") +
+       "&param.thkeys=" + getTheoryKeys() +
        "&param.embedkeys=" + escape("d_c,TC1,HC2,L") +
        "&param.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+
        "&param.encoding=iso-8859-1" +
@@ -216,7 +217,7 @@ function makeURL(type,uri,cicflags,typesflags)
        "&param.interfaceURL=" + escape(interfaceURL) +
        "&param.thinterfaceURL=" + escape(thinterfaceURL);
     } else if (format == "mml_pres" && type == "cic") {
-      keys = escape("d_c,C1,G,C2,L")+
+      keys = getCICMathMLKeys()+
        "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
        "&param.draw_graphURL=" + escape(draw_graphURL) +
@@ -227,13 +228,13 @@ function makeURL(type,uri,cicflags,typesflags)
        "&param.doctype-public=" +
        "&param.encoding=" +
        "&param.media-type=text/xml" +
-       "&param.keys=" + escape("d_c,C1,G,C2,L") +
+       "&param.keys=" + getCICMathMLKeys() +
        "&param.interfaceURL=" + escape(interfaceURL);
     } else if (format == "mml_pres" && type == "theory") {
-      keys = escape("T1,T2,L,E")+
-       "&param.keys=d_c,C1,G,C2,L" +
-       "&param.thkeys=T1,T2,L,E" +
-       "&param.embedkeys=d_c,TC1,G,C2,L" +
+      keys = getTheoryKeys()+
+       "&param.keys=" + getCICMathMLKeys() +
+       "&param.thkeys=" + getTheoryKeys() +
+       "&param.embedkeys=" + escape(d_c,TC1,G,C2,L) +
        "&param.processorURL=" + escape(processorURL) +
        "&param.getterURL=" + escape(getterURL) +
        "&param.draw_graphURL=" + escape(draw_graphURL) +
index 26ebb2a104220ebda87b6639e8eb07d9bb5da388..9cad277a7eff3d6b5a197c067c238dd11f6247a4 100644 (file)
@@ -75,7 +75,7 @@ function mkMetaTheoryURL(uri)
 {
    var rdfuri = mkRDFURI(uri);
    var getterURL = getParam("param.getterURL");
-   var url = setParam(location.href,"keys","meta_theory%2CT1%2CT2%2CL%2CE");
+   var url = setParam(location.href,"keys","meta_theory,T1,T2,L,E");
    url = setParam(url,"xmluri", getterURL + "getxml%3Furi%3D" + rdfuri);
    return url;
 }