]> matita.cs.unibo.it Git - helm.git/commitdiff
Many changes in the client-side interfaces:
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Wed, 12 Mar 2003 11:32:37 +0000 (11:32 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Wed, 12 Mar 2003 11:32:37 +0000 (11:32 +0000)
 1. Bug fix: after a SearchPattern query it was impossible to interact
    any more with the "alias" editor. The problem was that the JavaScript
    code assumed the existence of a parent frame that is not always there.
    Closes #24
 2. New release of the client-side interface with some bug fixes in the
    grammar production

12 files changed:
helm/searchEngine/html/aliaslist.html
helm/searchEngine/html/editorpdq.html
helm/searchEngine/html/expr.html
helm/searchEngine/html/grammarpdq.html
helm/searchEngine/html/index.html
helm/searchEngine/html/loc_obj.html
helm/searchEngine/html/pdq.html
helm/searchEngine/html/query_choice.html
helm/searchEngine/html/start.html
helm/searchEngine/html/templateambigpdq1.html
helm/searchEngine/html/templateambigpdq2.html
helm/searchEngine/html/templateambigpdq3.html

index c74e2ca5992ee3df121293c0bf8142cda3a23975..2b5c54163d7c0d52b322bece1a5dac7d5a6d78fe 100644 (file)
@@ -9,7 +9,7 @@ function invia()
                stadd=stadd+parent.alist[num]+" ";
                //alert(stadd);
                }
-       //top.window.open(top.topurl+"/getpage?url=editorpdq.html","sw");
+       //top.window.open(top.topurl+top.action+"editorpdq.html","sw");
        top.window.sw.editalias(stadd);
        //alert(parent.mcq);
        parent.mcq=parent.mcq.replace("<font color=\"#ff0000\">[Alias list]</font>","");
@@ -31,12 +31,14 @@ function rimuovialias()
        {
        //alert(document.aliaslist.elenco.value);
        if (document.aliaslist.elenco.value!=""){
-       for (num=Number(document.aliaslist.elenco.value);num<top.aliasglob.length;num++)
+               for (num=Number(document.aliaslist.elenco.value);num<top.aliasglob.length;num++)
                {
                top.aliasglob[num]=top.aliasglob[num+1];
                }
-       top.aliasglob.length--;
-       parent.aggiorna();}
+               top.aliasglob.length--;
+               //parent.aggiorna();
+               top.window.open(top.topurl+top.action+"aliaslist.html",(top.cw.frames.length==0?"cw":"bw"));
+        }
        }
 function listalias()
        {
@@ -48,10 +50,11 @@ function listalias()
        }
 function addalias()
        {
-       if (parent.idcheck(document.aliaslist.idi.value)==1 && parent.uricheck(document.aliaslist.uri.value)==1)
+       if (top.idcheck(document.aliaslist.idi.value)==1 && top.uricheck(document.aliaslist.uri.value)==1)
                {
                top.aliasglob[top.aliasglob.length]="alias "+document.aliaslist.idi.value+" "+document.aliaslist.uri.value;
-               parent.aggiorna();
+               //parent.aggiorna();
+               top.window.open(top.topurl+top.action+"aliaslist.html",(top.cw.frames.length==0?"cw":"bw"));
                }
        }
 function istruzioni()
@@ -66,14 +69,13 @@ istruzioni();
 <form name="aliaslist" action="Javascript:addalias();" method="get">
 alias
 <input name="idi" type=text size="15">
-<input name="uri" type=text size="45" value="cic:/">
-<input type=submit value="add alias">
-<input type=button value="Done" onClick="top.window.open(top.topurl+'/getpage?url=blank.html','hw');top.window.open(top.topurl+'/getpage?url=editorpdq.html','sw');invia();" ><br>
+<input name="uri" type=text size="45" value="cic:/"><br>
+<input type=submit value="add alias"><input type=button value="delete selected" onClick="rimuovialias()";><br>
 <select name="elenco" size=7>
 <script language=Javascript> listalias(); document.aliaslist.idi.focus(); </script>
 </select>
 <br>
-<input type=button value="delete selected" onClick="rimuovialias()";>
+<input type=button value="Done" onClick="top.window.open(top.topurl+top.action+'blank.html','hw');top.window.open(top.topurl+top.action+'editorpdq.html','sw');invia();" ><br>
 </form>
 </BODY>
 </HTML>
index ae49abc02c803baea2bbb3bdd82bdfdd095ecb72..07aa2b7753848a9f1b593bfa41fe245a3be7eda3 100644 (file)
@@ -9,11 +9,11 @@ function armageddon()
                {
                top.terminecic="";top.listaliases="";top.ricordaliaslist=0;top.vlds=new Array();var alias="";var expr="";
                top.initialize();
-               top.window.open(top.topurl+"/getpage?url=start.html","qw");
-               top.window.open(top.topurl+"/getpage?url=blank.html","cw");
-               top.window.open(top.topurl+"/getpage?url=blank.html","hw");
-               top.window.open(top.topurl+"/getpage?url=blank.html","gw");
-               top.window.open(top.topurl+"/getpage?url=blank.html","sw");
+               top.window.open(top.topurl+top.action+"start.html","qw");
+               top.window.open(top.topurl+top.action+"blank.html","cw");
+               top.window.open(top.topurl+top.action+"blank.html","hw");
+               top.window.open(top.topurl+top.action+"blank.html","gw");
+               top.window.open(top.topurl+top.action+"blank.html","sw");
                }
        }
 function nuovapdqsa()
