From 48ef0df0e28ae2727ad773631e254d64576b5c6c Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Fri, 9 Nov 2001 18:45:44 +0000 Subject: [PATCH] Code improvement: more code shared. --- helm/on-line/javascript/control.js | 25 +++++++++++++------------ helm/on-line/javascript/graphLinks.js | 2 +- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/helm/on-line/javascript/control.js b/helm/on-line/javascript/control.js index 01ee82f2a..e0e37bb05 100644 --- a/helm/on-line/javascript/control.js +++ b/helm/on-line/javascript/control.js @@ -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 + "¶m.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") + "¶m.processorURL=" + escape(processorURL) + "¶m.getterURL=" + escape(getterURL) + @@ -180,14 +181,14 @@ function makeURL(type,uri,cicflags,typesflags) "¶m.keys=" + escape("d_c,C1,HC2,L") + "¶m.interfaceURL=" + escape(interfaceURL); } else if (format == "html" && type == "theory") { - keys = escape("T1,T2,L,E")+ + keys = getTheoryKeys()+ "¶m.processorURL=" + escape(processorURL) + "¶m.getterURL=" + escape(getterURL) + "¶m.draw_graphURL=" + escape(draw_graphURL) + "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) + "¶m.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) + "¶m.keys=" + escape("d_c,C1,HC2,L") + - "¶m.thkeys=" + escape("T1,T2,L,E") + + "¶m.thkeys=" + getTheoryKeys() + "¶m.embedkeys=" + escape("d_c,TC1,HC2,L") + "¶m.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+ "¶m.encoding=iso-8859-1" + @@ -216,7 +217,7 @@ function makeURL(type,uri,cicflags,typesflags) "¶m.interfaceURL=" + escape(interfaceURL) + "¶m.thinterfaceURL=" + escape(thinterfaceURL); } else if (format == "mml_pres" && type == "cic") { - keys = escape("d_c,C1,G,C2,L")+ + keys = getCICMathMLKeys()+ "¶m.processorURL=" + escape(processorURL) + "¶m.getterURL=" + escape(getterURL) + "¶m.draw_graphURL=" + escape(draw_graphURL) + @@ -227,13 +228,13 @@ function makeURL(type,uri,cicflags,typesflags) "¶m.doctype-public=" + "¶m.encoding=" + "¶m.media-type=text/xml" + - "¶m.keys=" + escape("d_c,C1,G,C2,L") + + "¶m.keys=" + getCICMathMLKeys() + "¶m.interfaceURL=" + escape(interfaceURL); } else if (format == "mml_pres" && type == "theory") { - keys = escape("T1,T2,L,E")+ - "¶m.keys=d_c,C1,G,C2,L" + - "¶m.thkeys=T1,T2,L,E" + - "¶m.embedkeys=d_c,TC1,G,C2,L" + + keys = getTheoryKeys()+ + "¶m.keys=" + getCICMathMLKeys() + + "¶m.thkeys=" + getTheoryKeys() + + "¶m.embedkeys=" + escape(d_c,TC1,G,C2,L) + "¶m.processorURL=" + escape(processorURL) + "¶m.getterURL=" + escape(getterURL) + "¶m.draw_graphURL=" + escape(draw_graphURL) + diff --git a/helm/on-line/javascript/graphLinks.js b/helm/on-line/javascript/graphLinks.js index 26ebb2a10..9cad277a7 100644 --- a/helm/on-line/javascript/graphLinks.js +++ b/helm/on-line/javascript/graphLinks.js @@ -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; } -- 2.39.2