From bbrossaud@users.chorem.org Wed Jun 9 11:48:31 2010 From: bbrossaud@users.chorem.org To: bow-commits@list.chorem.org Subject: [Bow-commits] r70 - in trunk/src/main: java/org/chorem/bow webapp webapp/css Date: Wed, 09 Jun 2010 11:48:31 +0200 Message-ID: <20100609094831.0C54F15926@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5010429469656468621==" --===============5010429469656468621== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: bbrossaud Date: 2010-06-09 11:48:30 +0200 (Wed, 09 Jun 2010) New Revision: 70 Url: http://chorem.org/repositories/revision/bow/70 Log: cut the home jsp and search jsp Added: trunk/src/main/webapp/bookmark.jsp trunk/src/main/webapp/tagsCloud.jsp Modified: trunk/src/main/java/org/chorem/bow/BookmarkActions.java trunk/src/main/webapp/bookmarkHome.jsp trunk/src/main/webapp/bookmarkSearch.jsp trunk/src/main/webapp/css/bookmark.css Modified: trunk/src/main/java/org/chorem/bow/BookmarkActions.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/BookmarkActions.java 2010-06-08 15:12:= 08 UTC (rev 69) +++ trunk/src/main/java/org/chorem/bow/BookmarkActions.java 2010-06-09 09:48:= 30 UTC (rev 70) @@ -413,7 +413,7 @@ public int getFont(int ti) { int font =3D 1; if (tmax > tmin) { - font =3D (50 * (ti - tmin)) / (tmax - tmin); // get the font siz= e for a tag frequency + font =3D (30 * (ti - tmin)) / (tmax - tmin); // get the font siz= e for a tag frequency } if (font < 10) { font =3D 10; Added: trunk/src/main/webapp/bookmark.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/bookmark.jsp (rev 0) +++ trunk/src/main/webapp/bookmark.jsp 2010-06-09 09:48:30 UTC (rev 70) @@ -0,0 +1,70 @@ +<%@page import=3D"org.chorem.bow.Bookmark" %> +<%@page import=3D"java.text.SimpleDateFormat" %> +<%@page import=3D"org.chorem.bow.BookmarkActions" %> +<%@page import=3D"java.util.Set" %> + +<% + Bookmark bookmark =3D (Bookmark) request.getAttribute("bookmark"= ); + BookmarkActions bookmarkActions =3D (BookmarkActions) request.ge= tAttribute("bookmarkActions"); + SimpleDateFormat sdf =3D (SimpleDateFormat) request.getAttribute= ("sdf"); + String url =3D (String) request.getAttribute("bowUrl"); + String search =3D ""; + String searchLine =3D request.getParameter("searchLine"); + if (searchLine !=3D null) { + search +=3D "&searchLine=3D" + searchLine; + } + String fullTextLine =3D request.getParameter("fullTextLine"); + if (fullTextLine !=3D null) { + search +=3D "&fullTextLine=3D" + fullTextLine; + } + if (url !=3D null && bookmark !=3D null && sdf !=3D null && book= markActions !=3D null) { + String formBookmarkId =3D (String) request.getAttribute("for= mBookmarkId"); + String link =3D bookmark.getLink(); + link =3D link.replace("'", "\\'"); +%> + + +
+
+ 3D"web + " title=3D"<%=3Durl + boo= kmark.getAlias()%>" target=3D"_blank"> + <%=3Dbookmark.getAlias()%> + + (<%=3Dsdf.format(bookmark.getDate())%>) + <%=3Dsearch%>" onclick=3D"return modify('<%=3Dboo= kmark.getDescription()%>', '<%=3Dbookmark.getAlias()%>', '<%=3DBookmarkAction= s.getBookmarkTagsString(bookmark)%>', '<%=3Dlink%>', 'bow?action=3DmodifyBook= mark&bookmarkId=3D<%=3Dbookmark.getWikittyId()%><%=3Dsearch%>', '<%=3Dbookmar= k.getWikittyId()%>');"> + <%=3Dsearch%>"> +
+
+
+
+

Description :

+

+ " href=3D"bow?action= =3DaddClick&bookmarkId=3D<%=3Dbookmark.getWikittyId()%>" target=3D"_blank"><%= =3Dbookmark.getDescription()%> +

+