@@ -23,8 +23,8 @@ function nuovapdqsa()
                top.terminecic="";
                document.invio.expression.value="";document.invio.aliaslist.value=unescape(top.listaliases);
                top.ricordaliaslist=1;
-               window.open(top.topurl+"/getpage?url=pdq.html","cw");
-               window.open(top.topurl+"/getpage?url=editorpdq.html","sw");
+               window.open(top.topurl+top.action+"pdq.html","cw");
+               window.open(top.topurl+top.action+"editorpdq.html","sw");
                }
        }
 function invia()
@@ -39,7 +39,7 @@ function invia()
                //alert(top.listaliases);
     window.open(top.topurl+"/searchPattern?term="+escape(document.invio.expression.value)+"&aliases="+top.listaliases,"cw");
     }
-               //window.open(top.topurl+"/getpage?url=templateambigpdq2.html","bw")}   
+               //window.open(top.topurl+top.action+"templateambigpdq2.html","bw")}     
        else {alert("Please complete the query before.")}
        }
 function warning()
@@ -69,7 +69,7 @@ function listalias()
 function editaalias()
        {
        if (document.invio.expression.value!=""){top.terminecic=escape(document.invio.expression.value)}
-  top.window.open(top.topurl+"/getpage?url=aliaslist.html",(top.cw.frames.length==0?"cw":"bw"));
+       top.window.open(top.topurl+top.action+"aliaslist.html",(top.cw.frames.length==0?"cw":"bw"));
        }
 </SCRIPT>
 </HEAD>
@@ -83,7 +83,7 @@ function editaalias()
 <textarea name="expression" cols="43" rows="6"></textarea><br>Your expression.<br>
 <input type=submit value="Submit" onMouseOver="top.help(-4)"></input>
 <input type=button value="Restart" onMouseOver="top.help(-5)" onClick="armageddon()"></input>
-<input type=button value="New expression" onMouseOver="top.help(-8)" onClick="nuovapdqsa()"></input>
+<input type=button value="New expression" onMouseOver="top.help(-7)" onClick="nuovapdqsa()"></input>
 </form>
 <script language=Javascript>document.invio.expression.value=unescape(top.terminecic); </script>
 </BODY>
index 291b40cc287983c85c4a6d0b43cfadc3fd7c1a9e..bc34e72fed6a713bbf3f7fd7981ffc2f7622f9e1 100644 (file)
@@ -21,9 +21,16 @@ with (document.form1) {
                                {stadd=stadd+"[Expr] "}
                                stadd=stadd+")";
                               }
-       parent.mcq=parent.mcq.replace("<font color=\"#ff0000\">[Expr]</font>",stadd);
+       if (selopt[6].checked) {
+                               stadd=document.form1.id_or_uri.value;
+                               //alert(stadd.substring(0,5));
+                               if (stadd.substring(0,5)=="cic:/") 
+                                       {if (!parent.uricheck(stadd)){stadd="";}}
+                               else if (!parent.idcheck(stadd)){stadd="";}                                     
+                               }
+       if (stadd!="") {parent.mcq=parent.mcq.replace("<font color=\"#ff0000\">[Expr]</font>",stadd);
        //top.qw.document.write(parent.mcq);
-       parent.parse(parent.mcq);
+       parent.parse(parent.mcq);}
                        }
        }
 </SCRIPT>
@@ -45,6 +52,7 @@ You are entering an expression. Select one of the following.
 <option value="?"> ?
 </select> <br>
 <input type="radio" name="selopt"> ( [Expr list] ) <br>
+<input type="radio" name="selopt"> <input name="id_or_uri" type="text" onFocus="selopt[6].checked=true;top.help(-10)"><br>
 <input type=submit value="Select">
 </form>
 </BODY>
index 55fec767328516ab221cbb33863de1328a984015..bd3835bf90eeb3005ec6ad7d4264a78b447f62dd 100644 (file)
@@ -5,18 +5,34 @@
 </HEAD>
 <BODY>
 <a name="Id">
