X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fon-line%2Fjavascript%2Fcontrol.js;h=3384875c6aedb950c2bb7a8d32fa38b7d691b0a0;hb=de7919bc2f1c068734c6760af0cb44c6d7022804;hp=76dc7b768f450a43511e024b0147f32aab4c6d68;hpb=b3214f0da40accb3464b0e924f51a09fb804de77;p=helm.git diff --git a/helm/on-line/javascript/control.js b/helm/on-line/javascript/control.js index 76dc7b768..3384875c6 100644 --- a/helm/on-line/javascript/control.js +++ b/helm/on-line/javascript/control.js @@ -22,15 +22,25 @@ 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); if (new_mode == "raw") updateMode(2, format.options[format.selectedIndex].value); else updateMode(1, format.options[format.selectedIndex].value); - location.search = dest + top.mode; + + var href = + top.processorURL + 'apply' + + '?keys=RT' + + '¶m.topurl=' + topurl + + '&xmluri=' + + escape(top.topurl + '/html/library/control.html' + dest + top.mode); + + location.href = href; } } @@ -83,16 +93,28 @@ function refreshReload() "&cicuri=" + top.cicuri + "&theoryuri=" + top.theoryuri + "&processorURL=" + top.processorURL + - "&getterURL=" + top.getterURL; + "&getterURL=" + top.getterURL + + "&draw_graphURL=" + top.draw_graphURL + + "&uri_set_queueURL=" + top.uri_set_queueURL + + "&UNICODEvsSYMBOL=" + top.UNICODEvsSYMBOL; - top.frames[0].document.links[0].search = search; - top.frames[0].document.links[1].search = search; + var href = + top.processorURL + 'apply' + + '?keys=RT' + + '¶m.topurl=' + top.topurl + + '&xmluri=' + + escape(top.topurl + '/html/library/index.html' + search); + + top.frames[0].document.links[0].href = href; + top.frames[0].document.links[1].href = + top.topurl + '/html/index.html' + search; return true; } 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; } @@ -106,7 +128,7 @@ function refreshtheoryHeader(headerURL) function getCICMathMLKeys() { //Important note: do not modify this function without modifying makeURL - return escape("C1,C2,L"); + return escape("d_c,C1,G,C2,L"); } function makeURL(type,uri,cicflags,typesflags) @@ -114,13 +136,16 @@ 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(","); var keys = ""; var url = ""; - var interfaceURL = chopSlash(chopSlash(top.topurl)) + "/cic/index.html"; - var thinterfaceURL = chopSlash(chopSlash(top.topurl)) + "/theory/index.html"; + var interfaceURL = top.topurl + "/html/cic/index.html"; + var thinterfaceURL = top.topurl + "/html/theory/index.html"; var output = mode_list[0]; var format; @@ -137,23 +162,30 @@ function makeURL(type,uri,cicflags,typesflags) if (format == "html" && type == "cic") { //Important note: do not modify this function without modifying //getCICMathMLKeys - keys = escape("C1,HC2,L")+"¶m.processorURL=" + escape(processorURL) + + keys = escape("d_c,C1,HC2,L") + + "¶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) + "&prop.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+ "&prop.encoding=iso-8859-1" + "&prop.media-type=text/html" + "¶m.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+ "¶m.encoding=iso-8859-1" + "¶m.media-type=text/html" + - "¶m.keys=" + escape("C1,HC2,L") + + "¶m.keys=" + escape("d_c,C1,HC2,L") + "¶m.interfaceURL=" + escape(interfaceURL); } else if (format == "html" && type == "theory") { keys = escape("T1,T2,L,E")+ "¶m.processorURL=" + escape(processorURL) + "¶m.getterURL=" + escape(getterURL) + - "¶m.keys=" + escape("C1,HC2,L") + + "¶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.embedkeys=" + escape("TC1,HC2,L") + + "¶m.embedkeys=" + escape("d_c,TC1,HC2,L") + "¶m.doctype-public="+escape("-//W3C//DTD XHTML 1.0 Transitional//EN")+ "¶m.encoding=iso-8859-1" + "¶m.thencoding=iso-8859-1" + @@ -162,15 +194,17 @@ function makeURL(type,uri,cicflags,typesflags) "¶m.interfaceURL=" + escape(interfaceURL) + "¶m.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")+ - "¶m.keys=C1" + + "¶m.keys=" + escape("d_c,C1") + "¶m.thkeys=T1,L,E" + - "¶m.embedkeys=TC1" + + "¶m.embedkeys=" + escape("d_c,TC1") + "¶m.processorURL=" + escape(processorURL) + "¶m.getterURL=" + escape(getterURL) + + "¶m.draw_graphURL=" + escape(draw_graphURL) + + "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) + "¶m.doctype-public=" + "¶m.encoding=" + "¶m.thencoding=iso-8859-1" + @@ -179,24 +213,28 @@ function makeURL(type,uri,cicflags,typesflags) "¶m.interfaceURL=" + escape(interfaceURL) + "¶m.thinterfaceURL=" + escape(thinterfaceURL); } else if (format == "mml_pres" && type == "cic") { - keys = escape("C1,C2,L")+ + keys = escape("d_c,C1,G,C2,L")+ "¶m.processorURL=" + escape(processorURL) + "¶m.getterURL=" + escape(getterURL) + + "¶m.draw_graphURL=" + escape(draw_graphURL) + + "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) + "&prop.doctype-public="+ "&prop.encoding=" + "&prop.media-type=text/xml" + "¶m.doctype-public=" + "¶m.encoding=" + "¶m.media-type=text/xml" + - "¶m.keys=" + escape("C1,C2,L") + + "¶m.keys=" + escape("d_c,C1,G,C2,L") + "¶m.interfaceURL=" + escape(interfaceURL); } else if (format == "mml_pres" && type == "theory") { keys = escape("T1,T2,L,E")+ - "¶m.keys=C1,C2,L" + + "¶m.keys=d_c,C1,G,C2,L" + "¶m.thkeys=T1,T2,L,E" + - "¶m.embedkeys=TC1,C2,L" + + "¶m.embedkeys=d_c,TC1,G,C2,L" + "¶m.processorURL=" + escape(processorURL) + "¶m.getterURL=" + escape(getterURL) + + "¶m.draw_graphURL=" + escape(draw_graphURL) + + "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) + "¶m.doctype-public=" + "¶m.encoding=" + "¶m.thencoding=iso-8859-1" + @@ -214,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 + "¶m.CICURI=" + uri + "¶m.naturalLanguage=" + naturalLanguage + "¶m.annotations=" + annotations; + url = processorURL + "apply?xmluri=" + escape(getterURL + "getxml?uri=" + uri) + "&keys=" + keys + "¶m.CICURI=" + uri + "¶m.naturalLanguage=" + naturalLanguage + "¶m.annotations=" + annotations + "¶m.topurl=" + top.topurl; } if (output == "raw")