]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/searchEngine/html/index.html
expandasking parameter passed to UWOBO.
[helm.git] / helm / searchEngine / html / index.html
index e7b73b5d2eed625b1be717c6957d7d0e28ecdaae..0e120ed904e852de28c4a2f591ebe263ecad7a44 100644 (file)
@@ -16,7 +16,7 @@ var wrong=0;
 var ricordaliaslist=0;
 var actinput=0;
 var numeroazioniannullate=0;
-var terminecic="";var listaliases="";var choices;var vlds=new Array();//contengono i parametri per dialogare col server in caso di ambiguità nella Match Conclusion.
+var terminecic="";var listaliases="";var choices="";var interpretation_choices="";var vlds=new Array();//contengono i parametri per dialogare col server in caso di ambiguità nella Match Conclusion.
 aliasglob=new Array();//per conservare la lista degli alias
 function initialize()
        {
@@ -69,30 +69,31 @@ var interface_topurl="@topurl@";
 function ask_uwobo(url)
        {
          return (top.topurl+"/ask_uwobo?url="+
-                 escape(processorURL + "apply?" +
-                         "xmluri=" + escape(url) +
-                         "&keys=" + escape(thkeys) +
-                         "&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) +
-                         "&param.keys=" + escape(keys) +
-                         "&param.thkeys=" + escape(thkeys) +
-                         "&param.embedkeys=" + escape(embedkeys) +
-                         "&param.doctype-public=" + escape(doctype_public) +
-                         "&param.encoding=" + escape(encoding) +
-                         "&param.thencoding=" + escape(thencoding) +
-                         "&param.media-type=" + escape(media_type) +
-                         "&param.thmedia-type=" + escape(thmedia_type) +
-                         "&param.interfaceURL=" + escape(interfaceURL) +
-                         "&param.thinterfaceURL=" + escape(thinterfaceURL) +
-                         "&param.CICURI=" + escape(CICURI) +
-                         "&param.naturalLanguage=" + escape(naturalLanguage) +
-                         "&param.annotations=" + escape(annotations) +
-                         "&param.topurl=" + escape(interface_topurl) +
-                         "&prop.method=html"));
+                 encodeURIComponent(processorURL + "apply?" +
+                         "xmluri=" + encodeURIComponent(url) +
+                         "&keys=" + encodeURIComponent(thkeys) +
+                         "&param.processorURL=" + encodeURIComponent(processorURL) +
+                         "&param.getterURL=" + encodeURIComponent(getterURL) +
+                         "&param.proofcheckerURL=" + encodeURIComponent(proofcheckerURL) +
+                         "&param.draw_graphURL=" + encodeURIComponent(draw_graphURL) +
+                         "&param.uri_set_queueURL=" + encodeURIComponent(uri_set_queueURL) +
+                         "&param.UNICODEvsSYMBOL=" + encodeURIComponent(UNICODEvsSYMBOL) +
+                         "&param.keys=" + encodeURIComponent(keys) +
+                         "&param.thkeys=" + encodeURIComponent(thkeys) +
+                         "&param.embedkeys=" + encodeURIComponent(embedkeys) +
+                         "&param.doctype-public=" + encodeURIComponent(doctype_public) +
+                         "&param.encoding=" + encodeURIComponent(encoding) +
+                         "&param.thencoding=" + encodeURIComponent(thencoding) +
+                         "&param.media-type=" + encodeURIComponent(media_type) +
+                         "&param.thmedia-type=" + encodeURIComponent(thmedia_type) +
+                         "&param.interfaceURL=" + encodeURIComponent(interfaceURL) +
+                         "&param.thinterfaceURL=" + encodeURIComponent(thinterfaceURL) +
+                         "&param.CICURI=" + encodeURIComponent(CICURI) +
+                         "&param.naturalLanguage=" + encodeURIComponent(naturalLanguage) +
+                         "&param.annotations=" + encodeURIComponent(annotations) +
+                         "&param.topurl=" + encodeURIComponent(interface_topurl) +
+                         "&prop.method=html" +
+                         "&param.expandasking=" + encodeURIComponent(top.topurl)));
        }
 function help(w) // quando invocata, visualizza l' help relativo ad un oggetto. Di solito è legata ad un evento onFocus o onMouseOver.  
        {
@@ -499,11 +500,11 @@ function templateambigpdq1_invia(document,top,elenco,ident)
        top.vlds[top.vlds.length]=";";
        for (j=0;j<top.vlds.length;j++)
        {
-           choices=choices+(top.vlds[j]==";"?";":escape(top.vlds[j]))+" ";
+           choices=choices+(top.vlds[j]==";"?";":encodeURIComponent(top.vlds[j]))+" ";
        }
        choices=choices.substring(0,choices.length-2);
   top.choices = choices;
-  stringa=stringa+escape(choices);
+  stringa=stringa+encodeURIComponent(choices);
        if (top.vlds.length==vecchiavlds){alert("You must select at least one of the options.");}
        else
        {
@@ -551,13 +552,14 @@ function templateambigpdq2_listainterpretazioni(document,elenco,labels)
 function templateambigpdq2_invia(document,elenco)
        {
        stringa=top.topurl+"/"+top.current_query+"?term="+top.terminecic;
-       stringa=stringa+"&aliases=";
-       controllo=stringa.length;
+       stringa=stringa+"&aliases="+encodeURIComponent(top.listaliases)+"&choices="+encodeURIComponent(top.choices)+"&interpretation_choices=";
+  var parsa = "";
+       controllo=parsa.length;
        for (j=0;j<elenco.length;j++)
                {
                if (document.disamb.interp[j].checked)
                        {
-                       stringa=stringa+escape(elenco[j]);
+                       parsa=parsa+encodeURIComponent(elenco[j]);
 
       // TODO da implementare nella terza fase
                        //top.aliasglob[top.aliasglob.length]=document.disamb.interp[j].value;
@@ -567,7 +569,9 @@ function templateambigpdq2_invia(document,elenco)
                        }
                        
                }
-       if (stringa.length!=controllo) 
+  top.interpretation_choices = parsa;
+  stringa=stringa+parsa;
+       if (parsa.length!=controllo) 
                {
                window.open(ask_uwobo(stringa),"cw");
                }
@@ -596,8 +600,9 @@ function get_value_of_checkbox(checkbox)
 function constraints_choice_template_invia(document,aliases,constr_obj_len,constr_rel_len,constr_sort_len)
        {
        stringa=top.topurl+"/"+top.current_query+"?term="+top.terminecic;
-       stringa=stringa+"&aliases="+escape(aliases);
-       stringa=stringa+"&choices="+escape(top.choices);
+       stringa=stringa+"&aliases="+encodeURIComponent(aliases);
+       stringa=stringa+"&choices="+encodeURIComponent(top.choices);
+       stringa=stringa+"&interpretation_choices="+encodeURIComponent(top.interpretation_choices);
        stringa=stringa+"&constraints=";
        for (j=0;j<constr_obj_len;j++)
         {