-<p><b>&lt;Id&gt;</b>::=[ 'A-Z' | 'a-z' ][ 'A-Z' | 'a-z' | '0-9' | \- | _ | \' ]*</a>
+<p><b>&lt;Id&gt;</b>::= [ 'A-Z' | 'a-z' ][ 'A-Z' | 'a-z' | '0-9' | \- | _ | \' ]*</a>
 <a name="Uri">
-<p><b>&lt;Uri&gt;</b>::=&lt;<a href="#Conuri">Conuri</a>&gt; | &lt;<a href="#Varuri">Varuri</a>&gt; | &lt;<a href="#Indtyuri">Indtyuri</a>&gt; | &lt;<a href="#Indconuri">Indconuri</a>&gt;</a>
+<p><b>&lt;Uri&gt;</b>::= &lt;<a href="#Conuri">Conuri</a>&gt; | &lt;<a href="#Varuri">Varuri</a>&gt; | &lt;<a href="#Indtyuri">Indtyuri</a>&gt; | &lt;<a href="#Indconuri">Indconuri</a>&gt;</a>
 <a name="Conuri">
-<p><b>&lt;Conuri&gt;</b>::=&quot;cic:/&quot; [&lt;<a href="#Id">Id</a> &quot;/&quot; ]*&lt;<a href="#Id">Id</a>&gt; &quot;.con&quot;</a>
+<p><b>&lt;Conuri&gt;</b>::= &quot;cic:/&quot; [&lt;<a href="#Id">Id</a>&gt; &quot;/&quot; ]*&lt;<a href="#Id">Id</a>&gt; &quot;.con&quot;</a>
 <a name="Varuri">
-<p><b>&lt;Varuri&gt;</b>::=&quot;cic:/&quot; [&lt;<a href="#Id">Id</a>&gt; &quot;/&quot; ]*&lt;<a href="#Id">Id</a>&gt; &quot;.var&quot;</a>
+<p><b>&lt;Varuri&gt;</b>::= &quot;cic:/&quot; [&lt;<a href="#Id">Id</a>&gt; &quot;/&quot; ]*&lt;<a href="#Id">Id</a>&gt; &quot;.var&quot;</a>
 <a name="Indtyuri">
-<p><b>&lt;Indtyuri&gt;</b>::=&quot;cic:/&quot; [&lt;<a href="#Id">Id</a>&gt; &quot;/&quot; ]*&lt;<a href="#Id">Id</a>&gt; &quot;.ind#1/&quot; ['0-9']+</a>
+<p><b>&lt;Indtyuri&gt;</b>::= &quot;cic:/&quot; [&lt;<a href="#Id">Id</a>&gt; &quot;/&quot; ]*&lt;<a href="#Id">Id</a>&gt; &quot;.ind#1/&quot; ['0-9']+</a>
 <a name="Indconuri">
-<p><b>&lt;Indconuri&gt;</b>::=&quot;cic:/&quot; [&lt;<a href="#Id">Id</a>&gt; &quot;/&quot; ]*&lt;<a href="#Id">Id</a>&gt; &quot;.ind#1/&quot; ['0-9']+ &quot;/&quot; ['0-9']+</a>
+<p><b>&lt;Indconuri&gt;</b>::= &quot;cic:/&quot; [&lt;<a href="#Id">Id</a>&gt; &quot;/&quot; ]*&lt;<a href="#Id">Id</a>&gt; &quot;.ind#1/&quot; ['0-9']+ &quot;/&quot; ['0-9']+</a>
 <a name="Exp_Named_Subst">
-<p><b>&lt;Exp_Named_Subst&gt;</b>::=&quot;{&quot; [ [ [&lt;<a href="#Id">Id</a>&gt; | &lt;<a href="#Varuri">Varuri</a>&gt; ] &quot;:=&quot; &lt;Expression&gt; &quot;;&quot; ]* [ [&lt;<a href="#Id">Id</a>&gt; | &lt;<a href="#Varuri">Varuri</a>&gt; ] &quot;:=&quot; &lt;Expression&gt; ] ]? &quot;}&quot;</a>
+<p><b>&lt;Exp_Named_Subst&gt;</b>::= &quot;{&quot; [ [ [&lt;<a href="#Id">Id</a>&gt; | &lt;<a href="#Varuri">Varuri</a>&gt; ] &quot;:=&quot; &lt;Expression&gt; &quot;;&quot; ]* [ [&lt;<a href="#Id">Id</a>&gt; | &lt;<a href="#Varuri">Varuri</a>&gt; ] &quot;:=&quot; &lt;Expression&gt; ] ]? &quot;}&quot;</a>
+<a name="Alias">
+<p><b>&lt;Alias&gt;</b>::= &quot;alias&quot; &lt;<a href="#Id">Id</a>&gt; &lt;<a href="#Uri">Uri</a>&gt;
+<a name="Genid">
+<p><b>&lt;Genid&gt;</b>::= [ &lt;<a href="#Id">Id</a>&gt; | &lt;<a href="#Varuri">Varuri</a>&gt; | &lt;<a href="#Indtyuri">Indtyuri</a>&gt; | &lt;<a href="#Indconuri">Indconuri</a>&gt; ] &lt;<a href="#Exp_Named_Subst">Exp_Named_Subst</a>&gt;
+<a name="Expr">
+<p><b>&lt;Expr&gt;</b>::= &quot;\&quot; &lt;<a href="#Genid">Genid</a>&gt; [ &quot;:&quot; | &quot;:=&quot; ] &lt;<a href="#Expr">Expr</a>&gt;&quot;.&quot;&lt;<a href="#Expr">Expr</a>&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+::= &quot;!&quot; &lt;<a href="#Genid">Genid</a>&gt; &quot;:&quot; &lt;<a href="#Expr">Expr</a>&gt;&quot;.&quot;&lt;<a href="#Expr">Expr</a>&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+::= &lt;<a href="#Expr">Expr</a>&gt;&quot;->&quot;&lt;<a href="#Expr">Expr</a>&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+::= &quot;(&quot; &lt;<a href="#Expr">Expr</a>&gt; &quot;)&quot; &quot;->&quot;&lt;<a href="#Expr">Expr</a>&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+::= &quot;(&quot; &lt;<a href="#Expr">Expr</a>&gt; [ &quot; &quot; &lt;<a href="#Expr">Expr</a>&gt;]* &quot;)&quot;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+::= &quot;Prop&quot; | &quot;Set&quot; | &quot;Type&quot; | &quot;?&quot; | &lt;<a href="#Uri">Uri</a>&gt; | &lt;<a href="#Id">Id</a>&gt;
 </BODY>
 </HTML>
\ No newline at end of file
index d26024e56a08d6b045a812c32eb5f2f87d5d74a7..8cb492b1360cd39b4d98d6b794cfdebe24c585a0 100644 (file)
@@ -46,13 +46,15 @@ function help(w) // quando invocata, visualizza l' help relativo ad un oggetto.
        {
        hw.document.close();
        switch (w)      {
+                       case -10: hw.document.write("Insert an <a href=grammarpdq.html#Id target=gw>Id</a> or an <a href=grammarpdq.html#Uri target=gw>Uri</a> here.")
+                               break;
                        case -9: hw.document.write("By clicking this you may add or remove aliases as you wish.")
                                break;
                        case -81: hw.document.write("Allows you to recover your last input")
                                break;
                        case -8: hw.document.write("Allows you to delete your last input")
                                break;
-                       case -7: hw.document.write("Erases your query and starts a new pre-defined query.")
+                       case -7: hw.document.write("Erases your query and starts a new pre-defined query, you will keep your list of aliases.")
                                break;
                        case -6: hw.document.write("Puts this string in the current cursor position. This button works only with Internet Explorer.")
                                break;
@@ -98,6 +100,61 @@ function tpa(quotpath)
                {quotpath=quotpath.replace(">","&gt;");}
        return (quotpath);
        }
+function idcheck(ident)
+       {
+       lettera=/[a-zA-Z]/;
+       partediid=/[a-zA-Z0-9_\-\']/;
+       if (!lettera.test(ident.charAt(0))){alert("an Id must begin with a letter.");return(0)}
+       while (ident.length>0)
+               {
+               ident=ident.substring(1,(ident.length));
+               if (ident.length>0){
+               if (!partediid.test(ident.charAt(0))){alert(ident.charAt(0)+" is not a valid character for an Id.");return(0);}
+               }}
+       return(1)
+       }
+function uricheck(ident)
+       {
+       cifra=/[0-9]/
+       cic=ident.substring(0,5);//alert(cic);
+       if (cic!="cic:/"){alert("an Uri must begin with the string 'cic:/'");return(0);}
+       ident=ident.substring(5,ident.length);//alert(ident);
+       if (ident.indexOf(".")<0){alert("an Uri must contain a '.'");return(0);}
+       ident1=ident.substring(0,ident.indexOf("."));//alert(ident1);
+       ident2=ident.substring(ident.indexOf(".")+1,ident.length);//alert(ident2);
+       while (ident1.length>0)
+               {       
+               if (ident1.indexOf("/")>-1)             
+                       {
+                       if (idcheck(ident1.substring(0,ident1.indexOf("/")))==0){return (0)}
+                       ident1=ident1.substring(ident1.indexOf("/")+1,ident1.length);//alert(ident1);
+                       }
+               else {if (idcheck(ident1)==0){return (0)}       
+                       ident1="";}
+               }
+       if (ident2=="con"||ident2=="var"){return(1)}
+       if (ident2.substring(0,6)!="ind#1/"){alert ("syntax error in the Uri.");return(0);}
+       ident2=ident2.substring(6,ident2.length);//alert(ident2);
+       if (!cifra.test(ident2.charAt(0))){alert ("syntax error in the Uri.");return(0);}
+       if (ident2.indexOf("/")>-1)
+               {
+               while (ident2.charAt(0)!="/")
+                       {
+                       //alert(ident2);
+                       if (!cifra.test(ident2.charAt(0))){alert ("syntax error in the Uri.");return(0);}
+                       ident2=ident2.substring(1,ident2.length);
+                       }
+               }
+       while (ident2.length>0)
+               {
+               //alert(ident2);
+               ident2=ident2.substring(1,ident2.length);
+               if (ident2.length>0){
+               if (!cifra.test(ident2.charAt(0))){alert ("syntax error in the Uri.");return(0);}
+               }}
+       
+       return(1)
+       }
 function gramcheck(how,what) // esegue il controllo sintattico sulla stringa "what", controllando che rispetti i requisiti indicati dalla clausola "how". Se qualcosa non Ã¨ ok, la variabile "wrong" viene posta ad 1 e la stringa da aggiungere viene ignorata, mentre viene visualizzato un apposito messaggio di errore.             
        {
        var slash=0;
@@ -214,12 +271,12 @@ function aggcw() // invocata automaticamente ad ogni modifica della variabile "q
                        ltr=pq.slice(pq.indexOf("[?"));
                        ltr=ltr.substring(ltr.indexOf("[?"),(ltr.length-ltr.indexOf("[?"))-(ltr.length-ltr.indexOf("]")-1));
                        wto=ltr.substring(2,5);
-                       if (wto=="set") {window.open(top.topurl+"/getpage?url=set.html","cw");pq="";}
-                       else if (wto=="val") {window.open(top.topurl+"/getpage?url=val.html","cw");pq="";}
-                       else if (wto=="bol") {window.open(top.topurl+"/getpage?url=boole.html","cw");pq="";}
+                       if (wto=="set") {window.open(top.topurl+action+"set.html","cw");pq="";}
+                       else if (wto=="val") {window.open(top.topurl+action+"val.html","cw");pq="";}
+                       else if (wto=="bol") {window.open(top.topurl+action+"boole.html","cw");pq="";}
                        else pq=pq.substring(pq.indexOf("[?")+2,pq.length);
                        }
-               else {window.open(top.topurl+"/getpage?url=blank.html","cw");pq="";}
+               else {window.open(top.topurl+action+"blank.html","cw");pq="";}
                } 
        }
 function aggform() // aggiorna il form nel frame centrale. Invocata ad ogni cambio della variabile "query".
@@ -293,7 +350,7 @@ function annulla()
                qw.document.write(query);
                aggform();
                sw.apply();
-               if (query=="*"){cw.location=top.topurl+"/getpage?url=set.html";ltr="*";} else {aggcw();}
+               if (query=="*"){cw.location=top.topurl+action+"set.html";ltr="*";} else {aggcw();}
                cw.focus();
                }
        }