+ Tags : + <% + Set tagList =3D bookmark.getTags(); + if (tagList !=3D null && !tagList.isEmpty())= { + for (String tag : tagList) { + if (formBookmarkId !=3D null && form= BookmarkId.equals(bookmark.getWikittyId())) { + %> + &deleteTag=3D<%=3Dtag%><%= =3Dsearch%>" > + =3D"Delete + + <%} else {%> + " style=3D"display:= none; text-decoration: none;" href=3D"bow?action=3DdeleteTag&bookmarkId=3D<%= =3Dbookmark.getWikittyId()%>&deleteTag=3D<%=3Dtag%><%=3Dsearch%>" > + =3D"Delete + + <%}%> + " styl= e=3D"text-decoration: none"><%=3Dtag%> + <% + } + } + %> +

+
+
<%=3Dbookmark.getClick()%>
+
+
+<%}%> Modified: trunk/src/main/webapp/bookmarkHome.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/bookmarkHome.jsp 2010-06-08 15:12:08 UTC (rev 69) +++ trunk/src/main/webapp/bookmarkHome.jsp 2010-06-09 09:48:30 UTC (rev 70) @@ -29,9 +29,9 @@ nbTags =3D preference.getTags(); } } + request.setAttribute("nbTags", nbTags); String formLink =3D (String) request.getAttribute("link"); String formName =3D (String) request.getAttribute("name"); - String formBookmarkId =3D (String) request.getAttribute("boo= kmarkId"); String formTags =3D (String) request.getAttribute("tags"); String formAlias =3D (String) request.getAttribute("alias"); String formAction =3D (String) request.getAttribute("action"= ); @@ -81,51 +81,10 @@ if (!bookmarkList.isEmpty()) { int count =3D 0; for (Bookmark bookmark : bookmarkLis= t) { - String link =3D bookmark.getLink= (); - link =3D link.replace("'", "\\'"= ); + request.setAttribute("bookmark",= bookmark); + request.setAttribute("sdf", sdf); %> -
-
- " tit= le=3D"<%=3Durl + bookmark.getAlias()%>" target=3D"_blank"> - <%=3Dbookmark.getAlias()%> - - (<%=3Dsdf.format(bookmark.getDate())%>) - " onclick=3D"return modify('<%= =3Dbookmark.getDescription()%>', '<%=3Dbookmark.getAlias()%>', '<%=3DBookmark= Actions.getBookmarkTagsString(bookmark)%>', '<%=3Dlink%>', 'bow?action=3Dmodi= fyBookmark&bookmarkId=3D<%=3Dbookmark.getWikittyId()%>', '<%=3Dbookmark.getWi= kittyId()%>');"> - "> -
-
-
-
-

Description :

-

- " = href=3D"bow?action=3DaddClick&bookmarkId=3D<%=3Dbookmark.getWikittyId()%>" ta= rget=3D"_blank"><%=3Dbookmark.getDescription()%> -

-

- Tags : - <% - = Set tagList =3D bookmark.getTags(); - = if (tagList !=3D null && !tagList.isEmpty()) { - = for (String tag : tagList) { - = if (formBookmarkId !=3D null && formBookmarkId.equals(bookmark.ge= tWikittyId())) { - %> - &delete= Tag=3D<%=3Dtag%>" > - 3D"Delete - - <%} else {%> - " style=3D"display:none; text-decoration: none;" href=3D"bow?action=3Ddelete= Tag&bookmarkId=3D<%=3Dbookmark.getWikittyId()%>&deleteTag=3D<%=3Dtag%>" > - 3D"Delete - - <%}%> - " style=3D"text-decoration: none"><%=3Dtag%> - <% - = } - = } - %> -

-
-
<%=3Dbookmark.getClick()%><= /div> -
-
+ <% ++count; if (count >= =3D nbBookmarks) { @@ -148,52 +107,10 @@ if (!lastBookmarks.isEmpty()) { int count =3D 0; for (Bookmark bookmark : lastBookmar= ks) { - String link =3D bookmark.getLink= (); - link =3D link.replace("'", "\\'"= ); + request.setAttribute("bookmark",= bookmark); + request.setAttribute("sdf", sdf); %> -
- -
-
-
-

Description :

-

- " = href=3D"bow?action=3DaddClick&bookmarkId=3D<%=3Dbookmark.getWikittyId()%>" ta= rget=3D"_blank"><%=3Dbookmark.getDescription()%> -

-

- Tags : - <% - = Set tagList =3D bookmark.getTags(); - = if (tagList !=3D null && !tagList.isEmpty()) { - = for (String tag : tagList) { - = if (formBookmarkId !=3D null && formBookmarkId.equals(bookmark.ge= tWikittyId())) { - %> - &delete= Tag=3D<%=3Dtag%>" > - 3D"Delete - - <%} else {%> - " style=3D"display:none; text-decoration: none;" href=3D"bow?action=3Ddelete= Tag&bookmarkId=3D<%=3Dbookmark.getWikittyId()%>&deleteTag=3D<%=3Dtag%>" > - 3D"Delete - - <%}%> - " style=3D"text-decoration: none"><%=3Dtag%> - <% - = } - = } - %> -

-
-
<%=3Dbookmark.getClick()%><= /div> -
-
- + <% ++count; if (count >= =3D nbBookmarks) { @@ -215,23 +132,7 @@
  • Regenerate pe= rmanent token
  • - <% if (bookmarkActions !=3D null) { - List tagCloud =3D bookma= rkActions.getTagsCloud(); - int count =3D 0; - for (FacetTopic tag : tagCloud) { - int value =3D tag.getCount(); - String tagName =3D tag.getTopicN= ame(); - int font =3D bookmarkActions.get= Font(value); - %> - " = title=3D"<%=3Dvalue%> results" class=3D"tag" style=3D"font-size: <%=3Dfont%>p= x;"><%=3DtagName%> - <% - ++count; - if (count >=3D nbTags) { - break; - } - } - } - %> +

    Research

    @@ -255,8 +156,9 @@

    Import Bookmarks

    - - + +
    +
    Export bookmark= s Modified: trunk/src/main/webapp/bookmarkSearch.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/bookmarkSearch.jsp 2010-06-08 15:12:08 UTC (rev 69) +++ trunk/src/main/webapp/bookmarkSearch.jsp 2010-06-09 09:48:30 UTC (rev 70) @@ -27,9 +27,9 @@ nbTags =3D preference.getTags(); } } + request.setAttribute("nbTags", nbTags); String formLink =3D (String) request.getAttribute("link"); String formName =3D (String) request.getAttribute("name"); - String formBookmarkId =3D (String) request.getAttribute("boo= kmarkId"); String formTags =3D (String) request.getAttribute("tags"); String formAlias =3D (String) request.getAttribute("alias"); String formAction =3D (String) request.getAttribute("action"= ); @@ -90,48 +90,13 @@ if (!bookmarkList.isEmpty()) { SimpleDateFormat sdf =3D new SimpleD= ateFormat("dd/MM/yyyy"); for (Bookmark bookmark : bookmarkLis= t) { - String link =3D bookmark.getLink= (); - link =3D link.replace("'", "\\'"= ); + request.setAttribute("bookmark",= bookmark); + request.setAttribute("sdf", sdf); %> -
    - -
    -
    - -
    <%=3Dbookmark.getClick()%><= /div> -
    -
    + + " /> + " /> + <% } } else { @@ -149,23 +114,9 @@
  • &fullTextLine=3D<%=3DfullText%>">Regenerate permanent token
  • Research

    @@ -189,7 +140,7 @@

    Import Bookmarks

    &fullTextLine=3D<%=3DfullText%>" enctype= =3D"multipart/form-data">
    - +
    Modified: trunk/src/main/webapp/css/bookmark.css =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/css/bookmark.css 2010-06-08 15:12:08 UTC (rev 69) +++ trunk/src/main/webapp/css/bookmark.css 2010-06-09 09:48:30 UTC (rev 70) @@ -7,9 +7,9 @@ =20 /*.clearfix { height:1%; -}*/ +} =20 -.clearfix:after { +*/.clearfix:after { content:"."; height:0; line-height:0; @@ -165,10 +165,10 @@ text-decoration:underline; } =20 -#colonneD #add, #colonneD #nuage, #colonneD #recherche, -#colonneD #import{ +#colonneD #import, +#colonneD #add{ padding: 10px 20px; border-bottom:2px solid #9edcf8; } @@ -211,7 +211,7 @@ height:100px; } =20 -#colonneD #import{ +#colonneD #add{ border-bottom:none; } =20 @@ -259,9 +259,7 @@ font-size:14px; line-height:32px; padding-left:40px; - background:url(/bow/img/ptit-livre.jpg) no-repeat; height:32px; - display:block; text-decoration:none; } =20 Added: trunk/src/main/webapp/tagsCloud.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/tagsCloud.jsp (rev 0) +++ trunk/src/main/webapp/tagsCloud.jsp 2010-06-09 09:48:30 UTC (rev 70) @@ -0,0 +1,29 @@ +<%@page import=3D"org.chorem.bow.BookmarkActions" %> +<%@page import=3D"java.util.List" %> +<%@page import=3D"org.nuiton.wikitty.FacetTopic" %> + +<% + BookmarkActions bookmarkActions =3D (BookmarkActions) request.ge= tAttribute("bookmarkActions"); + int nbTags =3D (Integer) request.getAttribute("nbTags"); + String search =3D ""; + String searchLine =3D request.getParameter("searchLine"); + if (searchLine !=3D null) { + search +=3D "&searchLine=3D" + searchLine; + } + if (bookmarkActions !=3D null) { + List tagCloud =3D bookmarkActions.getTagsCloud(); + int count =3D 0; + for (FacetTopic tag : tagCloud) { + int value =3D tag.getCount(); + String tagName =3D tag.getTopicName(); + int font =3D bookmarkActions.getFont(value); +%> +<%=3Dsearch%>" title= =3D"<%=3Dvalue%> results" class=3D"tag" style=3D"font-size: <%=3Dfont%>px;"><= %=3DtagName%> +<% + ++count; + if (count >=3D nbTags) { + break; + } + } + } +%> \ No newline at end of file --===============5010429469656468621==--