Author: vbriand Date: 2010-10-08 14:45:43 +0200 (Fri, 08 Oct 2010) New Revision: 114 Url: http://chorem.org/repositories/revision/bow/114 Log: 1) added new expandable design; 2) corrected semantic errors; 3) the site is now W3C compliant (only on the pages modified for the moment); 4) modified the labels for accessibility and added new ones; 5) modified the source code for a better html maintainability, but only on the main and the search pages for now Added: trunk/src/main/webapp/bookmarkContent.jsp trunk/src/main/webapp/bookmarkHomeMain.jsp trunk/src/main/webapp/bookmarkPage.jsp trunk/src/main/webapp/bookmarkSearchMain.jsp trunk/src/main/webapp/bookmarkTop.jsp Removed: trunk/src/main/webapp/bookmarkHome.jsp trunk/src/main/webapp/bookmarkSearch.jsp Modified: trunk/src/main/webapp/bookmark.jsp trunk/src/main/webapp/css/bookmark.css trunk/src/main/webapp/footer.jsp trunk/src/main/webapp/img/piedmenu.jpg trunk/src/main/webapp/main.jsp trunk/src/main/webapp/preferences.jsp trunk/src/main/webapp/tagsCloud.jsp Modified: trunk/src/main/webapp/bookmark.jsp =================================================================== --- trunk/src/main/webapp/bookmark.jsp 2010-10-03 15:57:31 UTC (rev 113) +++ trunk/src/main/webapp/bookmark.jsp 2010-10-08 12:45:43 UTC (rev 114) @@ -3,69 +3,80 @@ <%@page import="java.text.SimpleDateFormat" %> <%@page import="org.chorem.bow.BookmarkActions" %> <%@page import="java.util.Set" %> - <% - Bookmark bookmark = (Bookmark) request.getAttribute("bookmark"); - BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions"); - SimpleDateFormat sdf = (SimpleDateFormat) request.getAttribute("sdf"); - String url = (String) request.getAttribute("bowUrl"); - String aliasUrl = BowConfig.getInstance().getServletAliasUrl(); - String search = ""; - String searchLine = request.getParameter("searchLine"); - if (searchLine != null) { - search += "&searchLine=" + searchLine; - } - String fullTextLine = request.getParameter("fullTextLine"); - if (fullTextLine != null) { - search += "&fullTextLine=" + fullTextLine; - } - if (url != null && bookmark != null && sdf != null && bookmarkActions != null) { - String formBookmarkId = (String) request.getAttribute("formBookmarkId"); - String link = bookmark.getLink(); - link = link.replace("'", "\\'"); +Bookmark bookmark = (Bookmark) request.getAttribute("bookmark"); +BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions"); +SimpleDateFormat sdf = (SimpleDateFormat) request.getAttribute("sdf"); +String url = (String) request.getAttribute("bowUrl"); +String aliasUrl = BowConfig.getInstance().getServletAliasUrl(); +String search = ""; +String searchLine = request.getParameter("searchLine"); +if (searchLine != null) +{ + search += "&searchLine=" + searchLine; +} +String fullTextLine = request.getParameter("fullTextLine"); +if (fullTextLine != null) +{ + search += "&fullTextLine=" + fullTextLine; +} +if (url != null && bookmark != null && sdf != null && bookmarkActions != null) +{ + String formBookmarkId = (String) request.getAttribute("formBookmarkId"); + String link = bookmark.getLink(); + link = link.replace("'", "\\'"); %> - - <div class="bookmark"> - <div class="bookmarkhead clearfix"> - <a class="alias" href="<%=aliasUrl + bookmark.getAlias()%>" title="<%=bookmark.getLink()%>" target="_blank"> + <div class="bookmarkhead"> + <a class="alias" href="<%=aliasUrl + bookmark.getAlias()%>" title="<%=bookmark.getLink()%>" onclick="window.open(this.href); return false;"> <%=bookmark.getAlias()%> </a> <p class="date"> (<%=sdf.format(bookmark.getDate())%>)</p> - <a class="edit" href="bow?action=editBookmark&bookmarkId=<%=bookmark.getWikittyId()%><%=search%>" onclick="return modify('<%=bookmark.getDescription()%>', '<%=bookmark.getAlias()%>', '<%=BookmarkActions.getBookmarkTagsString(bookmark)%>', '<%=link%>', 'bow?action=modifyBookmark&bookmarkId=<%=bookmark.getWikittyId()%><%=search%>', '<%=bookmark.getWikittyId()%>');"></a> - <a class="supprim" href="bow?action=removeBookmark&bookmarkId=<%=bookmark.getWikittyId()%><%=search%>"></a> + <a class="edit" href="bow?action=editBookmark&bookmarkId=<%=bookmark.getWikittyId()%><%=search%>" onclick="return modify('<%=bookmark.getDescription()%>', '<%=bookmark.getAlias()%>', '<%=BookmarkActions.getBookmarkTagsString(bookmark)%>', '<%=link%>', 'bow?action=modifyBookmark&bookmarkId=<%=bookmark.getWikittyId()%><%=search%>', '<%=bookmark.getWikittyId()%>');"></a> + <a class="supprim" href="bow?action=removeBookmark&bookmarkId=<%=bookmark.getWikittyId()%><%=search%>"></a> </div> - <div class="bookmarkcontenu clearfix"> + <div class="bookmarkcontenu"> <div class="screenshot"></div> <div class="description"> <h3>Description :</h3> <p> - <a title ="<%=bookmark.getLink()%>" href="bow?action=addClick&bookmarkId=<%=bookmark.getWikittyId()%>" target="_blank"><%=bookmark.getDescription()%></a> + <a title ="<%=bookmark.getLink()%>" href="bow?action=addClick&bookmarkId=<%=bookmark.getWikittyId()%>" onclick="window.open(this.href); return false;"><%=bookmark.getDescription()%></a> </p> <p class="tags"> <strong>Tags :</strong> <% - Set<String> tagList = bookmark.getTags(); - if (tagList != null && !tagList.isEmpty()) { - for (String tag : tagList) { - if (formBookmarkId != null && formBookmarkId.equals(bookmark.getWikittyId())) { + Set<String> tagList = bookmark.getTags(); + if (tagList != null && !tagList.isEmpty()) + { + for (String tag : tagList) + { + if (formBookmarkId != null && formBookmarkId.equals(bookmark.getWikittyId())) + { + %> + <a style="text-decoration: none;" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%><%=search%>"> + <img style="border:none;" src="img/delete.png" alt="Delete tag" title="Delete" /> + </a> + <% + } + else + { + %> + <a name="<%=bookmark.getWikittyId()%>" style="display:none; text-decoration: none;" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%><%=search%>"> + <img style="border:none;" src="img/delete.png" alt="Delete tag" title="Delete" /> + </a> + <% + } + %> + <a href="bow?action=search&searchLine=<%=tag%>" style="text-decoration: none"><%=tag%></a> + <% + } + } %> - <a style="text-decoration: none;" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%><%=search%>" > - <img style="border:none;" SRC="img/delete.png" ALT="Delete tag" TITLE="Delete" /> - </a> - <%} else {%> - <a name="<%=bookmark.getWikittyId()%>" style="display:none; text-decoration: none;" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%><%=search%>" > - <img style="border:none;" SRC="img/delete.png" ALT="Delete tag" TITLE="Delete" /> - </a> - <%}%> - <a href="bow?action=search&searchLine=<%=tag%>" style="text-decoration: none"><%=tag%></a> - <% - } - } - %> </p> </div> <div class="click"><%=bookmark.getClick()%></div> </div> </div> -<%}%> +<% +} +%> Added: trunk/src/main/webapp/bookmarkContent.jsp =================================================================== --- trunk/src/main/webapp/bookmarkContent.jsp (rev 0) +++ trunk/src/main/webapp/bookmarkContent.jsp 2010-10-08 12:45:43 UTC (rev 114) @@ -0,0 +1,109 @@ +<div id="wrap"> + <div id="page"> + <div id="header"> + <a class="logo" href="<%=url%>?action=home&token=<%=permanentToken%>">bow</a> + </div> + + <div id="main"> + <% + if (searchLine != null) + { + %> + <%@ include file="bookmarkSearchMain.jsp"%> + <% + } + else + { + %> + <%@include file="bookmarkHomeMain.jsp"%> + <% + } + %> + </div> + <div id="logout"> + <form method="post" action="bow?action=logout"> + <div class="input"><input type="submit" value="Logout" /></div> + </form> + <a href="#" class="help">Aide</a> + </div> + <div id="side"> + <div id="colonneD"> + <ul class="droite"> + <% + if (admin == true) + { + %> + <li><a href="bow?action=admin">Admin</a></li> + <% + } + %> + <li><a href="bow?action=preferences">Preferences</a></li> + <li><a title="Add this link to your favourites to bookmark others in the future. This link is just available while you are connected on the site!" href="javascript:var%20url=location.href;var%20nameAndTags=prompt('Entrez%20le%20nom%20du%20lien%20et%20la%20liste%20des%20tags%20sous%20la%20forme:%20name|tag1%20tag2%20tag3',%20document.title+'|');if%20(nameAndTags!=(document.title+'|')){var%20link='<%=url%>bow?action=addUrl&token=<%=temporaryToken%>&url='+encodeURIComponent(url)+'&nameAndTags='+encodeURIComponent(nameAndTags);var%20script=document.createElement('script');script.src=link;script.type='text/javascript';document.body.appendChild(script);}void(0);">Bookmark add link (session)</a></li> + <li><a title="Add this link to your favourites to bookmark others in the future. This link is always available!" href="javascript:var%20url=location.href;var%20nameAndTags=prompt('Entrez%20le%20nom%20du%20lien%20et%20la%20liste%20des%20tags%20sous%20la%20forme:%20name|tag1%20tag2%20tag3',%20document.title+'|');if%20(nameAndTags!=(document.title+'|')){var%20link='<%=url%>bow?action=addUrl&token=<%=permanentToken%>&url='+encodeURIComponent(url)+'&nameAndTags='+encodeURIComponent(nameAndTags);var%20script=document.createElement('script');script.src=link;script.type='text/javascript';document.body.appendChild(script);}void(0);">Bookmark add link (permanent)</a></li> + </ul> + + <div id="add" class="clearfix"> + <h2>Add / Modify</h2> + <form id="bookmarkForm" method="post" action="<%=formAction%>"> + <div class="input"><label for="url">URL</label><input type="text" name="url" id="url" value="<%=formLink%>" /></div> + <div class="input"><label for="alias">ALIAS</label><input type="text" name="alias" id="alias" value="<%=formAlias%>" /></div> + <div class="input"><label for="name">DESC</label><input type="text" name="name" id="name" value="<%=formName%>" /></div> + <div class="input"><label for="tags">TAGS</label><input type="text" name="tags" id="tags" value="<%=formTags%>" /></div> + <div class="input"><input type="submit" value="Save" /></div> + </form> + </div> + + <div id="nuage"> + <% + if (searchLine != null) + { + %> + <jsp:include page="tagsCloud.jsp" flush="true"> + <jsp:param name="searchLine" value="<%=searchLine%>" /> + </jsp:include> + <% + } + else + { + %> + <jsp:include page="tagsCloud.jsp" flush="true" /> + <% + } + %> + </div> + <div class="recherche"> + <h2><label for="searchLine">Search</label></h2> + <form method="post" action="bow?action=search"> + <div class="input"> + <input type="text" name="searchLine" id="searchLine" /> + <input type="submit" value="Find" /> + </div> + </form> + </div> + <div class="recherche"> + <h2><label for="fullTextLine">Full text search</label></h2> + <form method="post" action="bow?action=fullText"> + <div class="input"> + <input type="text" name="fullTextLine" id="fullTextLine" value="<%=bookmarkActions.getFullTextLine()%>" /> + <input type="submit" value="Find" /> + </div> + </form> + </div> + <div id="import"> + <h2>Import Bookmarks</h2> + <form method="post" action="bow?action=importBookmarks" enctype="multipart/form-data"> + <div class="input"> + <input type="file" name="upfile" size="15%" /> + <br /> + <input type="submit" value="Import" /> + </div> + </form> + <a href="bow?action=exportBookmarks">Export bookmarks</a> + </div> + <div class="colonnebas"> + <img src="img/piedmenu.jpg" width="401" height="77" alt="Pied de menu" /> + </div> + </div> + </div> + </div> +</div> \ No newline at end of file Deleted: trunk/src/main/webapp/bookmarkHome.jsp =================================================================== --- trunk/src/main/webapp/bookmarkHome.jsp 2010-10-03 15:57:31 UTC (rev 113) +++ trunk/src/main/webapp/bookmarkHome.jsp 2010-10-08 12:45:43 UTC (rev 114) @@ -1,189 +0,0 @@ -<%@page contentType="text/html" pageEncoding="UTF-8"%> -<%@page import="org.chorem.bow.BookmarkActions" %> -<%@page import="java.text.SimpleDateFormat" %> -<%@page import="java.util.Iterator" %> -<%@page import="java.util.Set" %> -<%@page import="java.util.ArrayList" %> -<%@page import="java.util.List" %> -<%@page import="org.chorem.bow.TokenActions" %> -<%@page import="org.nuiton.wikitty.FacetTopic" %> -<%@page import="org.chorem.bow.Bookmark" %> -<%@page import="org.chorem.bow.Preference" %> - - -<% - TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions"); - BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions"); - Boolean admin = (Boolean) session.getAttribute("admin"); - if (admin == null) { - admin = false; - } - if (tokenActions != null && bookmarkActions != null) { - String temporaryToken = tokenActions.getTemporaryToken(); - String permanentToken = tokenActions.getPermanentToken(); - String url = (String) request.getAttribute("bowUrl"); - int nbTags = 100; - int nbBookmarks = 10; - Preference preference = (Preference) session.getAttribute("preference"); - if (preference != null) { - if (preference.getBookmarks() > 0) { - nbBookmarks = preference.getBookmarks(); - } - if (preference.getTags() > 0) { - nbTags = preference.getTags(); - } - } - request.setAttribute("nbTags", nbTags); - String formLink = (String) request.getAttribute("link"); - String formName = (String) request.getAttribute("name"); - String formTags = (String) request.getAttribute("tags"); - String formAlias = (String) request.getAttribute("alias"); - String formAction = (String) request.getAttribute("action"); - - if (formLink == null) { - formLink = "URL"; - } - if (formName == null) { - formName = "name"; - } - if (formTags == null) { - formTags = "tag1 tag2..."; - } - if (formAlias == null) { - formAlias = "alias"; - } - if (formAction == null) { - formAction = "bow?action=addUrl"; - } -%> -<body> - <div id="headback"> - <div id="head"> - <div id="headleft"> - <a class="logo" href="<%=url%>?action=home&token=<%=permanentToken%>">bow</a>(Bookmarks On the Web) - </div> - <div id="headright"> - <form method="POST" action="bow?action=logout"> - <button>Logout</button> - </form> - <a href="#">Aide</a> - </div> - </div> - </div> - - <div id="mainbodyback" class="clearfix"> - <div id="mainbody"> - <div id="content"> - - <div class="menu clearfix"> - <p>The most used bookmarks</p> - </div> - <div id="contenu"> - <% - SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); - List<Bookmark> bookmarkList = bookmarkActions.getBookmarks(); - if (!bookmarkList.isEmpty()) { - int count = 0; - for (Bookmark bookmark : bookmarkList) { - request.setAttribute("bookmark", bookmark); - request.setAttribute("sdf", sdf); - %> - <jsp:include page="bookmark.jsp" flush="true" /> - <% - ++count; - if (count >= nbBookmarks) { - break; - } - } - } else { - %> - <h2>No Bookmarks</h2> - <% } - %> - </div> - <div class="menu clearfix"> - <p>The last addition bookmarks</p> - </div> - <div id="contenu"> - - <% - List<Bookmark> lastBookmarks = bookmarkActions.getLastBookmarks(); - if (!lastBookmarks.isEmpty()) { - int count = 0; - for (Bookmark bookmark : lastBookmarks) { - request.setAttribute("bookmark", bookmark); - request.setAttribute("sdf", sdf); - %> - <jsp:include page="bookmark.jsp" flush="true" /> - <% - ++count; - if (count >= nbBookmarks) { - break; - } - } - } else { - %> - <h2>No Bookmarks</h2> - <% } - %> - </div> - </div> - <div id="colonneD"> - <ul class="droite"> - <%if (admin == true) {%> - <li><a href="bow?action=admin">Admin</a></li> - <%}%> - <li><a href="bow?action=preferences">Preferences</a></li> - <li><a title="Add this link to your favourites to bookmark others in the future. This link is just available while you are connected on the site!" href="javascript:var%20url=location.href;var%20nameAndTags=prompt('Entrez%20le%20nom%20du%20lien%20et%20la%20liste%20des%20tags%20sous%20la%20forme:%20name|tag1%20tag2%20tag3',%20document.title+'|');if%20(nameAndTags!=(document.title+'|')){var%20link='<%=url%>bow?action=addUrl&token=<%=temporaryToken%>&url='+encodeURIComponent(url)+'&nameAndTags='+encodeURIComponent(nameAndTags);var%20script=document.createElement('script');script.src=link;script.type='text/javascript';document.body.appendChild(script);}void(0);">Bookmark add link (session)</a></li> - <li><a title="Add this link to your favourites to bookmark others in the future. This link is always available!" href="javascript:var%20url=location.href;var%20nameAndTags=prompt('Entrez%20le%20nom%20du%20lien%20et%20la%20liste%20des%20tags%20sous%20la%20forme:%20name|tag1%20tag2%20tag3',%20document.title+'|');if%20(nameAndTags!=(document.title+'|')){var%20link='<%=url%>bow?action=addUrl&token=<%=permanentToken%>&url='+encodeURIComponent(url)+'&nameAndTags='+encodeURIComponent(nameAndTags);var%20script=document.createElement('script');script.src=link;script.type='text/javascript';document.body.appendChild(script);}void(0);">Bookmark add link (permanent)</a></li> - </ul> - <div id="nuage"> - <jsp:include page="tagsCloud.jsp" flush="true" /> - </div> - <div id="recherche"> - <h2>Search</h2> - <form method="POST" action="bow?action=search"> - <div class="input"> - <input type="text" name="searchLine"/> - <button>Find</button> - </div> - </form> - </div> - <div id="recherche"> - <h2>Full text search</h2> - <form method="POST" action="bow?action=fullText"> - <div class="input"> - <input type="text" name="fullTextLine" value="<%=bookmarkActions.getFullTextLine()%>" /> - <button>Find</button> - </div> - </form> - </div> - <div id="import"> - <h2>Import Bookmarks</h2> - <form method="POST" action="bow?action=importBookmarks" enctype="multipart/form-data"> - <div class="input"> - <input type="file" name="upfile" size="15%"/> - <br/> - <button type="submit">Import</button> - </div> - </form> - <a href="bow?action=exportBookmarks">Export bookmarks</a> - </div> - <div id="add"> - <h2>Add / Modify</h2> - <form id="bookmarkForm" method="POST" action="<%=formAction%>"> - <div class="input"><label>URL</label><input type="text" name="url" value="<%=formLink%>" /></div> - <div class="input"><label>ALIAS</label><input type="text" name="alias" value="<%=formAlias%>" /></div> - <div class="input"><label>DESC</label><input type="text" name="name" value="<%=formName%>" /></div> - <div class="input"><label>TAGS</label><input type="text" name="tags" value="<%=formTags%>" /></div> - <button>Save</button> - </form> - </div> - <div class="colonnebas"></div> - </div> - - </div> - - </div> -</body> -<%}%> Added: trunk/src/main/webapp/bookmarkHomeMain.jsp =================================================================== --- trunk/src/main/webapp/bookmarkHomeMain.jsp (rev 0) +++ trunk/src/main/webapp/bookmarkHomeMain.jsp 2010-10-08 12:45:43 UTC (rev 114) @@ -0,0 +1,72 @@ +<div class="menu clearfix"> + <p>The most used bookmarks</p> +</div> + +<div class="content"> + <% + int nbBookmarks = 10; + if (preference != null) + { + if (preference.getBookmarks() > 0) + nbBookmarks = preference.getBookmarks(); + } + SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); + List<Bookmark> bookmarkList = bookmarkActions.getBookmarks(); + if (!bookmarkList.isEmpty()) + { + int count = 0; + for (Bookmark bookmark : bookmarkList) + { + request.setAttribute("bookmark", bookmark); + request.setAttribute("sdf", sdf); + %> + <jsp:include page="bookmark.jsp" flush="true" /> + <% + ++count; + if (count >= nbBookmarks) + { + break; + } + } + } + else + { + %> + <p class="nobookmarks">No Bookmarks</p> + <% + } + %> +</div> + +<div class="menu clearfix"> + <p>The last addition bookmarks</p> +</div> + +<div class="content"> + <% + List<Bookmark> lastBookmarks = bookmarkActions.getLastBookmarks(); + if (!lastBookmarks.isEmpty()) + { + int count = 0; + for (Bookmark bookmark : lastBookmarks) + { + request.setAttribute("bookmark", bookmark); + request.setAttribute("sdf", sdf); + %> + <jsp:include page="bookmark.jsp" flush="true" /> + <% + ++count; + if (count >= nbBookmarks) + { + break; + } + } + } + else + { + %> + <p class="nobookmarks">No Bookmarks</p> + <% + } + %> +</div> \ No newline at end of file Added: trunk/src/main/webapp/bookmarkPage.jsp =================================================================== --- trunk/src/main/webapp/bookmarkPage.jsp (rev 0) +++ trunk/src/main/webapp/bookmarkPage.jsp 2010-10-08 12:45:43 UTC (rev 114) @@ -0,0 +1,52 @@ +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="org.chorem.bow.BookmarkActions" %> +<%@page import="java.text.SimpleDateFormat" %> +<%@page import="java.util.Iterator" %> +<%@page import="java.util.Set" %> +<%@page import="java.util.ArrayList" %> +<%@page import="java.util.List" %> +<%@page import="org.chorem.bow.TokenActions" %> +<%@page import="org.nuiton.wikitty.FacetTopic" %> +<%@page import="org.chorem.bow.Bookmark" %> +<%@page import="org.chorem.bow.Preference" %> +<% +TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions"); +BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions"); +Boolean admin = (Boolean) session.getAttribute("admin"); +if (admin == null) +{ + admin = false; +} + +String temporaryToken = tokenActions.getTemporaryToken(); +String permanentToken = tokenActions.getPermanentToken(); +String url = (String) request.getAttribute("bowUrl"); +String version = (String) request.getAttribute("version"); +int nbTags = 100; +Preference preference = (Preference) session.getAttribute("preference"); +if (preference != null) +{ + int tags = preference.getTags(); + if (tags > 0) + nbTags = tags; +} +String searchLine = bookmarkActions.getSearchLine(); +String fullText = bookmarkActions.getFullTextLine(); +request.setAttribute("nbTags", nbTags); +String formLink = (String) request.getAttribute("link"); +String formName = (String) request.getAttribute("name"); +String formTags = (String) request.getAttribute("tags"); +String formAlias = (String) request.getAttribute("alias"); +String formAction = (String) request.getAttribute("action"); +if (formLink == null) + formLink = "URL"; +if (formName == null) + formName = "name"; +if (formTags == null) + formTags = "tag1 tag2..."; +if (formAlias == null) + formAlias = "alias"; +if (formAction == null) + formAction = "bow?action=addUrl"; +%> +<%@ include file="bookmarkContent.jsp"%> \ No newline at end of file Deleted: trunk/src/main/webapp/bookmarkSearch.jsp =================================================================== --- trunk/src/main/webapp/bookmarkSearch.jsp 2010-10-03 15:57:31 UTC (rev 113) +++ trunk/src/main/webapp/bookmarkSearch.jsp 2010-10-08 12:45:43 UTC (rev 114) @@ -1,173 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<%@page contentType="text/html" pageEncoding="UTF-8"%> -<%@page import="org.chorem.bow.Bookmark" %> -<%@page import="org.chorem.bow.BookmarkActions" %> -<%@page import="java.text.SimpleDateFormat" %> -<%@page import="java.util.Iterator" %> -<%@page import="java.util.Set" %> -<%@page import="java.util.ArrayList" %> -<%@page import="java.util.List" %> -<%@page import="org.chorem.bow.TokenActions" %> -<%@page import="org.nuiton.wikitty.FacetTopic" %> -<%@page import="org.chorem.bow.Preference" %> - -<% - TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions"); - BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions"); - Boolean admin = (Boolean) session.getAttribute("admin"); - if (admin == null) { - admin = false; - } - if (tokenActions != null && bookmarkActions != null) { - String temporaryToken = tokenActions.getTemporaryToken(); - String permanentToken = tokenActions.getPermanentToken(); - String searchLine = bookmarkActions.getSearchLine(); - String fullText = bookmarkActions.getFullTextLine(); - String url = (String) request.getAttribute("bowUrl"); - Preference preference = (Preference) session.getAttribute("preference"); - int nbTags = 100; - if (preference != null) { - if (preference.getTags() > 0) { - nbTags = preference.getTags(); - } - } - request.setAttribute("nbTags", nbTags); - String formLink = (String) request.getAttribute("link"); - String formName = (String) request.getAttribute("name"); - String formTags = (String) request.getAttribute("tags"); - String formAlias = (String) request.getAttribute("alias"); - String formAction = (String) request.getAttribute("action"); - - if (formLink == null) { - formLink = "URL"; - } - if (formName == null) { - formName = "name"; - } - if (formTags == null) { - formTags = "tag1 tag2..."; - } - if (formAlias == null) { - formAlias = "alias"; - } - if (formAction == null) { - formAction = "bow?action=addUrl"; - } -%> - - -<body> - <div id="headback"> - <div id="head"> - <div id="headleft"> - <a class="logo" href="<%=url%>?action=home&token=<%=permanentToken%>">bow</a>(Bookmarks On the Web) - </div> - <div id="headright"> - <form method="POST" action="bow?action=logout"> - <button>Logout</button> - </form> - <a href="#">Aide</a> - </div> - </div> - </div> - <div id="mainbodyback" class="clearfix"> - <div id="mainbody"> - - <div id="content"> - <div class="menu clearfix"><p>Search</p> - <form method="POST" action="bow?action=order&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>"> - <label>Order By :</label> - <select name="type"> - <option value="ascName">Asc Name</option> - <option value="descName">Desc Name</option> - <option value="ascClick">Asc Click</option> - <option value="descClick">Desc Click</option> - <option value="ascDate">Asc Date</option> - <option value="descDate">Desc Date</option> - </select> - <button type="submit">OK</button> - </form> - </div> - <div id="contenu"> - <% - List<Bookmark> bookmarkList = bookmarkActions.getBookmarks(); - if (!bookmarkList.isEmpty()) { - SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); - for (Bookmark bookmark : bookmarkList) { - request.setAttribute("bookmark", bookmark); - request.setAttribute("sdf", sdf); - %> - <jsp:include page="bookmark.jsp" flush="true"> - <jsp:param name="searchLine" value="<%=searchLine%>" /> - <jsp:param name="fullTextLine" value="<%=fullText%>" /> - </jsp:include> - <% - } - } else { - %> - <h2>No Bookmarks</h2> - <%}%> - </div> - </div> - - <div id="colonneD"> - <ul class="droite"> - <%if (admin == true) {%> - <li><a href="bow?action=admin">Admin</a></li> - <%}%> - <li><a href="bow?action=preferences">Preferences</a></li> - <li><a title="Add this link to your favourites to bookmark others in the future. This link is just available while you are connected on the site!" href="javascript:var%20url=location.href;var%20nameAndTags=prompt('Entrez%20le%20nom%20du%20lien%20et%20la%20liste%20des%20tags%20sous%20la%20forme:%20name|tag1%20tag2%20tag3',%20document.title+'|');var%20link='<%=url%>bow?action=addUrl&token=<%=temporaryToken%>&url='+encodeURIComponent(url)+'&nameAndTags='+encodeURIComponent(nameAndTags);var%20script=document.createElement('script');script.src=link;script.type='text/javascript';document.body.appendChild(script);void(0);">Bookmark add link (session)</a></li> - <li><a title="Add this link to your favourites to bookmark others in the future. This link is always available!" href="javascript:var%20url=location.href;var%20nameAndTags=prompt('Entrez%20le%20nom%20du%20lien%20et%20la%20liste%20des%20tags%20sous%20la%20forme:%20name|tag1%20tag2%20tag3',%20document.title+'|');var%20link='<%=url%>bow?action=addUrl&token=<%=permanentToken%>&url='+encodeURIComponent(url)+'&nameAndTags='+encodeURIComponent(nameAndTags);var%20script=document.createElement('script');script.src=link;script.type='text/javascript';document.body.appendChild(script);void(0);">Bookmark add link (permanent)</a></li> - </ul> - <div id="nuage"> - <jsp:include page="tagsCloud.jsp" flush="true"> - <jsp:param name="searchLine" value="<%=searchLine%>" /> - </jsp:include> - </div> - <div id="recherche"> - <h2>Search</h2> - <form method="POST" action="bow?action=search"> - <div class="input"> - <input type="text" name="searchLine" value="<%=searchLine%>" /> - <button>Find</button> - </div> - </form> - </div> - <div id="recherche"> - <h2>Full text search</h2> - <form method="POST" action="bow?action=fullText"> - <div class="input"> - <input type="text" name="fullTextLine" value="<%=bookmarkActions.getFullTextLine()%>" /> - <button>Find</button> - </div> - </form> - </div> - <div id="import"> - <h2>Import Bookmarks</h2> - <form method="post" action="bow?action=importBookmarks&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>" enctype="multipart/form-data"> - <div class="input"> - <input type="file" name="upfile" size="15%"/> - <br/> - <button type="submit">Import</button> - </div> - </form> - <a href="bow?action=exportBookmarks&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">Export bookmarks</a> - </div> - <div id="add"> - <h2>Add / Modify</h2> - <form id="bookmarkForm" method="POST" action="<%=formAction%>&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>"> - <div class="input"><label>URL</label><input type="text" name="url" value="<%=formLink%>" /></div> - <div class="input"><label>ALIAS</label><input type="text" name="alias" value="<%=formAlias%>" /></div> - <div class="input"><label>DESC</label><input type="text" name="name" value="<%=formName%>" /></div> - <div class="input"><label>TAGS</label><input type="text" name="tags" value="<%=formTags%>" /></div> - <button>Save</button> - </form> - </div> - <div class="colonnebas"></div> - </div> - - </div> - - </div> -</body> -<%}%> Added: trunk/src/main/webapp/bookmarkSearchMain.jsp =================================================================== --- trunk/src/main/webapp/bookmarkSearchMain.jsp (rev 0) +++ trunk/src/main/webapp/bookmarkSearchMain.jsp 2010-10-08 12:45:43 UTC (rev 114) @@ -0,0 +1,43 @@ +<div class="menu clearfix"> + <p>Search</p> + <form method="post" action="bow?action=order&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>"> + <p> + <label for="type">Order By :</label> + <select id="type" name="type"> + <option value="ascName">Asc Name</option> + <option value="descName">Desc Name</option> + <option value="ascClick">Asc Click</option> + <option value="descClick">Desc Click</option> + <option value="ascDate">Asc Date</option> + <option value="descDate">Desc Date</option> + </select> + <input type="submit" value="OK" /> + </p> + </form> +</div> +<div class="content"> + <% + List<Bookmark> bookmarkList = bookmarkActions.getBookmarks(); + if (!bookmarkList.isEmpty()) + { + SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); + for (Bookmark bookmark : bookmarkList) + { + request.setAttribute("bookmark", bookmark); + request.setAttribute("sdf", sdf); + %> + <jsp:include page="bookmark.jsp" flush="true"> + <jsp:param name="searchLine" value="<%=searchLine%>" /> + <jsp:param name="fullTextLine" value="<%=fullText%>" /> + </jsp:include> + <% + } + } + else + { + %> + <p class="nobookmarks">No Bookmarks</p> + <% + } + %> +</div> \ No newline at end of file Added: trunk/src/main/webapp/bookmarkTop.jsp =================================================================== --- trunk/src/main/webapp/bookmarkTop.jsp (rev 0) +++ trunk/src/main/webapp/bookmarkTop.jsp 2010-10-08 12:45:43 UTC (rev 114) @@ -0,0 +1,82 @@ +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="org.chorem.bow.BookmarkActions" %> +<%@page import="java.text.SimpleDateFormat" %> +<%@page import="java.util.Iterator" %> +<%@page import="java.util.Set" %> +<%@page import="java.util.ArrayList" %> +<%@page import="java.util.List" %> +<%@page import="org.chorem.bow.TokenActions" %> +<%@page import="org.nuiton.wikitty.FacetTopic" %> +<%@page import="org.chorem.bow.Bookmark" %> +<%@page import="org.chorem.bow.Preference" %> +<% +TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions"); +BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions"); +Boolean admin = (Boolean) session.getAttribute("admin"); +if (admin == null) +{ + admin = false; +} + +if (tokenActions != null && bookmarkActions != null) +{ + String temporaryToken = tokenActions.getTemporaryToken(); + String permanentToken = tokenActions.getPermanentToken(); + String url = (String) request.getAttribute("bowUrl"); + int nbTags = 100; + Preference preference = (Preference) session.getAttribute("preference"); +} + +int tags = preference.getTags(); +if (preference != null && tags > 0) +{ + nbTags = tags; +} + +request.setAttribute("nbTags", nbTags); +String formLink = (String) request.getAttribute("link"); +String formName = (String) request.getAttribute("name"); +String formTags = (String) request.getAttribute("tags"); +String formAlias = (String) request.getAttribute("alias"); +String formAction = (String) request.getAttribute("action"); + +if (formLink == null) +{ + formLink = "URL"; +} + +if (formName == null) +{ + formName = "name"; +} + +if (formTags == null) +{ + formTags = "tag1 tag2..."; +} + +if (formAlias == null) +{ + formAlias = "alias"; +} + +if (formAction == null) +{ + formAction = "bow?action=addUrl"; +} + +if (tokenActions != null && bookmarkActions != null) +{ + if (searchLine != null) + { + String searchLine = bookmarkActions.getSearchLine(); + String fullText = bookmarkActions.getFullTextLine(); + } + else + { + if (preference != null && preference.getBookmarks() > 0) + { + nbBookmarks = preference.getBookmarks(); + } + } +%> \ No newline at end of file Modified: trunk/src/main/webapp/css/bookmark.css =================================================================== --- trunk/src/main/webapp/css/bookmark.css 2010-10-03 15:57:31 UTC (rev 113) +++ trunk/src/main/webapp/css/bookmark.css 2010-10-08 12:45:43 UTC (rev 114) @@ -5,11 +5,16 @@ margin:0; } -/*.clearfix { +body{ + font-size:10px; + font-family:Verdana, Arial, Helvetica, sans-serif; +} + +.clearfix{ height:1%; } -*/.clearfix:after { +.clearfix:after{ content:"."; height:0; line-height:0; @@ -18,125 +23,251 @@ clear:both; } -body{ - font-size:10px; - font-family:Verdana, Arial, Helvetica, sans-serif; +#wrap{ + clear:both; + float:left; + overflow-x:hidden; + overflow-y:visible; + position:relative; + width:100%; + background-color:#9EDCF8; } -#headback{ - background:#FFFFFF url(/bow/img/fondhead.jpg) repeat-x; - width:auto; - height:100px; +#page{ + background-color:#9EDCF8; + float:left; + left:77%; + position:relative; + width:100%; + margin-bottom:50px; +} +#header{ + background:#fff url('/bow/img/fondhead.jpg') repeat-x 0 0; + float:left; + position:absolute; + right:77%; + top:0; + height:100px; + width:100%; } -#head{ - clear:both; - width:1004px; - height:100px; - margin:0 auto; - position:relative; +#header a.logo{ + background:transparent url('/bow/img/logobow.jpg') repeat scroll 0 0; + display:block; + height:100px; + text-indent:-99999px; + width:290px; + float:left; + left:8%; + position:relative; } -#headleft{ - width:740px; +#main{ float:left; - height:100px; + margin-top:120px; + position:relative; + right:69%; + width:59%; + clear:both; } -#headleft a.logo{ - background:url(/bow/img/logobow.jpg); - width:290px; - height:100px; - text-indent:-99999px; - display:block; +#main .menu{ + width:90%; + height:35px; + background:#804561 url('/bow/img/pointemenu.jpg') no-repeat right; + margin-bottom:20px; + padding:0 40px; + line-height:35px; + clear: both; } -#headright{ - width:264px; +#main .menu p{ + color:#9edcf8; + font-size:18px; + font-weight:normal; + float:left; +} + +#main .menu form{ + float:right; + color:#9edcf8; + font-size:12px; +} + +.content{ + width:100%; float:left; - background:#bf8a9c url(/bow/img/moyen-livre.jpg)no-repeat 30px 10px; - height:100px; + background-color:#fff; + margin-bottom: 25px; } -#headright a{ - text-indent:-99999px; - background:url(/bow/img/aide.jpg) no-repeat; - display:block; - position:absolute; - right:10px; - bottom:5px; - height:34px; - width:34px; +#side { + clear:right; + float:right; + position:relative; + right:73%; + width:27%; } -#headright button{ - background:url(/bow/img/fondbouton.jpg) repeat-x; - height:27px; - width:72px; - color:#9c7186; - border:none; - font-size:12px; - line-height:27px; - font-weight:bold; - position:absolute; - top:35px; - right:65px; +.bookmark{ + width:100%; } -#mainbodyback{ - background-color:#9edcf8; - min-height:100px; +.bookmark .bookmarkhead{ + width:100%; + height:32px; + background-color:#bf8a9c; + border-bottom:2px solid #9EDCF8; + position:relative; + clear:both; } -#mainbody{ - width:1004px; - margin:0 auto; - position:relative; - clear:both; +.bookmark .bookmarkcontenu{ + clear:both; + padding-top:5px; } -#mainbody .menu{ - width:620px; - height:35px; - background:#804561 url(/bow/img/pointemenu.jpg) no-repeat right; - margin-bottom:20px; - padding:0 40px; - line-height:35px; +.bookmark .bookmarkhead .date{ + color:#fff; + font-size:10px; + float:left; + margin-top:10px; } -#mainbody .menu p{ - color:#9edcf8; - font-size:18px; - font-weight:normal; +.bookmark .bookmarkhead .edit{ + background:url('/bow/img/edit.jpg') no-repeat; + width:31px; + height:32px; + position:absolute; + top:0; + right:32px; +} + +.bookmark .bookmarkhead .supprim{ + background:url('/bow/img/croix.jpg') no-repeat; + width:31px; + height:32px; + position:absolute; + top:0; + right:0; +} + +.bookmark .bookmarkhead a{ + color:#FFF; + font-weight:bold; + 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; + float:left; + margin-right:3%; + margin-left:3%; +} + +.bookmark .bookmarkhead .alias{ float:left; + margin-right:15px; + display:block; + background:url('/bow/img/ptit-livre.jpg') no-repeat; } -#mainbody .menu form{ - float:right; - color:#9edcf8; - font-size:12px; +.bookmark .screenshot{ + float:left; + margin:5px 10px; + width:100px; + height:75px; + background:url('/bow/img/livreG.jpg') no-repeat; } -#content{ - width:740px; +.bookmark .description{ float:left; - padding-top:20px; + margin:5px 5px; + color:#999999; + font-size:12px; + width:auto; } -#contenu{ - width:660px; - margin:10px 40px; - background-color:#FFFFFF; +.bookmark .description h3{ + color:#88516c; } +.bookmark .description .tags{ + color:#88516c; + background:url('/bow/img/tag.jpg') no-repeat left center; + font-size:12px; + padding-left:30px; + height:28px; + line-height:28px; + padding-top:10px; +} + +.bookmark .click{ + background:transparent url('/bow/img/click.jpg') no-repeat scroll 0 0; + float:right; + height:27px; + margin:5% 5px 5px; + padding-top:31px; + position:relative; + right:0; + width:31px; + text-align:center; +} + +.nobookmarks{ + font-size: large; + padding-left: 5px; +} + +#logout{ + float:right; + height:auto; + position:relative; + right:67%; + width:33%; + background:#BF8A9C url('/bow/img/moyen-livre.jpg') no-repeat scroll 7% 44%; + height:100px; +} + +#logout a.help{ + background:transparent url('/bow/img/aide.jpg') no-repeat scroll 0 0; + display:block; + height:34px; + text-indent:-99999px; + width:34px; + margin-left:15%; + margin-top:12%; + float:left; +} + +#logout form input{ + background:transparent url('/bow/img/fondbouton.jpg') repeat-x scroll 0 0; + border:medium none; + color:#9C7186; + font-size:12px; + font-weight:bold; + height:27px; + line-height:27px; + display:block; + text-decoration:none; + text-align:center; + width:72px; + float:left; + margin-left:25%; + margin-top:6%; +} + +#side #colonneD{ + font-size:14px; + color:#9edcf8; +} + #colonneD{ - width:264px; - float:left; - background-color:#804561; - font-size:140%; - color:#9edcf8; - margin-bottom:30px; + overflow-x: auto; + background-color: #804561; } #colonneD a{ @@ -145,13 +276,14 @@ } #colonneD ul.droite{ - padding:10px 20px; + padding:5% 10%; border-bottom:2px solid #9edcf8; } #colonneD ul.droite li{ list-style:none; height:22px; + font-size:100%; } #colonneD ul.droite li a{ @@ -166,22 +298,21 @@ } #colonneD #nuage, -#colonneD #recherche, +#colonneD .recherche, #colonneD #import, #colonneD #add{ - padding: 10px 20px; + padding: 4% 10%; border-bottom:2px solid #9edcf8; } #colonneD h2{ - text-align:center; - color:#9edcf8; - font-size:170%; - font-weight:normal; + color:#9edcf8; + font-size:140%; + font-weight:normal; } #colonneD #add form{ - text-align:right; + clear:both; } #colonneD form .input{ @@ -190,141 +321,52 @@ #colonneD form input{ height:22px; - width:100%; + width:50%; + border:none; + height:28px; + padding-left: 4px; } #colonneD #add form label{ - padding-right:10px; + display:inline-block; + padding-right:9%; + text-align:right; + width:10%; } -#colonneD form button{ - background:url(/bow/img/fondbouton.jpg) repeat-x 0 2px; - height:28px; - width:72px; - color:#9c7186; - border:none; - font-size:12px; - font-weight:bold; +#colonneD form input[type="submit"]{ + background:transparent url('/bow/img/fondbouton.jpg') repeat-x scroll 0 0; + border:medium none; + color:#9C7186; + display:block; + float:right; + font-size:12px; + font-weight:bold; + height:28px; + line-height:28px; + position:relative; + right:20%; + text-align:center; + text-decoration:none; + width:25%; } #colonneD #nuage{ - min-height:100px; + height:100px; } -#colonneD #add{ - border-bottom:none; +.colonnebas img{ + width:86%; + height:auto; + display:block; + position:relative; } -#colonneD .colonnebas{ - background:url(/bow/img/piedmenu.jpg) no-repeat; - height:82px; +#import .input input{ + width: 90%; + margin-bottom: 10px; } -.bookmark{ - width:660px; - border-bottom:2px solid #9edcf8; -} - -.bookmark .bookmarkhead{ - width:620px; - height:32px; - background-color:#bf8a9c; - padding:0 20px; - position:relative; - clear:both; -} - -.bookmark .bookmarkhead .date{ - color:#fff; - font-size:10px; - float:left; - margin-top:10px; -} - -.bookmark .bookmarkhead a.edit{ - background:url(/bow/img/edit.jpg) no-repeat; - height:32px; - position:absolute; - float: right; - top:0; - right:32px; - border:none; - text-decoration:none; -} - -.bookmark .bookmarkhead a.supprim{ - background:url(/bow/img/croix.jpg) no-repeat; - height:32px; - position:absolute; - float: right; - top:0; - right:0; - border:none; - text-decoration:none; -} - -.bookmark .bookmarkhead a{ - color:#FFF; - font-weight:bold; - font-size:14px; - line-height:32px; - padding-left:40px; - height:32px; - text-decoration:none; -} - -.bookmark .bookmarkhead .alias { - float:left; - margin-right:15px; - display:block; - background:url(/bow/img/ptit-livre.jpg) no-repeat; -} - -.bookmark .bookmarkcontenu{ - position:relative; -} - -.bookmark .screenshot{ - float:left; - margin:5px 10px; - width:100px; - height:75px; - background:url(/bow/img/livreG.jpg) no-repeat; -} - -.bookmark .description{ - float:left; - margin:5px 5px; - color:#999999; - font-size:12px; - width:480px; -} - -.bookmark .description h3{ - color:#88516c; -} - -.bookmark .description .tags{ - color:#88516c; - background:url(/bow/img/tag.jpg) no-repeat left center; - font-size:12px; - padding-left:30px; - height:28px; - line-height:28px; - padding-top:10px; -} - -.bookmark .click{ - background:url(/bow/img/click.jpg) no-repeat; - padding-top:25px; - position:absolute; - bottom:0; - right:0; - height:27px; - width:31px; - margin:5px; - text-align: center; -} #footer{ background-color:#804561; padding-top:30px; Modified: trunk/src/main/webapp/footer.jsp =================================================================== --- trunk/src/main/webapp/footer.jsp 2010-10-03 15:57:31 UTC (rev 113) +++ trunk/src/main/webapp/footer.jsp 2010-10-08 12:45:43 UTC (rev 114) @@ -1,18 +1,16 @@ <%@page contentType="text/html" pageEncoding="UTF-8"%> <% - String url = (String) request.getAttribute("bowUrl"); - String version = (String) request.getAttribute("version"); +String url = (String) request.getAttribute("bowUrl"); +String version = (String) request.getAttribute("version"); %> -<body> - <div id="footer"> - <p> - <a shape="rect" href="<%=url%>">bow</a> - <a shape="rect" href="http://www.chorem.org/projects/list_files/bow"><%=version%></a> - - <a shape="rect" href="http://www.gnu.org/licenses/agpl.html">Licence AGPL</a> - - <span title="Copyright">©2010</span> - <a shape="rect" href="http://www.codelutin.com">Code Lutin</a> - - <a shape="rect" href="http://www.chorem.org/projects/bow/issues">Rapport de bug</a> - - <a shape="rect" href="http://list.chorem.org/cgi-bin/mailman/listinfo/bow-users">Support utilisateur</a> - </p> - </div> -</body> \ No newline at end of file +<div id="footer"> + <p> + <a shape="rect" href="<%=url%>">bow</a> + <a shape="rect" href="http://www.chorem.org/projects/list_files/bow"><%=version%></a> - + <a shape="rect" href="http://www.gnu.org/licenses/agpl.html">Licence AGPL</a> - + <span title="Copyright">©2010</span> + <a shape="rect" href="http://www.codelutin.com">Code Lutin</a> - + <a shape="rect" href="http://www.chorem.org/projects/bow/issues">Rapport de bug</a> - + <a shape="rect" href="http://list.chorem.org/cgi-bin/mailman/listinfo/bow-users">Support utilisateur</a> + </p> +</div> \ No newline at end of file Modified: trunk/src/main/webapp/img/piedmenu.jpg =================================================================== (Binary files differ) Modified: trunk/src/main/webapp/main.jsp =================================================================== --- trunk/src/main/webapp/main.jsp 2010-10-03 15:57:31 UTC (rev 113) +++ trunk/src/main/webapp/main.jsp 2010-10-08 12:45:43 UTC (rev 114) @@ -3,58 +3,44 @@ <%@page import="org.chorem.bow.TokenActions" %> <% - TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions"); - BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions"); - if (tokenActions != null && bookmarkActions != null) { - String searchLine = bookmarkActions.getSearchLine(); - String url = (String) request.getAttribute("bowUrl"); - String version = (String) request.getAttribute("version"); - - String formLink = (String) request.getAttribute("link"); - String formName = (String) request.getAttribute("name"); - String formBookmarkId = (String) request.getAttribute("bookmarkId"); - String formTags = (String) request.getAttribute("tags"); - String formAlias = (String) request.getAttribute("alias"); - String formAction = (String) request.getAttribute("action"); -%> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <jsp:include page="header.jsp" flush="true"> - <jsp:param name="bowUrl" value="<%=url%>"/> - </jsp:include> - <% - if (searchLine != null) { - %> - <jsp:include page="bookmarkSearch.jsp" flush="true"> - <jsp:param name="bookmarkActions" value="<%=tokenActions%>" /> - <jsp:param name="bookmarkActions" value="<%=bookmarkActions%>" /> - <jsp:param name="bowUrl" value="<%=url%>"/> - <jsp:param name="link" value="<%=formLink%>"/> - <jsp:param name="name" value="<%=formName%>"/> - <jsp:param name="bookmarkId" value="<%=formBookmarkId%>"/> - <jsp:param name="tags" value="<%=formTags%>"/> - <jsp:param name="alias" value="<%=formAlias%>"/> - <jsp:param name="action" value="<%=formAction%>"/> - </jsp:include> - <% } else { - %> - - <jsp:include page="bookmarkHome.jsp" flush="true"> - <jsp:param name="bookmarkActions" value="<%=tokenActions%>" /> - <jsp:param name="bookmarkActions" value="<%=bookmarkActions%>" /> - <jsp:param name="bowUrl" value="<%=url%>"/> - <jsp:param name="link" value="<%=formLink%>"/> - <jsp:param name="name" value="<%=formName%>"/> - <jsp:param name="bookmarkId" value="<%=formBookmarkId%>"/> - <jsp:param name="tags" value="<%=formTags%>"/> - <jsp:param name="alias" value="<%=formAlias%>"/> - <jsp:param name="action" value="<%=formAction%>"/> - </jsp:include> - <% } - %> - <jsp:include page="footer.jsp" flush="true" > - <jsp:param name="bowUrl" value="<%=url%>" /> - <jsp:param name="version" value="<%=version%>" /> - </jsp:include> -</html> -<%}%> \ No newline at end of file +TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions"); +BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions"); +if (tokenActions != null && bookmarkActions != null) +{ + String searchLine = bookmarkActions.getSearchLine(); + String url = (String) request.getAttribute("bowUrl"); + String version = (String) request.getAttribute("version"); + String formLink = (String) request.getAttribute("link"); + String formName = (String) request.getAttribute("name"); + String formBookmarkId = (String) request.getAttribute("bookmarkId"); + String formTags = (String) request.getAttribute("tags"); + String formAlias = (String) request.getAttribute("alias"); + String formAction = (String) request.getAttribute("action"); + %> + <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <jsp:include page="header.jsp" flush="true"> + <jsp:param name="bowUrl" value="<%=url%>"/> + </jsp:include> + <body> + <jsp:include page="bookmarkPage.jsp" flush="true"> + <jsp:param name="bookmarkActions" value="<%=tokenActions%>" /> + <jsp:param name="bookmarkActions" value="<%=bookmarkActions%>" /> + <jsp:param name="bowUrl" value="<%=url%>" /> + <jsp:param name="link" value="<%=formLink%>" /> + <jsp:param name="name" value="<%=formName%>" /> + <jsp:param name="bookmarkId" value="<%=formBookmarkId%>" /> + <jsp:param name="tags" value="<%=formTags%>" /> + <jsp:param name="alias" value="<%=formAlias%>" /> + <jsp:param name="action" value="<%=formAction%>" /> + <jsp:param name="version" value="<%=version%>" /> + </jsp:include> + <jsp:include page="footer.jsp" flush="true" > + <jsp:param name="bowUrl" value="<%=url%>" /> + <jsp:param name="version" value="<%=version%>" /> + </jsp:include> + </body> + </html> + <% +} +%> \ No newline at end of file Modified: trunk/src/main/webapp/preferences.jsp =================================================================== --- trunk/src/main/webapp/preferences.jsp 2010-10-03 15:57:31 UTC (rev 113) +++ trunk/src/main/webapp/preferences.jsp 2010-10-08 12:45:43 UTC (rev 114) @@ -1,5 +1,4 @@ <%@page contentType="text/html" pageEncoding="UTF-8"%> - <%@page import="org.chorem.bow.Preference" %> <%@page import="org.chorem.bow.User" %> <%@page import="org.chorem.bow.TokenActions" %> Modified: trunk/src/main/webapp/tagsCloud.jsp =================================================================== --- trunk/src/main/webapp/tagsCloud.jsp 2010-10-03 15:57:31 UTC (rev 113) +++ trunk/src/main/webapp/tagsCloud.jsp 2010-10-08 12:45:43 UTC (rev 114) @@ -8,7 +8,7 @@ String search = ""; String searchLine = request.getParameter("searchLine"); if (searchLine != null) { - search += "&searchLine=" + searchLine; + search += "&searchLine=" + searchLine; } if (bookmarkActions != null) { List<FacetTopic> tagCloud = bookmarkActions.getTagsCloud(); @@ -18,7 +18,7 @@ String tagName = tag.getTopicName(); int font = bookmarkActions.getFont(value); %> -<a href="bow?action=search&addTag=<%=tagName%><%=search%>" title="<%=value%> results" class="tag" style="font-size: <%=font%>px;"><%=tagName%></a> +<a href="bow?action=search&addTag=<%=tagName%><%=search%>" title="<%=value%> results" class="tag" style="font-size: <%=font%>px;"><%=tagName%></a> <% ++count; if (count >= nbTags) {
participants (1)
-
vbriand@users.chorem.org