@@ -302,34 +359,34 @@ function parse() // prende la stringa che si sta tentando di inserire nella quer
        while (fb.indexOf("[set]")>-1){
        if (fb.indexOf("set")>0)
                {
-      fb=fb.replace("[set]","<A HREF="+top.topurl+"/getpage?url=set.html target=cw onclick=top.savelink("+top.storeps+",'s')>[?set"+top.storeps+"]</A>");
+      fb=fb.replace("[set]","<A HREF="+top.topurl+action+"set.html target=cw onclick=top.savelink("+top.storeps+",'s')>[?set"+top.storeps+"]</A>");
                top.storeps++;
                }
                                         }
        while (fb.indexOf("[val]")>-1){
        if (fb.indexOf("val")>0)
                {
-      fb=fb.replace("[val]","<A HREF="+top.topurl+"/getpage?url=val.html target=cw onclick=top.savelink("+top.storepv+",'v')>[?val"+top.storepv+"]</A>");
+      fb=fb.replace("[val]","<A HREF="+top.topurl+action+"val.html target=cw onclick=top.savelink("+top.storepv+",'v')>[?val"+top.storepv+"]</A>");
                top.storepv++;
                }
                                         }
        while (fb.indexOf("[boole]")>-1){
        if (fb.indexOf("boole")>0)
                {
-               fb=fb.replace("[boole]","<A HREF="+top.topurl+"/getpage?url=boole.html target=cw onclick=top.savelink("+top.storepb+",'b')>[?bol"+top.storepb+"]</A>");
+               fb=fb.replace("[boole]","<A HREF="+top.topurl+action+"boole.html target=cw onclick=top.savelink("+top.storepb+",'b')>[?bol"+top.storepb+"]</A>");
                top.storepb++;
                }
                                         }
        }
 function aggq() // aggiorna la query sostituendo l' ultimo link editato con la stringa inserita, poi aggiorna tutti i frame.
        {
-       //window.open(top.topurl+"/getpage?url=summary.html","cw");
+       //window.open(top.topurl+action+"summary.html","cw");
        qw.document.close();
        fb=stadd;       
        nst=ltr.substring(5,(ltr.length-1));// alert(nst+" "+ltr);
-       query=query.replace("<A HREF="+top.topurl+"/getpage?url=set.html target=cw onclick=top.savelink("+nst+",'s')>"+ltr+"</A>",ltr);
-       query=query.replace("<A HREF="+top.topurl+"/getpage?url=val.html target=cw onclick=top.savelink("+nst+",'v')>"+ltr+"</A>",ltr);
-       query=query.replace("<A HREF="+top.topurl+"/getpage?url=boole.html target=cw onclick=top.savelink("+nst+",'b')>"+ltr+"</A>",ltr);
+       query=query.replace("<A HREF="+top.topurl+action+"set.html target=cw onclick=top.savelink("+nst+",'s')>"+ltr+"</A>",ltr);
+       query=query.replace("<A HREF="+top.topurl+action+"val.html target=cw onclick=top.savelink("+nst+",'v')>"+ltr+"</A>",ltr);
+       query=query.replace("<A HREF="+top.topurl+action+"boole.html target=cw onclick=top.savelink("+nst+",'b')>"+ltr+"</A>",ltr);
        parse();
        query=query.replace(ltr,fb);
        actinput++;storia[actinput]=query;numeroazioniannullate=0;//alert (actinput+" "+storia.length);
@@ -337,10 +394,13 @@ function aggq() // aggiorna la query sostituendo l' ultimo link editato con la s
        aggcw();
        cw.focus();
        }
