Bow-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
October 2010
- 3 participants
- 8 discussions
r120 - in trunk/src/main: java/org/chorem/bow webapp webapp/css webapp/img
by vbriand@users.chorem.org 29 Oct '10
by vbriand@users.chorem.org 29 Oct '10
29 Oct '10
Author: vbriand
Date: 2010-10-29 10:56:57 +0200 (Fri, 29 Oct 2010)
New Revision: 120
Url: http://chorem.org/repositories/revision/bow/120
Log:
The bookmarks are now removable by import date on the preferences page. It is also possible to delete the bookmarks returned by a research
Added:
trunk/src/main/webapp/img/croixtr.png
Modified:
trunk/src/main/java/org/chorem/bow/ControllerServlet.java
trunk/src/main/webapp/css/bookmark.css
trunk/src/main/webapp/header.jsp
trunk/src/main/webapp/preferences.jsp
trunk/src/main/webapp/search.jsp
Modified: trunk/src/main/java/org/chorem/bow/ControllerServlet.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-10-26 15:04:25 UTC (rev 119)
+++ trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-10-29 08:56:57 UTC (rev 120)
@@ -66,6 +66,7 @@
import org.nuiton.wikitty.FacetTopic;
import org.nuiton.wikitty.PagedResult;
import org.nuiton.wikitty.WikittyProxy;
+import org.nuiton.wikitty.search.Element;
import org.nuiton.wikitty.search.Search;
/**
@@ -244,6 +245,7 @@
if (log.isDebugEnabled()) {
log.debug("Going to actionPreferences");
}
+ this.getBookmarksByImportDate(request, user);
request.getRequestDispatcher("preferences.jsp").forward(request, response);
} else if (action.equals("admin") && user != null) {
if (log.isDebugEnabled()) {
@@ -264,15 +266,21 @@
if (log.isDebugEnabled()) {
log.debug("Going to actionDeleteImport");
}
- this.actionDeleteImport(request, session, user);
- request.getRequestDispatcher("preferences.jsp").forward(request, response);
+ this.actionDeleteImport(request, response, user);
+ //request.getRequestDispatcher("preferences.jsp").forward(request, response);
} else if (action.equals("reIndexation") && user != null) {
if (log.isDebugEnabled()) {
log.debug("Going to actionReIndexation");
}
this.actionReIndexation(request, session, user);
request.getRequestDispatcher("admin.jsp").forward(request, response);
- } else {
+ } else if (action.equals("deleteSearchResults") && user != null) {
+ if (log.isDebugEnabled()) {
+ log.debug("Going to actionDeleteSearchResults");
+ }
+ this.actionDeleteSearchResults(request, response, user);
+ }
+ else {
if (user != null) {
request.getRequestDispatcher("error.jsp").forward(request, response);
} else {
@@ -290,14 +298,66 @@
}
}
+ /* @param request servlet request
+ * @param user user information
+ * @throws IOException If the redirection fails
+ * @description Deletes every bookmark imported at a given date
+ */
+ protected void actionDeleteImport(HttpServletRequest request, HttpServletResponse response, User user) throws IOException {
+ String date = request.getParameter("date");
+
+ if (date != null) {
+ WikittyProxy proxy = BowProxy.getInstance();
+
+ if (date.matches("[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{1,3}Z")) {
+ Criteria criteria = Search.query().eq(Element.ELT_EXTENSION, Import.EXT_IMPORT).eq(Bookmark.FQ_FIELD_EMAIL, user.getEmail()).
+ eq(Import.FQ_FIELD_DATE, date).criteria();
+ List<Import> bookmarks = proxy.findAllByCriteria(Import.class, criteria).getAll();
+ List<String> ids = new ArrayList<String>();
- protected void actionDeleteImport(HttpServletRequest request,
- HttpSession session, User user) {
- ;
+ for (Import bookmark : bookmarks) {
+ ids.add(bookmark.getWikittyId());
+ }
+ proxy.delete(ids);
+ }
+ response.sendRedirect("bow?action=preferences");
}
+ }
- /* @param request servlet request
+ /* @param request servlet request
* @param response servlet response
+ * @param user user information
+ * @throws IOException If the redirection fails
+ * @description Deletes the bookmarks returned after a research
+ */
+ protected void actionDeleteSearchResults(HttpServletRequest request, HttpServletResponse response, User user) throws IOException {
+ String searchLine = request.getParameter("searchLine");
+ String fullText = request.getParameter("fullTextLine");
+
+ if (searchLine != null && fullText != null) {
+ WikittyProxy proxy = BowProxy.getInstance();
+ Criteria criteria = null;
+ if (fullText.isEmpty()) {
+ criteria = getBookmarkListCriteriaByUser(user, searchLine);
+ } else {
+ criteria = Search.query().keyword(fullText).eq(Bookmark.FQ_FIELD_EMAIL, user.getEmail()).criteria().addFacetField(Bookmark.FQ_FIELD_TAGS);
+ }
+ List<Bookmark> bookmarks = proxy.findAllByCriteria(Bookmark.class, criteria).getAll();
+ List<String> ids = new ArrayList<String>();
+
+ for (Bookmark bookmark : bookmarks) {
+ if (((searchLine.isEmpty() && bookmark.getTags() == null) || !searchLine.isEmpty()) ||
+ (fullText.isEmpty() && bookmark.getTags() == null) || !fullText.isEmpty()) {
+ ids.add(bookmark.getWikittyId());
+ }
+ }
+ proxy.delete(ids);
+ }
+ response.sendRedirect("bow?action=home");
+ }
+
+ /* @param request servlet request
+ * @param response servlet response
* @param user the user
* @param token the permanent or temporary token
* @throws ServletException if a servlet error occurs
@@ -693,7 +753,7 @@
} else {
String tag = request.getParameter("addTag");
if (tag != null && !tag.isEmpty()) {
- if (searchLine == null || searchLine.isEmpty()) {
+ if (searchLine.isEmpty()) {
searchLine = tag;
} else {
searchLine += " " + tag;
@@ -934,21 +994,29 @@
protected void createImportExtension(List<Bookmark> bookmarks) {
if (bookmarks != null && !bookmarks.isEmpty()) {
- WikittyProxy proxy = BowProxy.getInstance();
- List<String> ids = new ArrayList<String>();
- for (Bookmark bookmark : bookmarks) {
- String id = bookmark.getWikittyId();
- ids.add(id);
- }
- Date date = new Date();
- List<Import> imports = proxy.restore(Import.class, ids);
- for (Import imp : imports) {
- imp.setDate(date);
- }
- proxy.store(imports);
+ WikittyProxy proxy = BowProxy.getInstance();
+ List<String> ids = new ArrayList<String>();
+ for (Bookmark bookmark : bookmarks) {
+ String id = bookmark.getWikittyId();
+ ids.add(id);
+ }
+ Date date = new Date();
+ List<Import> imports = proxy.restore(Import.class, ids);
+ for (Import imp : imports) {
+ imp.setDate(date);
+ }
+ proxy.store(imports);
}
}
+ protected void getBookmarksByImportDate(HttpServletRequest request, User user) {
+ WikittyProxy proxy = BowProxy.getInstance();
+ Criteria criteria = Search.query().eq(Element.ELT_EXTENSION, Import.EXT_IMPORT).eq(Bookmark.FQ_FIELD_EMAIL, user.getEmail()).criteria().
+ addFacetField(Import.FQ_FIELD_DATE);
+ List<FacetTopic> bookmarksImportDate = proxy.findAllByCriteria(Import.class, criteria).getTopic(Import.FQ_FIELD_DATE);
+ request.setAttribute("bookmarksImportDate", bookmarksImportDate);
+ }
+
/* @param request servlet request
* @param response servlet response
* @param user User user
@@ -979,6 +1047,8 @@
parseHtmlToBookmarks(list, user, bookmarks, new ArrayList<String>());
bookmarks = proxy.store(bookmarks);
createImportExtension(bookmarks);
+ initHomePage(request, user);
+ request.getRequestDispatcher("home.jsp").forward(request, response);
}
catch (ParserException e) {
request.setAttribute("errorMsgUser", "Bad bookmarks file format, expected Netscape-like bookmarks file");
@@ -1097,7 +1167,7 @@
} else {
WikittyProxy proxy = BowProxy.getInstance();
Criteria criteria = null;
- if (fullText != null && !fullText.isEmpty()) {
+ if (!fullText.isEmpty()) {
criteria = Search.query().keyword(fullText).
eq(Bookmark.FQ_FIELD_EMAIL, user.getEmail()).criteria().
addFacetField(Bookmark.FQ_FIELD_TAGS);
@@ -1141,10 +1211,10 @@
String[] words = searchLine.split("\\s+"); // put the tags in an array
List<String> tags = new ArrayList<String>(Arrays.asList(words));
criteria = Search.query().eq(Bookmark.FQ_FIELD_EMAIL, user.getEmail()).
- eq(Bookmark.FQ_FIELD_TAGS, tags).criteria().addFacetField(Bookmark.FQ_FIELD_TAGS);
+ eq(Bookmark.FQ_FIELD_TAGS, tags).criteria().addFacetField(Bookmark.FQ_FIELD_TAGS);
} else {
criteria = Search.query().eq(Bookmark.FQ_FIELD_EMAIL, user.getEmail()).
- criteria().addFacetField(Bookmark.FQ_FIELD_TAGS);
+ criteria().addFacetField(Bookmark.FQ_FIELD_TAGS);
}
}
return criteria;
Modified: trunk/src/main/webapp/css/bookmark.css
===================================================================
--- trunk/src/main/webapp/css/bookmark.css 2010-10-26 15:04:25 UTC (rev 119)
+++ trunk/src/main/webapp/css/bookmark.css 2010-10-29 08:56:57 UTC (rev 120)
@@ -375,4 +375,46 @@
.formFrame p input{
margin-bottom: 2px;
+}
+
+.deleteImport{
+ width: 100%;
+ height: 32px;
+ border: 1px solid black;
+ margin-bottom: 4px;
+ padding-top:10px;
+ padding-left: 15px;
+}
+
+.deleteImportPink{
+ background-color: #BF8A9C;
+}
+
+.deleteImportWhite{
+ background-color: white;
+ margin-left: 30px;
+}
+
+.deleteImport span{
+ color: blue;
+ font-size: large;
+}
+
+.deleteImport .deleteImportButton{
+ background: url('/bow/img/croixtr.png') no-repeat;
+ width: 31px;
+ height: 32px;
+ float: right;
+ margin-right: 15px;
+ position: relative;
+ top: -5px;
+}
+
+#deleteSearchResultsButton{
+ background: url('/bow/img/croixtr.png') no-repeat;
+ width: 31px;
+ height: 32px;
+ float: right;
+ margin-left: 25px;
+ margin-right: 11px;
}
\ No newline at end of file
Modified: trunk/src/main/webapp/header.jsp
===================================================================
--- trunk/src/main/webapp/header.jsp 2010-10-26 15:04:25 UTC (rev 119)
+++ trunk/src/main/webapp/header.jsp 2010-10-29 08:56:57 UTC (rev 120)
@@ -34,6 +34,24 @@
}
return false;
}
+
+ function deleteConfirmation(goTo, bookmarksNb, importDate) {
+ var confMsg = "Do you really want to delete ";
+
+ if (bookmarksNb > 1) {
+ confMsg += "these " + bookmarksNb + " bookmarks";
+ } else {
+ confMsg += "this bookmark";
+ }
+
+ if (importDate !== undefined)
+ confMsg += " imported the " + importDate + "?";
+ else
+ confMsg += "?";
+ if (confirm(confMsg)) {
+ window.location = goTo;
+ }
+ }
//-->
</script>
</head>
Added: trunk/src/main/webapp/img/croixtr.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/img/croixtr.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/src/main/webapp/preferences.jsp
===================================================================
--- trunk/src/main/webapp/preferences.jsp 2010-10-26 15:04:25 UTC (rev 119)
+++ trunk/src/main/webapp/preferences.jsp 2010-10-29 08:56:57 UTC (rev 120)
@@ -3,6 +3,11 @@
<%@page import="org.chorem.bow.User"%>
<%@page import="org.chorem.bow.TokenActions"%>
<%@page import="org.chorem.bow.BookmarkActions"%>
+<%@page import="org.chorem.bow.Bookmark" %>
+<%@page import="org.chorem.bow.Import" %>
+<%@page import="org.nuiton.wikitty.FacetTopic" %>
+<%@page import="java.util.List" %>
+<%@page import="java.util.Date" %>
<%
User user = (User) session.getAttribute("user");
Preference preference = (Preference) session.getAttribute("preference");
@@ -35,7 +40,7 @@
if (check == null) {
preference.setSearchEngineUrlSuggestions("");
}
- %>
+ %>
<jsp:include page="header.jsp" flush="true">
<jsp:param name="cssFile" value="bookmark.css" />
</jsp:include>
@@ -79,6 +84,40 @@
</p>
</div>
</form>
+ <div class="menu clearfix">
+ <h2>Imported bookmarks</h2>
+ </div>
+ <%
+ List<FacetTopic> bookmarkImportList = (List<FacetTopic>)request.getAttribute("bookmarksImportDate");
+ if (bookmarkImportList != null) {
+ if (bookmarkImportList.size() > 0) {
+ String bgColors[] = {"Pink", "White"};
+ int i = 0;
+ int colorsNb = bgColors.length;
+
+ for (FacetTopic bookmarkImport : bookmarkImportList) {
+ String date = bookmarkImport.getTopicName();
+ String dateSave = date;
+
+ date = date.replaceAll("[^0-9:-]+", " ").trim();
+ date = date.substring(0, date.lastIndexOf(' '));
+ %>
+ <div class="deleteImport deleteImport<%=bgColors[i % colorsNb]%>">
+ <span><%= date + " (" + bookmarkImport.getCount() + " bookmarks)" %></span>
+ <a class="deleteImportButton" href="" onclick="deleteConfirmation('bow?action=deleteImport&date=<%=dateSave%>',<%=bookmarkImport.getCount()%>,'<%=date%>'); return(false);"></a>
+ </div>
+ <%
+ i++;
+ }
+ } else {
+ %>
+ <div class="deleteImport deleteImportWhite">
+ <span>No imported bookmarks</span>
+ </div>
+ <%
+ }
+ }
+ %>
</div>
</div>
<jsp:include page="rightMenu.jsp" flush="true" />
Modified: trunk/src/main/webapp/search.jsp
===================================================================
--- trunk/src/main/webapp/search.jsp 2010-10-26 15:04:25 UTC (rev 119)
+++ trunk/src/main/webapp/search.jsp 2010-10-29 08:56:57 UTC (rev 120)
@@ -33,12 +33,19 @@
<option value="descDate">Desc Date</option>
</select>
<input type="submit" value="OK" />
+ <%
+ List<Bookmark> bookmarkList = bookmarkActions.getBookmarks();
+ int bookmarksNb = bookmarkList.size();
+
+ if (bookmarksNb > 0) {
+ %>
+ <a id="deleteSearchResultsButton" href="" onclick="deleteConfirmation('bow?action=deleteSearchResults&searchLine=<%= searchLine %>&fullTextLine=<%= fullText %>', <%=bookmarksNb%>); return(false);"></a>
+ <% } %>
</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) {
1
0
Author: tchemit
Date: 2010-10-26 17:04:25 +0200 (Tue, 26 Oct 2010)
New Revision: 119
Url: http://chorem.org/repositories/revision/bow/119
Log:
add svn:ignore
Modified:
trunk/
Property changes on: trunk
___________________________________________________________________
Modified: svn:ignore
- target
solr
transaction.log
PutObjectStoreDirHere
.settings
.classpath
.project
+ target
solr
transaction.log
PutObjectStoreDirHere
.settings
.classpath
.project
*.ipr
*.iws
*.iml
1
0
r118 - in trunk: . src/main/java/org/chorem/bow src/main/webapp src/main/webapp/css
by vbriand@users.chorem.org 21 Oct '10
by vbriand@users.chorem.org 21 Oct '10
21 Oct '10
Author: vbriand
Date: 2010-10-21 17:48:45 +0200 (Thu, 21 Oct 2010)
New Revision: 118
Url: http://chorem.org/repositories/revision/bow/118
Log:
bugs resolution (registration, uncaught exceptions, easy access to admin page); W3C compliant; HTML uses (more) includes to allow easier further modifications; Added an explicit error message in the page body instead of the 'Errorsvn diff pom.xml' message; New style for preferences and admin pages; The bookmark permanent link works now (at least with Firefox); The cancellation of the adding bookmark prompt box doesn't create a bookmark with null values anymore; The accents are now displayed correctly
Added:
trunk/src/main/webapp/css/global.css
trunk/src/main/webapp/errorFrame.jsp
trunk/src/main/webapp/home.jsp
trunk/src/main/webapp/rightMenu.jsp
trunk/src/main/webapp/search.jsp
Removed:
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/main.jsp
Modified:
trunk/pom.xml
trunk/src/main/java/org/chorem/bow/BookmarkActions.java
trunk/src/main/java/org/chorem/bow/ControllerServlet.java
trunk/src/main/webapp/admin.jsp
trunk/src/main/webapp/bookmark.jsp
trunk/src/main/webapp/bookmarkTop.jsp
trunk/src/main/webapp/css/bookmark.css
trunk/src/main/webapp/css/connexion.css
trunk/src/main/webapp/error.jsp
trunk/src/main/webapp/footer.jsp
trunk/src/main/webapp/forgotPassword.jsp
trunk/src/main/webapp/header.jsp
trunk/src/main/webapp/login.jsp
trunk/src/main/webapp/preferences.jsp
trunk/src/main/webapp/register.jsp
trunk/src/main/webapp/tagsCloud.jsp
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-10-17 01:55:42 UTC (rev 117)
+++ trunk/pom.xml 2010-10-21 15:48:45 UTC (rev 118)
@@ -66,6 +66,12 @@
</dependency>
<dependency>
+ <groupId>org.nuiton.wikitty</groupId>
+ <artifactId>wikitty-solr-impl</artifactId>
+ <version>${wikitty.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.5.11</version>
@@ -95,6 +101,12 @@
<version>1.6</version>
</dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.5</version>
+ </dependency>
+
</dependencies>
<scm>
Modified: trunk/src/main/java/org/chorem/bow/BookmarkActions.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/BookmarkActions.java 2010-10-17 01:55:42 UTC (rev 117)
+++ trunk/src/main/java/org/chorem/bow/BookmarkActions.java 2010-10-21 15:48:45 UTC (rev 118)
@@ -144,7 +144,7 @@
*/
public static Bookmark createBookmark(String url, String nameAndTags, User user) {
- Bookmark bookmark = (Bookmark) new BookmarkImpl();
+ Bookmark bookmark = new BookmarkImpl();
int nameIndex = nameAndTags.indexOf('|'); // get the index name of the website
if (nameIndex > 0) {
@@ -152,6 +152,7 @@
if (!name.isEmpty()) {
name = name.trim();
bookmark.setDescription(name); // set the description (website name)
+ bookmark.setAlias(name);
}
}
String tags = nameAndTags;
@@ -163,7 +164,6 @@
bookmark.setClick(0);
bookmark.setEmail(user.getEmail()); // set the email (user name)
bookmark.setDate(new Date()); // set the date
- bookmark.setAlias("");
return bookmark;
}
@@ -205,7 +205,7 @@
}
public static Bookmark createBookmark(String url, String name, String tags, User user, String alias, Date date) {
- Bookmark bookmark = (Bookmark) new BookmarkImpl();
+ Bookmark bookmark = new BookmarkImpl();
if (name != null) {
name = name.trim();
bookmark.setDescription(name);
Modified: trunk/src/main/java/org/chorem/bow/ControllerServlet.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-10-17 01:55:42 UTC (rev 117)
+++ trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-10-21 15:48:45 UTC (rev 118)
@@ -43,6 +43,7 @@
import javax.mail.internet.MimeMessage;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
+import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -72,9 +73,8 @@
* @author bbrossaud
*/
public class ControllerServlet extends HttpServlet {
-
- private static final long serialVersionUID = 1L;
- private static final Log log = LogFactory.getLog(ControllerServlet.class);
+ private static final long serialVersionUID = 1L;
+ private static final Log log = LogFactory.getLog(ControllerServlet.class);
protected String version = "";
protected String bowServletUrl = "";
@@ -102,6 +102,7 @@
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
try {
+ request.setCharacterEncoding("UTF8");
request.setAttribute("version", version);
request.setAttribute("bowUrl", bowServletUrl);
HttpSession session = request.getSession(true);
@@ -174,7 +175,7 @@
log.debug("Going to actionSearch");
}
this.actionSearch(request, user);
- request.getRequestDispatcher("main.jsp").forward(request, response);
+ request.getRequestDispatcher("search.jsp").forward(request, response);
} else if (action.equals("generateToken") && user != null) {
if (log.isDebugEnabled()) {
log.debug("Going to actionGenerateToken");
@@ -206,7 +207,7 @@
log.debug("Going to actionOrder");
}
this.actionOrder(request, response, user);
- request.getRequestDispatcher("main.jsp").forward(request, response);
+ request.getRequestDispatcher("search.jsp").forward(request, response);
} else if (action.equals("addClick") && user != null) {
if (log.isDebugEnabled()) {
log.debug("Going to actionAddClic");
@@ -238,7 +239,7 @@
log.debug("Going to actionFullText");
}
this.actionFullText(request, user);
- request.getRequestDispatcher("main.jsp").forward(request, response);
+ request.getRequestDispatcher("search.jsp").forward(request, response);
} else if (action.equals("preferences") && user != null) {
if (log.isDebugEnabled()) {
log.debug("Going to actionPreferences");
@@ -248,7 +249,11 @@
if (log.isDebugEnabled()) {
log.debug("Going to actionAdmin");
}
- request.getRequestDispatcher("admin.jsp").forward(request, response);
+ if ((Boolean)session.getAttribute("admin") == true) {
+ request.getRequestDispatcher("admin.jsp").forward(request, response);
+ } else {
+ request.getRequestDispatcher("login.jsp").forward(request, response);
+ }
} else if (action.equals("changePreferences") && user != null) {
if (log.isDebugEnabled()) {
log.debug("Going to actionChangePreferences");
@@ -279,6 +284,8 @@
}
} catch (Exception eee) {
log.error("Can't do action", eee);
+ request.setAttribute("errorMsgUser", eee.getMessage());
+ request.setAttribute("errorMsgTech", eee.toString());
request.getRequestDispatcher("error.jsp").forward(request, response);
}
}
@@ -327,7 +334,7 @@
BookmarkActions bookmarkActions = createBookmarkActions(request, result, searchLine);
request.setAttribute("bookmarkActions", bookmarkActions);
request.setAttribute("token", token);
- request.getRequestDispatcher("main.jsp").forward(request, response);
+ request.getRequestDispatcher("search.jsp").forward(request, response);
}
}
@@ -467,10 +474,11 @@
String searchLine = request.getParameter("searchLine");
if (searchLine == null) {
initHomePage(request, user);
+ request.getRequestDispatcher("home.jsp").forward(request, response);
} else {
actionSearch(request, user);
+ request.getRequestDispatcher("search.jsp").forward(request, response);
}
- request.getRequestDispatcher("main.jsp").forward(request, response);
}
/* @param request servlet request
@@ -483,15 +491,15 @@
throws IOException, ServletException {
String bookmarkId = request.getParameter("bookmarkId");
if (bookmarkId != null && !bookmarkId.isEmpty()) {
- try {
- WikittyProxy proxy = BowProxy.getInstance();
- Bookmark bookmark = proxy.restore(Bookmark.class, bookmarkId);
- if (bookmark != null) {
- proxy.delete(bookmarkId);
- }
- } catch (Exception eee) {
- log.error("Can't do action", eee);
+ try {
+ WikittyProxy proxy = BowProxy.getInstance();
+ Bookmark bookmark = proxy.restore(Bookmark.class, bookmarkId);
+ if (bookmark != null) {
+ proxy.delete(bookmarkId);
}
+ } catch (Exception eee) {
+ log.error("Can't do action", eee);
+ }
}
redirectToTheGoodPage(request, response);
}
@@ -564,12 +572,12 @@
WikittyProxy proxy = BowProxy.getInstance();
Bookmark bookmark = proxy.restore(Bookmark.class, id);
if (bookmark != null) {
- if (alias != null && !alias.isEmpty()) {
- Criteria criteria = Search.query().eq(Bookmark.FQ_FIELD_ALIAS, alias).criteria();
- if (proxy.findByCriteria(Bookmark.class, criteria) != null) {
+ if (alias != null && !alias.isEmpty()) {
+ Criteria criteria = Search.query().eq(Bookmark.FQ_FIELD_ALIAS, alias).criteria();
+ if (proxy.findByCriteria(Bookmark.class, criteria) != null) {
alias = bookmark.getAlias();
- }
}
+ }
BookmarkActions.updateBookmark(bookmark, name, link, tags, alias);
proxy.store(bookmark);
}
@@ -605,10 +613,12 @@
bookmark = BookmarkActions.createBookmark(link, name, tags, user, alias, null);
} else { // this part is for the bookmark addition by script
String nameAndTags = request.getParameter("nameAndTags");
- bookmark = BookmarkActions.createBookmark(link, nameAndTags, user);
+ if (nameAndTags != null) {
+ bookmark = BookmarkActions.createBookmark(link, nameAndTags, user);
+ }
}
- if (bookmark != null) {
- proxy.store(bookmark); // store the bookmark if all is Ok
+ if (bookmark != null && !bookmark.getDescription().isEmpty() && !bookmark.getEmail().isEmpty()) {
+ proxy.store(bookmark); // store the bookmark if everything is ok
if (log.isDebugEnabled()) {
log.debug("Adding URL");
}
@@ -675,26 +685,26 @@
throws IOException, ServletException {
String searchLine = request.getParameter("searchLine");
if (searchLine == null) {
- searchLine = "";
+ searchLine = "";
}
String fulltext = request.getParameter("fullTextLine");
if (fulltext != null && !fulltext.isEmpty() && searchLine.isEmpty()) {
- actionFullText(request, user);
+ actionFullText(request, user);
} else {
- String tag = request.getParameter("addTag");
- if (tag != null && !tag.isEmpty()) {
- if (searchLine == null || searchLine.isEmpty()) {
- searchLine = tag;
- } else {
- searchLine += " " + tag;
- }
- }
- WikittyProxy proxy = BowProxy.getInstance();
- Criteria criteria = getBookmarkListCriteriaByUser(user, searchLine);
- criteria = criteria.addSortDescending(Bookmark.FQ_FIELD_CLICK);
- PagedResult<Bookmark> result = proxy.findAllByCriteria(Bookmark.class, criteria); // select all bookmarks by user
- BookmarkActions bookmarkActions = createBookmarkActions(request, result, searchLine);
- request.setAttribute("bookmarkActions", bookmarkActions);
+ String tag = request.getParameter("addTag");
+ if (tag != null && !tag.isEmpty()) {
+ if (searchLine == null || searchLine.isEmpty()) {
+ searchLine = tag;
+ } else {
+ searchLine += " " + tag;
+ }
+ }
+ WikittyProxy proxy = BowProxy.getInstance();
+ Criteria criteria = getBookmarkListCriteriaByUser(user, searchLine);
+ criteria = criteria.addSortDescending(Bookmark.FQ_FIELD_CLICK);
+ PagedResult<Bookmark> result = proxy.findAllByCriteria(Bookmark.class, criteria); // select all bookmarks by user
+ BookmarkActions bookmarkActions = createBookmarkActions(request, result, searchLine);
+ request.setAttribute("bookmarkActions", bookmarkActions);
}
}
@@ -732,28 +742,31 @@
*/
protected void actionRegister(HttpServletRequest request, HttpServletResponse response, HttpSession session)
throws IOException, ServletException, NoSuchAlgorithmException, AddressException, MessagingException {
- String email = request.getParameter("email");
- String password = request.getParameter("password");
- String md5 = StringUtil.encodeMD5(password);
- if (this.checkRegister(email, md5)) { // check if all is well
- String error = "Email and password must be correctly filled";
- request.setAttribute("msgError", error);
- request.getRequestDispatcher("register.jsp").forward(request, response);
- } else {
- WikittyProxy proxy = BowProxy.getInstance();
- UserImpl newUser = new UserImpl();
- newUser.setPassword(md5);
- newUser.setEmail(email);
- User login = proxy.store((User) newUser); // store the new user
- if (login == null) {
- request.getRequestDispatcher("error.jsp").forward(request, response);
- } else {
- initSession(session, login);
- initHomePage(request, login);
- sendMail(email, password);
- request.getRequestDispatcher("main.jsp").forward(request, response);
- }
- }
+ String email = request.getParameter("email");
+ if (email != null) {
+ email = email.trim();
+ String password = request.getParameter("password");
+ String md5 = null;
+ if (password != null) {
+ md5 = StringUtil.encodeMD5(password);
+ if (!this.checkRegister(email, md5, request)) { // check if all is well
+ WikittyProxy proxy = BowProxy.getInstance();
+ UserImpl newUser = new UserImpl();
+ newUser.setPassword(md5);
+ newUser.setEmail(email);
+ User login = proxy.store((User) newUser); // store the new user
+ if (login != null) {
+ initSession(session, login);
+ initHomePage(request, login);
+ sendMail(email, password);
+ request.getRequestDispatcher("home.jsp").forward(request, response);
+ return ;
+ }
+ request.setAttribute("errorMsgUser", "Invalid login, please choose another one");
+ }
+ }
+ }
+ request.getRequestDispatcher("register.jsp").forward(request, response);
}
/* @param request servlet request
@@ -765,19 +778,22 @@
protected void actionLogin(HttpServletRequest request, HttpServletResponse response, HttpSession session)
throws IOException, ServletException, NoSuchAlgorithmException {
String email = request.getParameter("email");
- String password = request.getParameter("password");
- password = StringUtil.encodeMD5(password);
- User login = this.checkLogin(email, password); // check if the user exists
- if (login != null) {
- initSession(session, login);
- initHomePage(request, login);
- request.getRequestDispatcher("main.jsp").forward(request, response);
-
- } else {
- String error = "Unknow email or incorrect password";
- request.setAttribute("msgError", error);
- request.getRequestDispatcher("login.jsp").forward(request, response);
+ if (email != null) {
+ email = email.trim();
+ String password = request.getParameter("password");
+ String md5 = null;
+ if (password != null) {
+ md5 = StringUtil.encodeMD5(password);
+ User login = this.checkLogin(email, md5, request); // check if the user exists
+ if (login != null) {
+ initSession(session, login);
+ initHomePage(request, login);
+ request.getRequestDispatcher("home.jsp").forward(request, response);
+ return;
+ }
+ }
}
+ request.getRequestDispatcher("login.jsp").forward(request, response);
}
protected void checkAdmin(String login, HttpSession session) {
@@ -823,35 +839,43 @@
* @return null the user doesn't exist
* @return User the user exists
*/
- protected User checkLogin(String email, String password) {
+ protected User checkLogin(String email, String password, HttpServletRequest request) throws NoSuchAlgorithmException {
if (email != null && password != null) {
- if (!email.isEmpty() && !password.isEmpty()) {
+ if (!email.isEmpty() && !password.equals(StringUtil.encodeMD5(""))) {
WikittyProxy proxy = BowProxy.getInstance();
-
Criteria criteria = Search.query().eq(User.FQ_FIELD_EMAIL, email).
eq(User.FQ_FIELD_PASSWORD, password).criteria();
- return proxy.findByCriteria(User.class, criteria); // retrieve user by user name (email) and password
+ User user = proxy.findByCriteria(User.class, criteria);
+
+ if (user == null) {
+ request.setAttribute("errorMsgUser", "Unknown email or incorrect password");
+ }
+ return user; // retrieve user by user name (email) and password
}
}
+ request.setAttribute("errorMsgUser", "Please enter your email address and your password");
return null;
}
/* @param email String which contains the user name (email)
* @param password String which contains the user password
- * @return bool false if the user doesn't exists or true
+ * @return boolean false if the user doesn't exist or true
*/
- protected boolean checkRegister(String email, String password) {
+ protected boolean checkRegister(String email, String password, HttpServletRequest request) throws NoSuchAlgorithmException {
if (email != null && password != null) {
- if (!email.isEmpty() && !password.isEmpty()) {
+ if (!email.isEmpty() && !password.equals(StringUtil.encodeMD5(""))) {
WikittyProxy proxy = BowProxy.getInstance();
Criteria criteria = Search.query().eq(User.FQ_FIELD_EMAIL, email).criteria(); // retrieve user by user name (email)
if (proxy.findByCriteria(User.class, criteria) == null) {
return false;
}
+ request.setAttribute("errorMsgUser", "This email address is already used");
+ return true;
}
}
+ request.setAttribute("errorMsgUser", "Email and password must be correctly filled");
return true;
}
@@ -894,15 +918,15 @@
throws ServletException, IOException, NoSuchAlgorithmException {
User user = (User) session.getAttribute("user");
if (user == null) {
- String token = request.getParameter("token");
- user = checkPermanentToken(token);
- if (user != null) {
- initSession(session, user);
- }
+ String token = request.getParameter("token");
+ user = checkPermanentToken(token);
+ if (user != null) {
+ initSession(session, user);
+ }
}
if (user != null) {
- initHomePage(request, user);
- request.getRequestDispatcher("main.jsp").forward(request, response);
+ initHomePage(request, user);
+ request.getRequestDispatcher("home.jsp").forward(request, response);
} else {
request.getRequestDispatcher("login.jsp").forward(request, response);
}
@@ -932,7 +956,7 @@
* @description import bookmark for an user
*/
protected void actionImportBookmarks(HttpServletRequest request, HttpServletResponse response, User user)
- throws IOException, FileUploadException, ParserException {
+ throws IOException, FileUploadException, ServletException {
// Check that we have a file upload request
boolean isMultipart = ServletFileUpload.isMultipartContent(request);
if (isMultipart == true) {
@@ -948,16 +972,30 @@
if (!item.isFormField()) {
WikittyProxy proxy = BowProxy.getInstance();
String content = item.getString();
- Parser parser = new Parser(content);
- NodeList list = parser.parse(null);
- List<Bookmark> bookmarks = new ArrayList<Bookmark>();
- parseHtmlToBookmarks(list, user, bookmarks, new ArrayList<String>());
- bookmarks = proxy.store(bookmarks);
- createImportExtension(bookmarks);
+ try {
+ Parser parser = new Parser(content);
+ NodeList list = parser.parse(null);
+ List<Bookmark> bookmarks = new ArrayList<Bookmark>();
+ parseHtmlToBookmarks(list, user, bookmarks, new ArrayList<String>());
+ bookmarks = proxy.store(bookmarks);
+ createImportExtension(bookmarks);
+ }
+ catch (ParserException e) {
+ request.setAttribute("errorMsgUser", "Bad bookmarks file format, expected Netscape-like bookmarks file");
+ request.setAttribute("errorMsgTech", e.getMessage());
+
+ String searchLine = request.getParameter("searchLine");
+ if (searchLine == null) {
+ initHomePage(request, user);
+ request.getRequestDispatcher("home.jsp").forward(request, response);
+ } else {
+ actionSearch(request, user);
+ request.getRequestDispatcher("search.jsp").forward(request, response);
+ }
+ }
}
}
}
- redirectToTheGoodPage(request, response);
}
/* @param list NodeList list
@@ -993,7 +1031,7 @@
}
}
if (isFolder == true) { // if we find a folder, we have to remove it
- int index = tagList.size() - 1;
+ int index = tagList.size() - 1;
if (index > -1) {
tagList.remove(index);
}
@@ -1055,21 +1093,21 @@
protected void actionFullText(HttpServletRequest request, User user) throws IOException, ServletException {
String fullText = request.getParameter("fullTextLine");
if (fullText == null || fullText.isEmpty()) {
- actionSearch(request, user);
+ actionSearch(request, user);
} else {
- WikittyProxy proxy = BowProxy.getInstance();
- Criteria criteria = null;
- if (fullText != null && !fullText.isEmpty()) {
- criteria = Search.query().keyword(fullText).
- eq(Bookmark.FQ_FIELD_EMAIL, user.getEmail()).criteria().
- addFacetField(Bookmark.FQ_FIELD_TAGS);
-
- } else {
- criteria = getBookmarkListCriteriaByUser(user, null);
- }
- PagedResult<Bookmark> result = proxy.findAllByCriteria(Bookmark.class, criteria);
- BookmarkActions bookmarkActions = createBookmarkActions(request, result, null);
- request.setAttribute("bookmarkActions", bookmarkActions);
+ WikittyProxy proxy = BowProxy.getInstance();
+ Criteria criteria = null;
+ if (fullText != null && !fullText.isEmpty()) {
+ criteria = Search.query().keyword(fullText).
+ eq(Bookmark.FQ_FIELD_EMAIL, user.getEmail()).criteria().
+ addFacetField(Bookmark.FQ_FIELD_TAGS);
+
+ } else {
+ criteria = getBookmarkListCriteriaByUser(user, null);
+ }
+ PagedResult<Bookmark> result = proxy.findAllByCriteria(Bookmark.class, criteria);
+ BookmarkActions bookmarkActions = createBookmarkActions(request, result, null);
+ request.setAttribute("bookmarkActions", bookmarkActions);
}
}
@@ -1117,7 +1155,7 @@
Preference preference = (Preference) session.getAttribute("preference");
// Retrieve Preference fields
String colors = request.getParameter("colors");
- String tags = request.getParameter("tags");
+ String tags = request.getParameter("tagsNb");
String bookmarks = request.getParameter("bookmarks");
String searchEngineSuggestions = request.getParameter("searchEngineUrlSuggestions");
String searchEngineResults = request.getParameter("searchEngineUrlResults");
@@ -1216,35 +1254,39 @@
protected void actionSendPassword(HttpServletRequest request, HttpServletResponse response)
throws NoSuchAlgorithmException, AddressException, MessagingException, ServletException, IOException {
String email = request.getParameter("email");
- if (email != null && !email.isEmpty()) {
- WikittyProxy proxy = BowProxy.getInstance();
- Criteria criteria = Search.query().eq(User.FQ_FIELD_EMAIL, email).criteria();
- User user = proxy.findByCriteria(User.class, criteria);
- if (user != null) {
- boolean bool = true;
- String password = "";
- String md5 = "";
- while (bool) {
- password = RandomStringUtils.randomAlphanumeric(20);
- md5 = StringUtil.encodeMD5(password);
- bool = passwordExists(md5);
- }
- sendMail(email, password);
- user.setPassword(md5);
- proxy.store(user);
- request.getRequestDispatcher("login.jsp").forward(request, response);
+ if (email != null) {
+ email = email.trim();
+ if (!email.isEmpty()) {
+ WikittyProxy proxy = BowProxy.getInstance();
+ Criteria criteria = Search.query().eq(User.FQ_FIELD_EMAIL, email).criteria();
+ User user = proxy.findByCriteria(User.class, criteria);
+ if (user != null) {
+ boolean bool = true;
+ String password = "";
+ String md5 = "";
+ while (bool) {
+ password = RandomStringUtils.randomAlphanumeric(20);
+ md5 = StringUtil.encodeMD5(password);
+ bool = passwordExists(md5);
+ }
+ sendMail(email, password);
+ user.setPassword(md5);
+ proxy.store(user);
+ request.getRequestDispatcher("login.jsp").forward(request, response);
+ } else {
+ request.setAttribute("errorMsgUser", "This email address doesn't exist");
+ }
} else {
- request.setAttribute("msgError", "This email doesn't exist...");
- request.getRequestDispatcher("forgotPassword.jsp").forward(request, response);
+ request.setAttribute("errorMsgUser", "Please enter an email address");
}
- } else {
- request.setAttribute("msgError", "Please enter an email");
- request.getRequestDispatcher("forgotPassword.jsp").forward(request, response);
}
+ request.getRequestDispatcher("forgotPassword.jsp").forward(request, response);
}
protected void actionReIndexation(HttpServletRequest request, HttpSession session, User user) {
- WikittyProxy proxy = BowProxy.getInstance();
- proxy.getWikittyService().syncEngin(proxy.getSecurityToken());
+ if ((Boolean)session.getAttribute("admin") == true) {
+ WikittyProxy proxy = BowProxy.getInstance();
+ proxy.getWikittyService().syncEngin(proxy.getSecurityToken());
+ }
}
}
Modified: trunk/src/main/webapp/admin.jsp
===================================================================
--- trunk/src/main/webapp/admin.jsp 2010-10-17 01:55:42 UTC (rev 117)
+++ trunk/src/main/webapp/admin.jsp 2010-10-21 15:48:45 UTC (rev 118)
@@ -1,64 +1,42 @@
<%@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" %>
-
<%
- User user = (User) session.getAttribute("user");
- Preference preference = (Preference) session.getAttribute("preference");
- TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
- if (user != null && preference != null && tokenActions != null) {
- String url = (String) request.getAttribute("bowUrl");
- String version = (String) request.getAttribute("version");
- String permanentToken = tokenActions.getPermanentToken();
- String check = preference.getColors();
- if (check == null) {
- preference.setColors("");
- }
- check = preference.getSearchEngineUrlResults();
- if (check == null) {
- preference.setSearchEngineUrlResults("");
- }
- check = preference.getSearchEngineUrlSuggestions();
- if (check == null) {
- preference.setSearchEngineUrlSuggestions("");
- }
-%>
-
-<html>
- <head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <meta name="description" content="Bookmark On the Web" />
- <title>Bow</title>
- <link rel="stylesheet" type="text/css" href="./css/connexion.css" />
- </head>
-
- <body>
- <div id="headback">
- <div id="head">
- <div id="headleft">
- <a class="logo" href="<%=url%>?action=home&token=<%=permanentToken%>">bow</a>
- </div>
- </div>
- </div>
- <div id="mainbodyback">
- <div id="mainbody">
-
- <div id="content">
- <br /><br />
- <a href="bow?action=reIndexation">All data re-indexation</a>
- <br /><br />
- <a href="bow?action=home">Return to the home page</a>
- <br /><br />
- </div>
-
- </div>
- <jsp:include page="footer.jsp" flush="true" >
- <jsp:param name="bowUrl" value="<%=url%>" />
- <jsp:param name="version" value="<%=version%>" />
- </jsp:include>
- </div>
- </body>
-</html>
-<%}%>
+User user = (User) session.getAttribute("user");
+Preference preference = (Preference) session.getAttribute("preference");
+TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
+Boolean admin = (Boolean) session.getAttribute("admin");
+if (user != null && preference != null && tokenActions != null && admin == true) {
+ String url = (String) request.getAttribute("bowUrl");
+ String version = (String) request.getAttribute("version");
+ String permanentToken = tokenActions.getPermanentToken();
+ String check = preference.getColors();
+ if (check == null) {
+ preference.setColors("");
+ }
+ check = preference.getSearchEngineUrlResults();
+ if (check == null) {
+ preference.setSearchEngineUrlResults("");
+ }
+ check = preference.getSearchEngineUrlSuggestions();
+ if (check == null) {
+ preference.setSearchEngineUrlSuggestions("");
+ }
+ %>
+ <jsp:include page="header.jsp" flush="true">
+ <jsp:param name="cssFile" value="connexion.css" />
+ </jsp:include>
+ <div id="main">
+ <jsp:include page="errorFrame.jsp" flush="true" />
+ <div id="content">
+ <div id="formFrame">
+ <h1>Admin panel</h1>
+ <br /><br />
+ <a href="bow?action=reIndexation">All data re-indexation</a>
+ <a href="bow?action=home" id="homePage">Return to the home page</a>
+ </div>
+ </div>
+ </div>
+ <jsp:include page="footer.jsp" flush="true" />
+<% } %>
\ No newline at end of file
Modified: trunk/src/main/webapp/bookmark.jsp
===================================================================
--- trunk/src/main/webapp/bookmark.jsp 2010-10-17 01:55:42 UTC (rev 117)
+++ trunk/src/main/webapp/bookmark.jsp 2010-10-21 15:48:45 UTC (rev 118)
@@ -1,3 +1,4 @@
+<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="org.chorem.bow.BowConfig" %>
<%@page import="org.chorem.bow.Bookmark" %>
<%@page import="java.text.SimpleDateFormat" %>
Deleted: trunk/src/main/webapp/bookmarkContent.jsp
===================================================================
--- trunk/src/main/webapp/bookmarkContent.jsp 2010-10-17 01:55:42 UTC (rev 117)
+++ trunk/src/main/webapp/bookmarkContent.jsp 2010-10-21 15:48:45 UTC (rev 118)
@@ -1,109 +0,0 @@
-<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/bookmarkHomeMain.jsp
===================================================================
--- trunk/src/main/webapp/bookmarkHomeMain.jsp 2010-10-17 01:55:42 UTC (rev 117)
+++ trunk/src/main/webapp/bookmarkHomeMain.jsp 2010-10-21 15:48:45 UTC (rev 118)
@@ -1,72 +0,0 @@
-<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
Deleted: trunk/src/main/webapp/bookmarkPage.jsp
===================================================================
--- trunk/src/main/webapp/bookmarkPage.jsp 2010-10-17 01:55:42 UTC (rev 117)
+++ trunk/src/main/webapp/bookmarkPage.jsp 2010-10-21 15:48:45 UTC (rev 118)
@@ -1,52 +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;
-}
-
-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/bookmarkSearchMain.jsp
===================================================================
--- trunk/src/main/webapp/bookmarkSearchMain.jsp 2010-10-17 01:55:42 UTC (rev 117)
+++ trunk/src/main/webapp/bookmarkSearchMain.jsp 2010-10-21 15:48:45 UTC (rev 118)
@@ -1,43 +0,0 @@
-<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
Modified: trunk/src/main/webapp/bookmarkTop.jsp
===================================================================
--- trunk/src/main/webapp/bookmarkTop.jsp 2010-10-17 01:55:42 UTC (rev 117)
+++ trunk/src/main/webapp/bookmarkTop.jsp 2010-10-21 15:48:45 UTC (rev 118)
@@ -36,7 +36,7 @@
request.setAttribute("nbTags", nbTags);
String formLink = (String) request.getAttribute("link");
String formName = (String) request.getAttribute("name");
-String formTags = (String) request.getAttribute("tags");
+String formTags = (String) request.getAttribute("tagsNb");
String formAlias = (String) request.getAttribute("alias");
String formAction = (String) request.getAttribute("action");
Modified: trunk/src/main/webapp/css/bookmark.css
===================================================================
--- trunk/src/main/webapp/css/bookmark.css 2010-10-17 01:55:42 UTC (rev 117)
+++ trunk/src/main/webapp/css/bookmark.css 2010-10-21 15:48:45 UTC (rev 118)
@@ -1,38 +1,5 @@
@charset "utf-8";
-/*CSS Document*/
-*{
- padding:0;
- margin:0;
-}
-
-body{
- font-size:10px;
- font-family:Verdana, Arial, Helvetica, sans-serif;
-}
-
-.clearfix{
- height:1%;
-}
-
-.clearfix:after{
- content:".";
- height:0;
- line-height:0;
- display:block;
- visibility:hidden;
- clear:both;
-}
-
-#wrap{
- clear:both;
- float:left;
- overflow-x:hidden;
- overflow-y:visible;
- position:relative;
- width:100%;
- background-color:#9EDCF8;
-}
-
+/* CSS Document */
#page{
background-color:#9EDCF8;
float:left;
@@ -64,37 +31,14 @@
}
#main{
- float:left;
margin-top:120px;
- position:relative;
+ float:left;
+ position:relative;
right:69%;
width:59%;
clear:both;
}
-#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;
-}
-
-#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;
@@ -224,7 +168,6 @@
#logout{
float:right;
- height:auto;
position:relative;
right:67%;
width:33%;
@@ -359,7 +302,7 @@
width:86%;
height:auto;
display:block;
- position:relative;
+ posit:relative;
}
#import .input input{
@@ -367,14 +310,69 @@
margin-bottom: 10px;
}
-#footer{
- background-color:#804561;
- padding-top:30px;
+.formFrame{
+ width:365px;
+ height:315px;
+ background:url('/bow/img/fondconnexion.jpg') no-repeat;
+ position:relative;
+ margin-top: 20px;
+ margin-bottom: 20px;
+ margin-right: 100px;
+ margin-left: 100px;
+ padding-top: 10px;
+ padding-bottom: 10px;
+ padding-left: 40px;
+ padding-right: 70px;
}
-#footer p{
- color:#bf8a9c;
- font-size:14px;
- text-align:center;
- line-height:50px;
+.formFrame h1{
+ color:#804561;
+ width:225px;
+ position:relative;
+ margin:20px auto;
+}
+
+.formFrame p{
+ color:#804561;
+ font-size:11px;
+ font-weight:bold;
+ padding:15px 0;
+}
+
+.formFrame p input[type="text"],
+.formFrame p input[type="password"]{
+ width:225px;
+}
+
+.formFrame input[type="submit"]{
+ float: left;
+ margin-top:20px;
+ background:url('/bow/img/fdboutonV.jpg') repeat-x;
+ height:31px;
+ line-height:31px;
+ color:#FFFFFF;
+ font-weight:bold;
+ border:none;
+ width:auto;
+ padding: 2px;
+}
+
+.formFrame p a{
+ position: absolute;
+ color:#804561;
+ left:75px;
+ font-weight:bold;
+ font-size: 12px;
+ margin-top: 2px;
+}
+
+.formFrame #homePage,
+.formFrame #regenPermToken{
+ bottom: 50px;
+ left: 185px;
+ font-size: 10px;
+}
+
+.formFrame p input{
+ margin-bottom: 2px;
}
\ No newline at end of file
Modified: trunk/src/main/webapp/css/connexion.css
===================================================================
--- trunk/src/main/webapp/css/connexion.css 2010-10-17 01:55:42 UTC (rev 117)
+++ trunk/src/main/webapp/css/connexion.css 2010-10-21 15:48:45 UTC (rev 118)
@@ -1,49 +1,16 @@
@charset "utf-8";
/* CSS Document */
-*{
- padding:0;
- margin:0;
-}
-.clearfix {height:1%}
-
-.clearfix:after {
-
- content:".";
-
- height:0;
-
- line-height:0;
-
- display:block;
-
- visibility:hidden;
-
- clear:both;
-
-}
-body{
- font-size:10px;
- font-family:Verdana, Arial, Helvetica, sans-serif;
-}
-#headback{
- background:#FFFFFF url(/bow/img/fondhead.jpg) repeat-x;
- width:auto;
+#header{
+ background:#FFFFFF url('/bow/img/fondhead.jpg') repeat-x;
+ width:100%;
+ float:left;
height:100px;
-
-}
-#head{
clear:both;
- width:1004px;
- height:100px;
margin:0 auto;
- position:relative;
+ position: relative;
}
-#headleft{
- width:740px;
- float:left;
- height:100px;
-}
-#headleft a.logo{
+
+#header a.logo{
background:url(/bow/img/logobow.jpg);
width:290px;
height:100px;
@@ -51,18 +18,23 @@
display:block;
}
-#mainbodyback{
- background-color:#9edcf8;
- min-height:100px;
-}
-#mainbody{
+#main{
width:1004px;
margin:0 auto;
position:relative;
clear:both;
+}
+#main .menu{
+ margin-top: 25px;
}
+#page {
+ width:100%;
+ margin:0 auto;
+ clear:both;
+}
+
#content{
width:1004px;
position:relative;
@@ -70,73 +42,67 @@
padding-top:20px;
}
-#contenu{
+#formFrame{
width:225px;
height:315px;
- background:url(/bow/img/fondconnexion.jpg) no-repeat;
+ background:url('/bow/img/fondconnexion.jpg') no-repeat;
position:relative;
margin:100px auto;
padding:10px 70px;
}
-#contenu h1{
+
+#formFrame h1{
color:#804561;
width:225px;
position:relative;
margin:20px auto;
}
-#contenu form p{
+
+#formFrame form p{
color:#804561;
font-size:16px;
font-weight:bold;
padding:15px 0;
}
-#contenu form input{
+
+#formFrame form input[type="text"],
+#formFrame form input[type="password"]{
width:225px;
}
-#contenu form button {
- float:right;
- margin-top:20px;
- background:url(/bow/img/fdboutonV.jpg) repeat-x;
- height:31px;
- line-height:31px;
- color:#FFFFFF;
+
+#formFrame a{
+ position: absolute;
+ color:#804561;
+ left:75px;
font-weight:bold;
- border:none;
+ font-size: 12px;
}
-#contenu .register{
- color:#804561;
- position:absolute;
+#formFrame #register{
bottom:50px;
- left:75px;
font-size:14px;
- font-weight:bold;
}
-#contenu .forgot{
- color:#804561;
- position:absolute;
+#formFrame #forgotPwd{
bottom:100px;
- left:75px;
font-size:9px;
- font-weight:bold;
}
-#contenu .error {
- color: red;
- position:absolute;
- bottom: 10px;
- font-size: 12px;
+#formFrame #homePage{
+ bottom: 50px;
+ left: 200px;
+ font-size: 10px;
}
-#footer{
- background-color:#804561;
- height:50px;
+input[type="submit"] {
+ float:right;
+ margin-top:20px;
+ background:url('/bow/img/fdboutonV.jpg') repeat-x;
+ height:31px;
+ line-height:31px;
+ color:#FFFFFF;
+ font-weight:bold;
+ border:none;
width:auto;
-}
-#footer p{
- color:#bf8a9c;
- font-size:14px;
- text-align:center;
- line-height:50px;
+ padding: 2px;
}
\ No newline at end of file
Added: trunk/src/main/webapp/css/global.css
===================================================================
--- trunk/src/main/webapp/css/global.css (rev 0)
+++ trunk/src/main/webapp/css/global.css 2010-10-21 15:48:45 UTC (rev 118)
@@ -0,0 +1,84 @@
+@charset "utf-8";
+/* CSS Document */
+*{
+ padding:0;
+ margin:0;
+}
+
+body{
+ font-size:10px;
+ font-family:Verdana, Arial, Helvetica, sans-serif;
+}
+
+.clearfix{
+ height:1%;
+}
+
+.clearfix:after{
+ content:".";
+ height:0;
+ line-height:0;
+ display:block;
+ visibility:hidden;
+ clear:both;
+}
+
+#wrap{
+ clear:both;
+ float:left;
+ overflow-x:hidden;
+ overflow-y:visible;
+ position:relative;
+ width:100%;
+ background-color:#9EDCF8;
+}
+
+#main .menu{
+ width:90%;
+ height:35px;
+ background:#804561 url('/bow/img/pointemenu.jpg') no-repeat right;
+ margin-bottom:15px;
+ padding:0 40px;
+ line-height:35px;
+ clear: both;
+}
+
+#main div[class="menu clearfix"] h2{
+ color:#9edcf8;
+ font-size:18px;
+ font-weight:normal;
+ float:left;
+}
+
+#main .menu form{
+ float:right;
+ color:#9edcf8;
+ font-size:12px;
+}
+
+#import .input input{
+ width: 90%;
+ margin-bottom: 10px;
+}
+
+.error{
+ float: left;
+ color:red;
+ font-size:medium;
+ background-color:white;
+ overflow:auto;
+ margin-bottom: 25px;
+ padding: 4px;
+}
+
+#footer{
+ background-color:#804561;
+ padding-top:30px;
+}
+
+#footer p{
+ color:#bf8a9c;
+ font-size:14px;
+ text-align:center;
+ line-height:50px;
+}
\ No newline at end of file
Modified: trunk/src/main/webapp/error.jsp
===================================================================
--- trunk/src/main/webapp/error.jsp 2010-10-17 01:55:42 UTC (rev 117)
+++ trunk/src/main/webapp/error.jsp 2010-10-21 15:48:45 UTC (rev 118)
@@ -1,5 +1,12 @@
-<html>
- <body>
- <h1>ERROR !</h1>
- </body>
-</html>
\ No newline at end of file
+<%@page import="org.chorem.bow.TokenActions" %>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%
+ String techError = (String) request.getAttribute("errorMsgTech");
+%>
+<jsp:include page="header.jsp" flush="true">
+ <jsp:param name="cssFile" value="connexion.css" />
+</jsp:include>
+<div id="main">
+ <jsp:include page="errorFrame.jsp" flush="true" />
+</div>
+<jsp:include page="footer.jsp" flush="true" />
\ No newline at end of file
Added: trunk/src/main/webapp/errorFrame.jsp
===================================================================
--- trunk/src/main/webapp/errorFrame.jsp (rev 0)
+++ trunk/src/main/webapp/errorFrame.jsp 2010-10-21 15:48:45 UTC (rev 118)
@@ -0,0 +1,12 @@
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%
+String userError = (String) request.getAttribute("errorMsgUser");
+String techError = (String) request.getAttribute("errorMsgTech");
+
+if (userError != null) {
+%>
+ <div class="menu clearfix">
+ <h2>Error</h2>
+ </div>
+ <pre class="error"><%=userError%><% if (techError != null) { %><br /><br />Detailed error :<br /><%=techError%><% } %></pre>
+<% } %>
\ No newline at end of file
Modified: trunk/src/main/webapp/footer.jsp
===================================================================
--- trunk/src/main/webapp/footer.jsp 2010-10-17 01:55:42 UTC (rev 117)
+++ trunk/src/main/webapp/footer.jsp 2010-10-21 15:48:45 UTC (rev 118)
@@ -1,16 +1,20 @@
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<%
-String url = (String) request.getAttribute("bowUrl");
-String version = (String) request.getAttribute("version");
-%>
-<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
+ <%@page contentType="text/html" pageEncoding="UTF-8"%>
+ <%
+ String url = (String) request.getAttribute("bowUrl");
+ String version = (String) request.getAttribute("version");
+ %>
+ </div>
+ </div>
+ <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>
+</html>
\ No newline at end of file
Modified: trunk/src/main/webapp/forgotPassword.jsp
===================================================================
--- trunk/src/main/webapp/forgotPassword.jsp 2010-10-17 01:55:42 UTC (rev 117)
+++ trunk/src/main/webapp/forgotPassword.jsp 2010-10-21 15:48:45 UTC (rev 118)
@@ -1,49 +1,23 @@
<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<%
- String error = (String) request.getAttribute("msgError");
- String url = (String) request.getAttribute("bowUrl");
- String version = (String) request.getAttribute("version");
-%>
-
-<html>
- <head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <meta name="description" content="Bookmark On the Web" />
- <title>Bow</title>
- <link rel="stylesheet" type="text/css" href="./css/connexion.css" />
- </head>
- <body>
- <div id="headback">
- <div id="head">
- <div id="headleft">
- <a class="logo" href="bow">bow</a>
- </div>
- </div>
- </div>
- <div id="mainbodyback">
- <div id="mainbody">
-
- <div id="content">
-
- <div id="contenu">
- <h1>Forgot Your Password?</h1>
- <form method="POST" action="bow?action=sendPassword">
- <p>Email :</p>
- <input type="text" name="email" />
- <button>Submit</button>
- </form>
- <%if (error != null) {%>
- <p class="error"><%=error%></p>
- <%}%>
- <a href="bow" class="register">Login page</a>
- </div>
- </div>
-
- </div>
- <jsp:include page="footer.jsp" flush="true" >
- <jsp:param name="bowUrl" value="<%=url%>" />
- <jsp:param name="version" value="<%=version%>" />
- </jsp:include>
- </div>
- </body>
-</html>
\ No newline at end of file
+<jsp:include page="header.jsp" flush="true">
+ <jsp:param name="cssFile" value="connexion.css" />
+</jsp:include>
+<div id="main">
+ <jsp:include page="errorFrame.jsp" flush="true" />
+ <div id="content">
+ <div id="formFrame">
+ <h1>Forgot Your Password?</h1>
+ <form method="post" action="bow?action=sendPassword">
+ <p>
+ <label for="email">Email :</label>
+ <br />
+ <br />
+ <input type="text" name="email" id="email" />
+ <input type="submit" value="Submit" />
+ </p>
+ </form>
+ <a href="bow" class="register">Login page</a>
+ </div>
+ </div>
+</div>
+<jsp:include page="footer.jsp" flush="true" />
\ No newline at end of file
Modified: trunk/src/main/webapp/header.jsp
===================================================================
--- trunk/src/main/webapp/header.jsp 2010-10-17 01:55:42 UTC (rev 117)
+++ trunk/src/main/webapp/header.jsp 2010-10-21 15:48:45 UTC (rev 118)
@@ -1,14 +1,24 @@
+<%@page import="org.chorem.bow.TokenActions" %>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
- String url = (String) request.getAttribute("bowUrl");
+ String url = (String) request.getAttribute("bowUrl");
+ TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
+ String css = (String) request.getParameter("cssFile");
%>
-
+<!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">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <meta name="description" content="Bookmark On the Web" />
+ <meta name="description" content="Bookmarks On the Web" />
<title>Bow</title>
<link rel="search" type="application/opensearchdescription+xml" title="bowTemporarySearchEngine" href="<%=url%>?action=temporaryXml" />
<link rel="search" type="application/opensearchdescription+xml" title="bowPermanentSearchEngine" href="<%=url%>?action=permanentXml" />
- <link rel="stylesheet" type="text/css" href="./css/bookmark.css" />
+ <link rel="stylesheet" type="text/css" href="./css/global.css" />
+ <%
+ if (css != null) {
+ %>
+ <link rel="stylesheet" type="text/css" href="./css/<%=css%>" />
+ <% } %>
<script type="text/javascript">
<!--
function modify(name, alias, tags, link, action, id) {
@@ -26,4 +36,10 @@
}
//-->
</script>
-</head>
\ No newline at end of file
+</head>
+<body>
+<div id="wrap">
+ <div id="page">
+ <div id="header">
+ <a class="logo" href="<%=url%><% if (tokenActions != null) { %>?action=home&token=<%=tokenActions.getPermanentToken()%><% } %>">bow</a>
+ </div>
\ No newline at end of file
Added: trunk/src/main/webapp/home.jsp
===================================================================
--- trunk/src/main/webapp/home.jsp (rev 0)
+++ trunk/src/main/webapp/home.jsp 2010-10-21 15:48:45 UTC (rev 118)
@@ -0,0 +1,78 @@
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@page import="org.chorem.bow.BookmarkActions" %>
+<%@page import="org.chorem.bow.TokenActions" %>
+<%@page import="org.chorem.bow.Bookmark" %>
+<%@page import="org.chorem.bow.Preference" %>
+<%@page import="java.util.List" %>
+<%@page import="java.text.SimpleDateFormat" %>
+<%
+TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
+BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions");
+Preference preference = (Preference) session.getAttribute("preference");
+
+if (tokenActions != null && bookmarkActions != null) {
+ %>
+ <jsp:include page="header.jsp" flush="true">
+ <jsp:param name="cssFile" value="bookmark.css" />
+ </jsp:include>
+ <div id="main">
+ <jsp:include page="errorFrame.jsp" flush="true" />
+ <div class="menu clearfix">
+ <h2>The most used bookmarks</h2>
+ </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">
+ <h2>The last addition bookmarks</h2>
+ </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>
+ </div>
+ <jsp:include page="rightMenu.jsp" flush="true" />
+ <jsp:include page="footer.jsp" flush="true" />
+<% } %>
\ No newline at end of file
Modified: trunk/src/main/webapp/login.jsp
===================================================================
--- trunk/src/main/webapp/login.jsp 2010-10-17 01:55:42 UTC (rev 117)
+++ trunk/src/main/webapp/login.jsp 2010-10-21 15:48:45 UTC (rev 118)
@@ -1,52 +1,26 @@
<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<%
- String error = (String) request.getAttribute("msgError");
- String url = (String) request.getAttribute("bowUrl");
- String version = (String) request.getAttribute("version");
-%>
-
-<html>
- <head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <meta name="description" content="Bookmark On the Web" />
- <title>Bow</title>
- <link rel="stylesheet" type="text/css" href="./css/connexion.css" />
- </head>
- <body>
- <div id="headback">
- <div id="head">
- <div id="headleft">
- <a class="logo" href="bow">bow</a>
- </div>
- </div>
- </div>
- <div id="mainbodyback">
- <div id="mainbody">
-
- <div id="content">
-
- <div id="contenu">
- <h1>Login</h1>
- <form method="POST" action="bow?action=login" >
- <p>Email :</p>
- <input type="text" name="email" />
- <p>Password :</p>
- <input type=password name="password" />
- <button type="submit">Login</button>
- </form>
- <%if (error != null) {%>
- <p class="error"><%=error%></p>
- <%}%>
- <a href="bow?action=registration" class="register">Register</a>
- <a href="bow?action=forgotPassword" class="forgot">Forgot Your Password?</a>
- </div>
- </div>
-
- </div>
- <jsp:include page="footer.jsp" flush="true" >
- <jsp:param name="bowUrl" value="<%=url%>" />
- <jsp:param name="version" value="<%=version%>" />
- </jsp:include>
- </div>
- </body>
-</html>
\ No newline at end of file
+<jsp:include page="header.jsp" flush="true">
+ <jsp:param name="cssFile" value="connexion.css" />
+</jsp:include>
+<div id="main">
+ <jsp:include page="errorFrame.jsp" flush="true" />
+ <div id="content">
+ <div id="formFrame">
+ <h1>Login</h1>
+ <form method="post" action="bow?action=login">
+ <p>
+ <label for="email">Email :</label>
+ <input type="text" name="email" id="email" />
+ <br /><br />
+ <label for="password">Password :</label>
+ <input type="password" name="password" id="password" />
+ <br /><br />
+ <input type="submit" value="Login" />
+ </p>
+ </form>
+ <a href="bow?action=registration" id="register">Register</a>
+ <a href="bow?action=forgotPassword" id="forgotPwd">Forgot Your Password?</a>
+ </div>
+ </div>
+</div>
+<jsp:include page="footer.jsp" flush="true" />
\ No newline at end of file
Deleted: trunk/src/main/webapp/main.jsp
===================================================================
--- trunk/src/main/webapp/main.jsp 2010-10-17 01:55:42 UTC (rev 117)
+++ trunk/src/main/webapp/main.jsp 2010-10-21 15:48:45 UTC (rev 118)
@@ -1,46 +0,0 @@
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<%@page import="org.chorem.bow.BookmarkActions" %>
-<%@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");
- %>
- <!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-17 01:55:42 UTC (rev 117)
+++ trunk/src/main/webapp/preferences.jsp 2010-10-21 15:48:45 UTC (rev 118)
@@ -1,90 +1,86 @@
<%@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" %>
-
+<%@page import="org.chorem.bow.Preference"%>
+<%@page import="org.chorem.bow.User"%>
+<%@page import="org.chorem.bow.TokenActions"%>
+<%@page import="org.chorem.bow.BookmarkActions"%>
<%
- User user = (User) session.getAttribute("user");
- Preference preference = (Preference) session.getAttribute("preference");
- TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
- if (user != null && preference != null && tokenActions != null) {
- String url = (String) request.getAttribute("bowUrl");
- String version = (String) request.getAttribute("version");
- String permanentToken = tokenActions.getPermanentToken();
- String check = preference.getColors();
- if (check == null) {
- preference.setColors("");
- }
- check = preference.getSearchEngineUrlResults();
- if (check == null) {
- preference.setSearchEngineUrlResults("");
- }
- check = preference.getSearchEngineUrlSuggestions();
- if (check == null) {
- preference.setSearchEngineUrlSuggestions("");
- }
-%>
+User user = (User) session.getAttribute("user");
+Preference preference = (Preference) session.getAttribute("preference");
+TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
+Boolean admin = (Boolean) session.getAttribute("admin");
+if (admin == null) {
+ admin = false;
+}
+int nbTags = 100;
-<html>
- <head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <meta name="description" content="Bookmark On the Web" />
- <title>Bow</title>
- <link rel="stylesheet" type="text/css" href="./css/connexion.css" />
- </head>
-
- <body>
- <div id="headback">
- <div id="head">
- <div id="headleft">
- <a class="logo" href="<%=url%>?action=home&token=<%=permanentToken%>">bow</a>
- </div>
- </div>
- </div>
- <div id="mainbodyback">
- <div id="mainbody">
-
- <div id="content">
-
- <form method="POST" action="bow?action=changePreferences">
-
- <h1>User Informations</h1>
- <p>Email :</p>
- <input type="text" name="email" value="<%=user.getEmail()%>"/>
- <p>Current password :</p>
- <input type=password name="currentPassword"/>
- <p>New password :</p>
- <input type=password name="newPassword"/>
- <p>Confirm new password</p>
- <input type=password name="confirmNewPassword"/>
- <br/> <br />
- <a href="bow?action=generateToken">Regenerate permanent token</a>
-
- <br /> <br />
-
- <h1>Site look</h1>
- <p>Site color</p>
- <input type="text" name="colors" value="<%=preference.getColors()%>"/>
- <p>Tags number displays in the tag cloud</p>
- <input type="text" name="tags" value="<%=preference.getTags()%>"/>
- <p>Bookmarks number diplays in the home page</p>
- <input type="text" name="bookmarks" value="<%=preference.getBookmarks()%>"/>
- <p>Search Engine URL Suggestions</p>
- <input type="text" name="searchEngineUrlSuggestions" value="<%=preference.getSearchEngineUrlSuggestions()%>"/>
- <p>Search Engine URL Results</p>
- <input type="text" name="searchEngineUrlResults" value="<%=preference.getSearchEngineUrlResults()%>"/>
-
- <button type="submit">Change</button>
- </form>
- <a href="bow?action=home">Return to the home page</a>
- </div>
-
- </div>
- <jsp:include page="footer.jsp" flush="true" >
- <jsp:param name="bowUrl" value="<%=url%>" />
- <jsp:param name="version" value="<%=version%>" />
- </jsp:include>
- </div>
- </body>
-</html>
-<%}%>
\ No newline at end of file
+if (user != null && preference != null && tokenActions != null){
+ int tags = preference.getTags();
+ if (tags > 0) {
+ nbTags = tags;
+ }
+ request.setAttribute("nbTags", nbTags);
+ String url = (String) request.getAttribute("bowUrl");
+ String version = (String) request.getAttribute("version");
+ String temporaryToken = tokenActions.getTemporaryToken();
+ String permanentToken = tokenActions.getPermanentToken();
+ String check = preference.getColors();
+ if (check == null) {
+ preference.setColors("");
+ }
+ check = preference.getSearchEngineUrlResults();
+ if (check == null) {
+ preference.setSearchEngineUrlResults("");
+ }
+ check = preference.getSearchEngineUrlSuggestions();
+ if (check == null) {
+ preference.setSearchEngineUrlSuggestions("");
+ }
+ %>
+ <jsp:include page="header.jsp" flush="true">
+ <jsp:param name="cssFile" value="bookmark.css" />
+ </jsp:include>
+ <div id="main">
+ <jsp:include page="errorFrame.jsp" flush="true" />
+ <div id="content">
+ <div class="menu clearfix">
+ <h2>Preferences</h2>
+ </div>
+ <form method="post" action="bow?action=changePreferences">
+ <div class="formFrame">
+ <h3>User information</h3>
+ <p>
+ <label for="email">Email :</label><br />
+ <input type="text" name="email" id="email" value="<%=user.getEmail()%>" /><br /><br />
+ <label for="password">Current password :</label><br />
+ <input type="password" id="password" name="currentPassword" /><br /><br />
+ <label for="newPassword">New password :</label><br />
+ <input type="password" id="newPassword" name="newPassword" /><br /><br />
+ <label for="confirmNewPassword">Confirm new password :</label><br />
+ <input type="password" id="confirmNewPassword" name="confirmNewPassword" />
+ <a href="bow?action=generateToken" id="regenPermToken">Regenerate permanent token</a>
+ </p>
+ </div>
+ <div class="formFrame">
+ <h3>Site look</h3>
+ <p>
+ <label for="colors">Site color</label><br />
+ <input type="text" name="colors" id="colors" value="<%=preference.getColors()%>" /><br />
+ <label for="tagsNb">Number of tags displayed in the tag cloud</label><br />
+ <input type="text" name="tagsNb" id="tagsNb" value="<%=nbTags%>" /><br />
+ <label for="bookmarks">Number of bookmarks displayed on the home page</label><br />
+ <input type="text" name="bookmarks" id="bookmarks" value="<%=preference.getBookmarks()%>"/><br />
+ <label for="searchEngineUrlSuggestions">Search Engine URL Suggestions</label><br />
+ <input type="text" name="searchEngineUrlSuggestions" id="searchEngineUrlSuggestions" value="<%=preference.getSearchEngineUrlSuggestions()%>"/><br />
+ <label for="searchEngineUrlResults">Search Engine URL Results</label><br />
+ <input type="text" name="searchEngineUrlResults" id="searchEngineUrlResults" value="<%=preference.getSearchEngineUrlResults()%>"/><br />
+ <input type="submit" value="Change" />
+ <br /><br />
+ <a href="bow?action=home" id="homePage">Return to the home page</a>
+ </p>
+ </div>
+ </form>
+ </div>
+ </div>
+ <jsp:include page="rightMenu.jsp" flush="true" />
+ <jsp:include page="footer.jsp" flush="true" />
+<% } %>
\ No newline at end of file
Modified: trunk/src/main/webapp/register.jsp
===================================================================
--- trunk/src/main/webapp/register.jsp 2010-10-17 01:55:42 UTC (rev 117)
+++ trunk/src/main/webapp/register.jsp 2010-10-21 15:48:45 UTC (rev 118)
@@ -1,51 +1,25 @@
<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<%
- String error = (String) request.getAttribute("msgError");
- String url = (String) request.getAttribute("bowUrl");
- String version = (String) request.getAttribute("version");
-%>
-
-<html>
- <head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <meta name="description" content="Bookmark On the Web" />
- <title>Bow</title>
- <link rel="stylesheet" type="text/css" href="./css/connexion.css" />
- </head>
- <body>
- <div id="headback">
- <div id="head">
- <div id="headleft">
- <a class="logo" href="bow">bow</a>
- </div>
- </div>
- </div>
- <div id="mainbodyback">
- <div id="mainbody">
-
- <div id="content">
-
- <div id="contenu">
- <h1>Register</h1>
- <form method="POST" action="bow?action=register" >
- <p>Email :</p>
- <input type="text" name="email" />
- <p>Password :</p>
- <input type=password name="password" />
- <button>Register</button>
- </form>
- <%if (error != null) {%>
- <p class="error"><%=error%></p>
- <%}%>
- <a href="bow" class="register">Login page</a>
- </div>
- </div>
-
- </div>
- <jsp:include page="footer.jsp" flush="true" >
- <jsp:param name="bowUrl" value="<%=url%>" />
- <jsp:param name="version" value="<%=version%>" />
- </jsp:include>
- </div>
- </body>
-</html>
\ No newline at end of file
+<jsp:include page="header.jsp" flush="true">
+ <jsp:param name="cssFile" value="connexion.css" />
+</jsp:include>
+<div id="main">
+ <jsp:include page="errorFrame.jsp" flush="true" />
+ <div id="content">
+ <div id="formFrame">
+ <h1>Register</h1>
+ <form method="post" action="bow?action=register">
+ <p>
+ <label for="email">Email :</label>
+ <input type="text" name="email" id="email" />
+ <br /><br />
+ <label for="password">Password :</label>
+ <input type="password" name="password" id="password" />
+ <br /><br />
+ <input type="submit" value="Register" />
+ </p>
+ </form>
+ <a href="bow" id="register">Login page</a>
+ </div>
+ </div>
+</div>
+<jsp:include page="footer.jsp" flush="true" />
\ No newline at end of file
Added: trunk/src/main/webapp/rightMenu.jsp
===================================================================
--- trunk/src/main/webapp/rightMenu.jsp (rev 0)
+++ trunk/src/main/webapp/rightMenu.jsp 2010-10-21 15:48:45 UTC (rev 118)
@@ -0,0 +1,128 @@
+<%@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");
+int nbTags = 100;
+Preference preference = (Preference) session.getAttribute("preference");
+if (preference != null) {
+ int tags = preference.getTags();
+ if (tags > 0)
+ nbTags = tags;
+}
+request.setAttribute("nbTags", nbTags);
+String searchLine = null;
+String fullText = null;
+if (bookmarkActions != null){
+ searchLine = bookmarkActions.getSearchLine();
+ fullText = bookmarkActions.getFullTextLine();
+}
+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";
+%>
+<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%>?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%>?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">
+ <% if (fullText != null) { %>
+ <input type="text" name="fullTextLine" id="fullTextLine" value="<%=fullText%>" />
+ <% } else { %>
+ <input type="text" name="fullTextLine" id="fullTextLine" />
+ <% } %>
+ <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>
\ No newline at end of file
Added: trunk/src/main/webapp/search.jsp
===================================================================
--- trunk/src/main/webapp/search.jsp (rev 0)
+++ trunk/src/main/webapp/search.jsp 2010-10-21 15:48:45 UTC (rev 118)
@@ -0,0 +1,62 @@
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@page import="org.chorem.bow.BookmarkActions" %>
+<%@page import="org.chorem.bow.TokenActions" %>
+<%@page import="org.chorem.bow.Bookmark" %>
+<%@page import="org.chorem.bow.Preference" %>
+<%@page import="java.text.SimpleDateFormat" %>
+<%@page import="java.util.List" %>
+<%
+TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
+BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions");
+Preference preference = (Preference) session.getAttribute("preference");
+String searchLine = bookmarkActions.getSearchLine();
+String fullText = bookmarkActions.getFullTextLine();
+
+if (tokenActions != null && bookmarkActions != null) {
+ %>
+ <jsp:include page="header.jsp" flush="true">
+ <jsp:param name="cssFile" value="bookmark.css" />
+ </jsp:include>
+ <div id="main">
+ <jsp:include page="errorFrame.jsp" flush="true" />
+ <div class="menu clearfix">
+ <h2>Search</h2>
+ <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>
+ </div>
+ <jsp:include page="rightMenu.jsp" flush="true" />
+ <jsp:include page="footer.jsp" flush="true" />
+<% } %>
\ No newline at end of file
Modified: trunk/src/main/webapp/tagsCloud.jsp
===================================================================
--- trunk/src/main/webapp/tagsCloud.jsp 2010-10-17 01:55:42 UTC (rev 117)
+++ trunk/src/main/webapp/tagsCloud.jsp 2010-10-21 15:48:45 UTC (rev 118)
@@ -1,29 +1,28 @@
<%@page import="org.chorem.bow.BookmarkActions" %>
<%@page import="java.util.List" %>
<%@page import="org.nuiton.wikitty.FacetTopic" %>
-
<%
- BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions");
- int nbTags = (Integer) request.getAttribute("nbTags");
- String search = "";
- String searchLine = request.getParameter("searchLine");
- if (searchLine != null) {
- search += "&searchLine=" + searchLine;
- }
- if (bookmarkActions != null) {
- List<FacetTopic> tagCloud = bookmarkActions.getTagsCloud();
- int count = 0;
- for (FacetTopic tag : tagCloud) {
- int value = tag.getCount();
- 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>
-<%
- ++count;
- if (count >= nbTags) {
- break;
- }
- }
- }
+BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions");
+int nbTags = (Integer) request.getAttribute("nbTags");
+String search = "";
+String searchLine = request.getParameter("searchLine");
+if (searchLine != null) {
+ search += "&searchLine=" + searchLine;
+}
+if (bookmarkActions != null) {
+ List<FacetTopic> tagCloud = bookmarkActions.getTagsCloud();
+ int count = 0;
+ for (FacetTopic tag : tagCloud) {
+ int value = tag.getCount();
+ 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>
+ <%
+ ++count;
+ if (count >= nbTags) {
+ break;
+ }
+ }
+}
%>
\ No newline at end of file
2
1
Author: tchemit
Date: 2010-10-17 03:55:42 +0200 (Sun, 17 Oct 2010)
New Revision: 117
Url: http://chorem.org/repositories/revision/bow/117
Log:
use license.licenseName
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-10-17 01:41:44 UTC (rev 116)
+++ trunk/pom.xml 2010-10-17 01:55:42 UTC (rev 117)
@@ -129,6 +129,9 @@
<junit.version>4.8.1</junit.version>
<locales>en</locales>
+ <!-- license to use -->
+ <license.licenseName>gpl_v3</license.licenseName>
+
</properties>
<build>
1
0
Author: tchemit
Date: 2010-10-17 03:41:44 +0200 (Sun, 17 Oct 2010)
New Revision: 116
Url: http://chorem.org/repositories/revision/bow/116
Log:
Update mavenpom4redmine to 2.3.2.
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-10-08 23:52:18 UTC (rev 115)
+++ trunk/pom.xml 2010-10-17 01:41:44 UTC (rev 116)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmine</artifactId>
- <version>2.3.1</version>
+ <version>2.3.2</version>
</parent>
<groupId>org.chorem</groupId>
1
0
Author: tchemit
Date: 2010-10-09 01:52:18 +0200 (Sat, 09 Oct 2010)
New Revision: 115
Url: http://chorem.org/repositories/revision/bow/115
Log:
Update mavenpom4redmine to 2.3.1.
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-10-08 12:45:43 UTC (rev 114)
+++ trunk/pom.xml 2010-10-08 23:52:18 UTC (rev 115)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmine</artifactId>
- <version>2.3</version>
+ <version>2.3.1</version>
</parent>
<groupId>org.chorem</groupId>
1
0
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) {
1
0
Author: tchemit
Date: 2010-10-03 17:57:31 +0200 (Sun, 03 Oct 2010)
New Revision: 113
Url: http://chorem.org/repositories/revision/bow/113
Log:
Update mavenpom4redmine to 2.3.
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-09-29 08:12:22 UTC (rev 112)
+++ trunk/pom.xml 2010-10-03 15:57:31 UTC (rev 113)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmine</artifactId>
- <version>2.2.6</version>
+ <version>2.3</version>
</parent>
<groupId>org.chorem</groupId>
1
0