From bbrossaud@users.chorem.org Mon May 10 18:47:41 2010 From: bbrossaud@users.chorem.org To: bow-commits@list.chorem.org Subject: [Bow-commits] r15 - in trunk/src/main: java/org/chorem/bow webapp Date: Mon, 10 May 2010 18:47:41 +0200 Message-ID: <20100510164741.3552159D81@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0967390545497592082==" --===============0967390545497592082== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: bbrossaud Date: 2010-05-10 18:47:41 +0200 (Mon, 10 May 2010) New Revision: 15 Url: http://chorem.org/repositories/revision/bow/15 Log: the autobookmark almost work Modified: trunk/src/main/java/org/chorem/bow/ControllerServlet.java trunk/src/main/webapp/generateToken.jsp trunk/src/main/webapp/search.jsp Modified: trunk/src/main/java/org/chorem/bow/ControllerServlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-05-10 12:4= 7:12 UTC (rev 14) +++ trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-05-10 16:4= 7:41 UTC (rev 15) @@ -25,16 +25,18 @@ =20 /** * javascript: - * server =3D new XMLHttpRequest(); - * var url=3Dlocation.href; - * var nameAndTags =3D prompt("Entrez le nom du lien et la liste des tags = sous la forme: |tag1,tag2,tag3", document.title+'|'); - * server.onreadystatechange =3D function() { - * if(server.readyState =3D=3D 4) - * if (server.status !=3D 200) - * alert("Error d'ajout au bookmark: "+ server.status + "\n\n" + url= + "\n\n" + nameAndTags); - * }; - * server.open("GET", 'http://localhost:8080/bow?action=3DaddUrl&url=3D'+e= ncodeURIComponent(url)+'&nameAndtags=3D'+encodeURIComponent(nameAndTags), tru= e); - * server.send(null); + * var server =3D new XMLHttpRequest(); + * var url=3Dlocation.href; + * var nameAndTags =3D prompt('Entrez le nom du lien et la liste des tags s= ous la forme: name|tag1 tag2 tag3', document.title+'|'); + * server.onreadystatechange =3D function() { + * if(server.readyState =3D=3D 4) { + * if (server.status !=3D 200) { + * alert('Erreur d\'ajout au bookmark: '+ server.status + '\n\n= ' + url + '\n\n' + nameAndTags); + * } + * } + * }; + * server.open('GET', 'http://localhost:8080/bow/bow?action=3DaddUrl&url=3D= '+encodeURIComponent(url)+'&nameAndTags=3D'+encodeURIComponent(nameAndTags), = true); + * server.send(null); * * @author bbrossaud */ Modified: trunk/src/main/webapp/generateToken.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/src/main/webapp/generateToken.jsp 2010-05-10 12:47:12 UTC (rev 14) +++ trunk/src/main/webapp/generateToken.jsp 2010-05-10 16:47:41 UTC (rev 15) @@ -7,8 +7,7 @@ =20 Use it to add new bookmarks without authentication :

=20 -javascript:server%20=3D%20new%20XMLHttpRequest();%20url=3Dlocation.href;name= AndTags%20=3D%20prompt("Entrez%20le%20nom%20du%20lien%20et%20la%20liste%20des= %20tags%20sous%20la%20forme:%20|tag1,tag2,tag3",%20document.title+'|');= server.onreadystatechange%20=3D%20function()%20{%20if(server.readyState%20=3D= =3D%204)%20if%20(server.status%20!=3D%20200)%20alert("Error%20d'ajout%20au%20= bookmark:%20"+%20server.status%20+%20"\n\n"%20+%20url%20+%20"\n\n"%20+%20name= AndTags);};server.open("GET",%20'http://localhost:8080/bow/bow?action=3DaddUr= l&token=3D<%=3Dtoken%>&url=3D'+encodeURIComponent(url)+'&nameAndTags=3D'+enco= deURIComponent(nameAndTags),%20true);server.send(null); - +&url=3D'+encodeURIComponent(url)+'&nameAndTags=3D'+encodeURICompone= nt(nameAndTags);image.src=3Dlink;document.body.appendChild(image);document.lo= cation.href=3DencodeURIComponent(url);">Session <% } else { %> Modified: trunk/src/main/webapp/search.jsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/src/main/webapp/search.jsp 2010-05-10 12:47:12 UTC (rev 14) +++ trunk/src/main/webapp/search.jsp 2010-05-10 16:47:41 UTC (rev 15) @@ -19,12 +19,13 @@ =20 +

Generate Token

+
" >
=20 -
Generate Token
=20 <% if (bookmarkActions !=3D null) { Map tagsCloud =3D bookmarkActions.getTagsCloud(); --===============0967390545497592082==--