-  var topurl=document.location.protocol+'//'+document.location.host;
+var topurl=document.location.protocol+'//'+document.location.host;
+//var topurl="";
+var action="/getpage?url=";
+//var action="";
 </SCRIPT>
 </HEAD>
   <script>
-    document.write(' <FRAMESET ROWS="69%,31%"> <FRAMESET COLS="40%,60%"> <FRAMESET ROWS="46%,54%"> <FRAME NAME="qw" SRC="'+topurl+'/getpage?url=start.html"> <FRAME NAME="sw" SRC="'+topurl+'/getpage?url=blank.html"> </FRAMESET> <FRAME NAME="cw" SRC="'+topurl+'/getpage?url=blank.html"> </FRAMESET> <FRAMESET COLS="49%,51%"> <FRAME NAME="gw" SRC="'+topurl+'/getpage?url=blank.html" onFocus="help(-1)";> <FRAME NAME="hw" SRC="'+topurl+'/getpage?url=blank.html"> </FRAMESET> </FRAMESET>');
+    document.write(' <FRAMESET ROWS="69%,31%"> <FRAMESET COLS="40%,60%"> <FRAMESET ROWS="46%,54%"> <FRAME NAME="qw" SRC="'+topurl+action+'start.html"> <FRAME NAME="sw" SRC="'+topurl+action+'blank.html"> </FRAMESET> <FRAME NAME="cw" SRC="'+topurl+action+'blank.html"> </FRAMESET> <FRAMESET COLS="49%,51%"> <FRAME NAME="gw" SRC="'+topurl+action+'blank.html" onFocus="help(-1)";> <FRAME NAME="hw" SRC="'+topurl+action+'blank.html"> </FRAMESET> </FRAMESET>');
   </script>
 </HTML>
index 97e831400a1a78437fccd3b31e5afaaa024c7452..1a87db14983ad3296cf9bcc5ac65be67cf8cadf9 100644 (file)
@@ -4,7 +4,7 @@
 function invia()
        {
        top.window.open(top.topurl+"/locate?id="+document.locate.oggetto.value,"bw");
-       //top.window.open(top.topurl+"/getpage?url=blank.html","bw");
+       //top.window.open(top.topurl+top.action+"blank.html","bw");
        }
 </SCRIPT>
 </HEAD>
index 9088ad49585350eecd3bedbcaba73fc9d4bb4b7c..6ab4aa94bb66a5d79d5fa122b4181ba70c633e95 100644 (file)
@@ -8,75 +8,20 @@ var calias=0;
 function armageddon()
        {
        top.initialize();
-       top.window.open(top.topurl+"/getpage?url=start.html","qw");
-       top.window.open(top.topurl+"/getpage?url=blank.html","cw");
-       top.window.open(top.topurl+"/getpage?url=blank.html","hw");
-       top.window.open(top.topurl+"/getpage?url=blank.html","gw");
-       top.window.open(top.topurl+"/getpage?url=blank.html","sw");
-       }
-function idcheck(ident)
-       {
-       lettera=/[a-zA-Z]/;
-       partediid=/[a-zA-Z0-9_\-\']/;
-       if (!lettera.test(ident.charAt(0))){alert("an Id must begin with a letter.");return(0)}
-       while (ident.length>0)
-               {
-               ident=ident.substring(1,(ident.length));
-               if (ident.length>0){
-               if (!partediid.test(ident.charAt(0))){alert(ident.charAt(0)+" is not a valid character for an Id.");return(0);}
-               }}
-       return(1)
-       }
-function uricheck(ident)
-       {
-       cifra=/[0-9]/
-       cic=ident.substring(0,5);//alert(cic);
-       if (cic!="cic:/"){alert("an Uri must begin with the string 'cic:/'");return(0);}
-       ident=ident.substring(5,ident.length);//alert(ident);
-       if (ident.indexOf(".")<0){alert("an Uri must contain a '.'");return(0);}
-       ident1=ident.substring(0,ident.indexOf("."));//alert(ident1);
-       ident2=ident.substring(ident.indexOf(".")+1,ident.length);//alert(ident2);
-       while (ident1.length>0)
-               {       
-               if (ident1.indexOf("/")>-1)             
-                       {
-                       if (idcheck(ident1.substring(0,ident1.indexOf("/")))==0){return (0)}
-                       ident1=ident1.substring(ident1.indexOf("/")+1,ident1.length);//alert(ident1);
-                       }
-               else {if (idcheck(ident1)==0){return (0)}       
-                       ident1="";}
-               }
-       if (ident2=="con"||ident2=="var"){return(1)}
-       if (ident2.substring(0,6)!="ind#1/"){alert ("syntax error in the Uri.");return(0);}
-       ident2=ident2.substring(6,ident2.length);//alert(ident2);
-       if (!cifra.test(ident2.charAt(0))){alert ("syntax error in the Uri.");return(0);}
-       if (ident2.indexOf("/")>-1)
-               {
-               while (ident2.charAt(0)!="/")
-                       {
-                       //alert(ident2);
-                       if (!cifra.test(ident2.charAt(0))){alert ("syntax error in the Uri.");return(0);}
-                       ident2=ident2.substring(1,ident2.length);
-                       }
-               }
-       while (ident2.length>0)
-               {
-               //alert(ident2);
-               ident2=ident2.substring(1,ident2.length);
-               if (ident2.length>0){
-               if (!cifra.test(ident2.charAt(0))){alert ("syntax error in the Uri.");return(0);}
-               }}
-       
-       return(1)
+       top.window.open(top.topurl+top.action+"start.html","qw");
+       top.window.open(top.topurl+top.action+"blank.html","cw");
+       top.window.open(top.topurl+top.action+"blank.html","hw");
+       top.window.open(top.topurl+top.action+"blank.html","gw");
+       top.window.open(top.topurl+top.action+"blank.html","sw");
        }
 function aggiorna()
        {
-       window.open(top.topurl+"/getpage?url=aliaslist.html","bw");
+       window.open(top.topurl+top.action+"aliaslist.html","bw");
        top.cw.bw.document.aliaslist.idi.focus();
        }
 function aggiorna2()
        {
-       window.open(top.topurl+"/getpage?url=expnamedsubst.html","bw");
+       window.open(top.topurl+top.action+"expnamedsubst.html","bw");
        bw.document.aliaslist.varid.focus();
        }
 function parse() 
@@ -91,19 +36,19 @@ function parse()
                top.qw.document.write(mcq);
                if (mcq.charAt(mcq.indexOf("[")+1)=="A")
                        {
-                       window.open(top.topurl+"/getpage?url=aliaslist.html","bw")
+                       window.open(top.topurl+top.action+"aliaslist.html","bw")
                        }
                if (mcq.charAt(mcq.indexOf("[")+1)=="E")
                        {
-                       window.open(top.topurl+"/getpage?url=expr.html","bw")
+                       window.open(top.topurl+top.action+"expr.html","bw")
                        }
                if (mcq.charAt(mcq.indexOf("[")+1)=="G")
                        {
-                       window.open(top.topurl+"/getpage?url=genid.html","bw")
+                       window.open(top.topurl+top.action+"genid.html","bw")
                        }
                if (mcq.charAt(mcq.indexOf("[")+1)=="e")
                        {
-                       window.open(top.topurl+"/getpage?url=expnamedsubst.html","bw")
+                       window.open(top.topurl+top.action+"expnamedsubst.html","bw")
                        }
                }
                else 
@@ -113,8 +58,8 @@ function parse()
                                mcq=mcq.replace("&gt;",">");
                                }
                        top.window.sw.editexpr(mcq);
-                       window.open(top.topurl+"/getpage?url=blank.html","bw");
-                       window.open(top.topurl+"/getpage?url=blank.html","qw");
+                       window.open(top.topurl+top.action+"blank.html","bw");
+                       window.open(top.topurl+top.action+"blank.html","qw");
                        }
        }       
 function aggq()
@@ -125,6 +70,6 @@ function aggq()
 </SCRIPT>
 </HEAD>
 <script>
-  document.write(' <frameset rows="24%,76%" border="0" noresize> <frame name=tw src="'+top.topurl+'/getpage?url=query_choice.html";> <frame name=bw src="'+top.topurl+'/getpage?url=blank.html";> </frameset> ');
+  document.write(' <frameset rows="24%,76%" border="0" noresize> <frame name=tw src="'+top.topurl+top.action+'query_choice.html";> <frame name=bw src="'+top.topurl+top.action+'blank.html";> </frameset> ');
 </script>
 </HTML>
index 8cb800ffd76f24db5c08a900f8d1ddda55b44952..2f560bf0a0b378424b99bcea6bd5dad98a3510fe 100644 (file)
@@ -4,27 +4,27 @@
 function armageddon()
        {
        top.initialize();
-       top.window.open(top.topurl+"/getpage?url=start.html","qw");
-       top.window.open(top.topurl+"/getpage?url=blank.html","cw");
-       top.window.open(top.topurl+"/getpage?url=blank.html","hw");
-       top.window.open(top.topurl+"/getpage?url=blank.html","gw");
-       top.window.open(top.topurl+"/getpage?url=blank.html","sw");
+       top.window.open(top.topurl+top.action+"start.html","qw");
+       top.window.open(top.topurl+top.action+"blank.html","cw");
+       top.window.open(top.topurl+top.action+"blank.html","hw");
+       top.window.open(top.topurl+top.action+"blank.html","gw");
+       top.window.open(top.topurl+top.action+"blank.html","sw");
        }
 </SCRIPT>
 </HEAD>
 <BODY>
 <form>
 <table><tr><td>
-      <input type=radio name="qc" onFocus="top.cw.bw.location=top.topurl+'/getpage?url=loc_obj.html';top.qw.location=top.topurl+'/getpage?url=blank.html';top.sw.location=top.topurl+'/getpage?url=blank.html';top.gw.location=top.topurl+'/getpage?url=blank.html';parent.toq=1;this.blur();"> Locate Object<br>
-      <input type=radio name="qc" onFocus="top.cw.bw.location=top.topurl+'/getpage?url=mat_con.html';top.qw.location=top.topurl+'/getpage?url=blank.html';top.sw.location=top.topurl+'/getpage?url=editorpdq.html';parent.toq=2;this.blur();"> Match Conclusion<br>
-      <input type=radio name="qc" onFocus="top.cw.bw.location=top.topurl+'/getpage?url=mat_con.html';top.qw.location=top.topurl+'/getpage?url=blank.html';top.sw.location=top.topurl+'/getpage?url=editorpdq.html';parent.toq=3;this.blur();"> Search Pattern
+      <input type=radio name="qc" onFocus="top.cw.bw.location=top.topurl+top.action+'loc_obj.html';top.qw.location=top.topurl+top.action+'blank.html';top.sw.location=top.topurl+top.action+'blank.html';top.gw.location=top.topurl+top.action+'blank.html';parent.toq=1;this.blur();"> Locate Object<br>
+      <input type=radio name="qc" onFocus="top.cw.bw.location=top.topurl+top.action+'mat_con.html';top.qw.location=top.topurl+top.action+'blank.html';top.sw.location=top.topurl+top.action+'editorpdq.html';parent.toq=2;this.blur();"> Match Conclusion<br>
+      <input type=radio name="qc" onFocus="top.cw.bw.location=top.topurl+top.action+'mat_con.html';top.qw.location=top.topurl+top.action+'blank.html';top.sw.location=top.topurl+top.action+'editorpdq.html';parent.toq=3;this.blur();"> Search Pattern
 </td>
 </tr></table>
 </form>
 <SCRIPT language="Javascript">
 if (top.ricordaliaslist==1)
        {
-       window.open(top.topurl+"/getpage?url=expr.html","bw");parent.mcq="<font color=\"#ff0000\">[Expr]</font>";
+       window.open(top.topurl+top.action+"expr.html","bw");parent.mcq="<font color=\"#ff0000\">[Expr]</font>";
        top.qw.document.close();top.qw.document.write("<font color=\"#ff0000\">[Expr]</font>");
        }
 </script>
index ceaea48c0d520902a0d9f7ff9a1bbb31bad2ff00..3984ddd5d6a5b2ed7298206e1fb0d8a7b84da154 100644 (file)
@@ -5,9 +5,9 @@
 </HEAD>
 <BODY>
 <center>
-  <input type=button value="Compose a query" onClick="top.cw.location=top.topurl+'/getpage?url=set.html';top.gw.location=top.topurl+'/getpage?url=grammar.html#set';top.sw.location=top.topurl+'/getpage?url=editor.html';top.qw.location=top.topurl+'/getpage?url=blank.html';top.initialize();">
+  <input type=button value="Compose a query" onClick="top.cw.location=top.topurl+top.action+'set.html';top.gw.location=top.topurl+top.action+'grammar.html#set';top.sw.location=top.topurl+top.action+'editor.html';top.qw.location=top.topurl+top.action+'blank.html';top.initialize();">
 <br><br>
-<input type=button value="Submit a pre-defined query" onClick="top.cw.location=top.topurl+'/getpage?url=pdq.html';top.gw.location=top.topurl+'/getpage?url=blank.html';top.sw.location=top.topurl+'/getpage?url=blank.html';top.qw.location=top.topurl+'/getpage?url=blank.html';top.initialize();"> 
+<input type=button value="Submit a pre-defined query" onClick="top.cw.location=top.topurl+top.action+'pdq.html';top.gw.location=top.topurl+top.action+'blank.html';top.sw.location=top.topurl+top.action+'blank.html';top.qw.location=top.topurl+top.action+'blank.html';top.initialize();"> 
 </center>
 </BODY>
 </HTML>
index 30b23ec9196d54d3f834d16f809511d38865ffc4..d5fa12260c9925f9be81dbb7c8c0c8632545e9be 100644 (file)
@@ -8,11 +8,11 @@ var id = "@ID@";
 function armageddon()
        {
        top.initialize();
-       top.window.open(top.topurl+"/getpage?url=start.html","qw");
-       top.window.open(top.topurl+"/getpage?url=blank.html","cw");
-       top.window.open(top.topurl+"/getpage?url=blank.html","hw");
-       top.window.open(top.topurl+"/getpage?url=blank.html","gw");
-       top.window.open(top.topurl+"/getpage?url=blank.html","sw");
+       top.window.open(top.topurl+top.action+"start.html","qw");
+       top.window.open(top.topurl+top.action+"blank.html","cw");
+       top.window.open(top.topurl+top.action+"blank.html","hw");
+       top.window.open(top.topurl+top.action+"blank.html","gw");
+       top.window.open(top.topurl+top.action+"blank.html","sw");
        }
 function resetta()
        {
index 71fe4365649c4e48d3e38280441a511e40c930a6..aea273c0b5e3d0735530944f1dad535940559660 100644 (file)
@@ -6,11 +6,11 @@ labels = new Array(@INTERPRETATIONS_LABELS@);
 function armageddon()
        {
        top.initialize();
-       top.window.open(top.topurl+"/getpage?url=start.html","qw");
-       top.window.open(top.topurl+"/getpage?url=blank.html","cw");
-       top.window.open(top.topurl+"/getpage?url=blank.html","hw");
-       top.window.open(top.topurl+"/getpage?url=blank.html","gw");
-       top.window.open(top.topurl+"/getpage?url=blank.html","sw");
+       top.window.open(top.topurl+top.action+"start.html","qw");
+       top.window.open(top.topurl+top.action+"blank.html","cw");
+       top.window.open(top.topurl+top.action+"blank.html","hw");
+       top.window.open(top.topurl+top.action+"blank.html","gw");
+       top.window.open(top.topurl+top.action+"blank.html","sw");
        }
 function resetta()
        {
index aa6ba6b6e6fd7882e993b95682aaee6d89e9c709..e11cdb8c7de0c0dc551e2e80115e52579507b863 100644 (file)
@@ -6,7 +6,7 @@
                        for (i=0; i<aliases.length; i++) {
                                top.aliasglob[i] = aliases[i];
                        }
-                       top.window.open(top.topurl+"/getpage?url=editorpdq.html", "sw");
+                       top.window.open(top.topurl+top.action+"editorpdq.html", "sw");
                </script>
        </head>
        <body>