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
- 631 discussions
Author: fdesbois
Date: 2010-06-22 19:58:20 +0200 (Tue, 22 Jun 2010)
New Revision: 77
Url: http://chorem.org/repositories/revision/bow/77
Log:
Test JAK for KML files
Modified:
trunk/src/main/webapp/WEB-INF/web.xml
Modified: trunk/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/src/main/webapp/WEB-INF/web.xml 2010-06-22 09:10:23 UTC (rev 76)
+++ trunk/src/main/webapp/WEB-INF/web.xml 2010-06-22 17:58:20 UTC (rev 77)
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:/java.sun.com/dtd/web-app_2_3.dtd">
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http:/java.sun.com/dtd/web-app_2_3.dtd">
<!-- SERVLET -->
@@ -13,9 +15,9 @@
<servlet-name>Alias</servlet-name>
</servlet>
- <welcome-file-list>
+ <welcome-file-list>
<welcome-file>bow</welcome-file>
- </welcome-file-list>
+ </welcome-file-list>
<listener>
<listener-class>org.chorem.bow.ControllerServlet</listener-class>
1
0
r76 - in trunk/src/main: java/org/chorem/bow webapp webapp/css
by bbrossaud@users.chorem.org 22 Jun '10
by bbrossaud@users.chorem.org 22 Jun '10
22 Jun '10
Author: bbrossaud
Date: 2010-06-22 11:10:23 +0200 (Tue, 22 Jun 2010)
New Revision: 76
Url: http://chorem.org/repositories/revision/bow/76
Log:
user migration works and addition error msg
Modified:
trunk/src/main/java/org/chorem/bow/ControllerServlet.java
trunk/src/main/java/org/chorem/bow/UserMigration.java
trunk/src/main/webapp/css/connexion.css
trunk/src/main/webapp/forgotPassword.jsp
trunk/src/main/webapp/login.jsp
trunk/src/main/webapp/register.jsp
Modified: trunk/src/main/java/org/chorem/bow/ControllerServlet.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-06-21 16:22:07 UTC (rev 75)
+++ trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-06-22 09:10:23 UTC (rev 76)
@@ -1057,7 +1057,7 @@
protected void actionSendPassword(HttpServletRequest request, HttpServletResponse response)
throws NoSuchAlgorithmException, AddressException, MessagingException, ServletException, IOException {
String email = request.getParameter("email");
- if (email != null) {
+ 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);
@@ -1075,9 +1075,12 @@
proxy.store(user);
request.getRequestDispatcher("login.jsp").forward(request, response);
} else {
- request.setAttribute("error", "This email doesn't exist...");
+ request.setAttribute("msgError", "This email doesn't exist...");
request.getRequestDispatcher("forgotPassword.jsp").forward(request, response);
}
+ } else {
+ request.setAttribute("msgError", "Please enter an email");
+ request.getRequestDispatcher("forgotPassword.jsp").forward(request, response);
}
}
}
Modified: trunk/src/main/java/org/chorem/bow/UserMigration.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/UserMigration.java 2010-06-21 16:22:07 UTC (rev 75)
+++ trunk/src/main/java/org/chorem/bow/UserMigration.java 2010-06-22 09:10:23 UTC (rev 76)
@@ -6,7 +6,8 @@
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
-import java.util.Collection;
+import java.util.List;
+import java.util.Set;
import org.nuiton.util.StringUtil;
import org.nuiton.wikitty.Wikitty;
import org.nuiton.wikitty.WikittyException;
@@ -24,22 +25,33 @@
@Override
public Wikitty migrate(WikittyService service, WikittyTransaction transaction, Wikitty wikitty, WikittyExtension oldExt, WikittyExtension newExt) {
- Wikitty newWikitty = new Wikitty(wikitty.getId());
- newWikitty.setVersion(wikitty.getVersion());
- String extensionName = newExt.getName();
- Collection<WikittyExtension> extensions = wikitty.getExtensions();
+ String id = wikitty.getId();
+ String version = wikitty.getVersion();
+ Wikitty newWikitty = new Wikitty(id);
+ newWikitty.setVersion(version);
+
+ List<WikittyExtension> extensions = new ArrayList<WikittyExtension>(wikitty.getExtensions());
if (extensions.contains(oldExt)) {
extensions.remove(oldExt);
extensions.add(newExt);
}
- newWikitty.addExtension(new ArrayList<WikittyExtension>(extensions));
- String password = newWikitty.getFieldAsString(extensionName, "password");
- try {
- password = StringUtil.encodeMD5(password);
- } catch (NoSuchAlgorithmException ex) {
- throw new WikittyException(ex);
+ newWikitty.addExtension(extensions);
+
+ Set<String> fieldNames = wikitty.fieldNames();
+ for (String fieldName : fieldNames) {
+ Object obj = wikitty.getFqField(fieldName);
+ if (fieldName.equals("User.password")) {
+ String password = (String) obj;
+ try {
+ password = StringUtil.encodeMD5(password);
+ } catch (NoSuchAlgorithmException ex) {
+ throw new WikittyException(ex);
+ }
+ obj = password;
+ }
+ newWikitty.setFqField(fieldName, obj);
}
- newWikitty.setField(extensionName, "password", password);
+
return newWikitty;
}
}
Modified: trunk/src/main/webapp/css/connexion.css
===================================================================
--- trunk/src/main/webapp/css/connexion.css 2010-06-21 16:22:07 UTC (rev 75)
+++ trunk/src/main/webapp/css/connexion.css 2010-06-22 09:10:23 UTC (rev 76)
@@ -122,6 +122,13 @@
font-weight:bold;
}
+#contenu .error {
+ color: red;
+ position:absolute;
+ bottom: 10px;
+ font-size: 12px;
+}
+
#footer{
background-color:#804561;
height:50px;
Modified: trunk/src/main/webapp/forgotPassword.jsp
===================================================================
--- trunk/src/main/webapp/forgotPassword.jsp 2010-06-21 16:22:07 UTC (rev 75)
+++ trunk/src/main/webapp/forgotPassword.jsp 2010-06-22 09:10:23 UTC (rev 76)
@@ -6,7 +6,7 @@
%>
<html>
- <head>
+ <head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="description" content="Bookmark On the Web" />
<title>Bow</title>
@@ -32,12 +32,11 @@
<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>
- <br />
- <%if (error != null) {%>
- <font color="red"><%=error%></font>
- <%}%>
</div>
</div>
Modified: trunk/src/main/webapp/login.jsp
===================================================================
--- trunk/src/main/webapp/login.jsp 2010-06-21 16:22:07 UTC (rev 75)
+++ trunk/src/main/webapp/login.jsp 2010-06-22 09:10:23 UTC (rev 76)
@@ -34,13 +34,12 @@
<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>
- <br />
- <%if (error != null) {%>
- <font color="red"><%=error%></font>
- <%}%>
</div>
</div>
Modified: trunk/src/main/webapp/register.jsp
===================================================================
--- trunk/src/main/webapp/register.jsp 2010-06-21 16:22:07 UTC (rev 75)
+++ trunk/src/main/webapp/register.jsp 2010-06-22 09:10:23 UTC (rev 76)
@@ -6,7 +6,7 @@
%>
<html>
- <head>
+ <head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="description" content="Bookmark On the Web" />
<title>Bow</title>
@@ -34,12 +34,11 @@
<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>
- <br />
- <%if (error != null) {%>
- <font color="red"><%=error%></font>
- <%}%>
</div>
</div>
1
0
21 Jun '10
Author: bbrossaud
Date: 2010-06-21 18:22:07 +0200 (Mon, 21 Jun 2010)
New Revision: 75
Url: http://chorem.org/repositories/revision/bow/75
Log:
addition user migration and removed bug, mail is send after registeration and when the user informations are changed
Added:
trunk/src/main/java/org/chorem/bow/UserMigration.java
Modified:
trunk/src/main/java/org/chorem/bow/BowProxy.java
trunk/src/main/java/org/chorem/bow/ControllerServlet.java
trunk/src/main/xmi/bow.zargo
Modified: trunk/src/main/java/org/chorem/bow/BowProxy.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/BowProxy.java 2010-06-21 13:48:25 UTC (rev 74)
+++ trunk/src/main/java/org/chorem/bow/BowProxy.java 2010-06-21 16:22:07 UTC (rev 75)
@@ -14,12 +14,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*##%*/
-
package org.chorem.bow;
-
+import java.util.Arrays;
+import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.nuiton.wikitty.WikittyExtension;
+import org.nuiton.wikitty.WikittyExtensionMigration;
import org.nuiton.wikitty.WikittyProxy;
import org.nuiton.wikitty.WikittyService;
import org.nuiton.wikitty.WikittyServiceCached;
@@ -39,20 +41,27 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(BowProxy.class);
-
static protected BowProxy instance;
synchronized static public BowProxy getInstance() {
if (instance == null) {
BowConfig config = BowConfig.getInstance();
instance = new BowProxy(config);
+ WikittyExtensionMigration.migrationRegistry.put(User.EXT_USER, new UserMigration());
}
return instance;
}
protected BowProxy(BowConfig config) {
+ List<WikittyExtension> extensions = Arrays.asList(
+ UserImpl.extensionUser,
+ PreferenceImpl.extensionPreference,
+ BookmarkImpl.extensionBookmark,
+ TokenImpl.extensionToken);
WikittyService ws = new WikittyServiceJDBC(config.getFlatOptions());
ws = new WikittyServiceCached(ws);
+ String token = super.getSecurityToken();
+ ws.storeExtension(token, extensions);
setWikittyService(ws);
}
}
Modified: trunk/src/main/java/org/chorem/bow/ControllerServlet.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-06-21 13:48:25 UTC (rev 74)
+++ trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-06-21 16:22:07 UTC (rev 75)
@@ -136,8 +136,7 @@
if (log.isDebugEnabled()) {
log.debug("Going to actionSendPassword");
}
- this.actionSendPassword(request);
- request.getRequestDispatcher("login.jsp").forward(request, response);
+ this.actionSendPassword(request, response);
} else if (action.equals("modifyBookmark") && user != null) {
if (log.isDebugEnabled()) {
log.debug("Going to actionModif");
@@ -663,18 +662,18 @@
* @description check if the registration is correct or not
*/
protected void actionRegister(HttpServletRequest request, HttpServletResponse response, HttpSession session)
- throws IOException, ServletException, NoSuchAlgorithmException {
+ throws IOException, ServletException, NoSuchAlgorithmException, AddressException, MessagingException {
String email = request.getParameter("email");
String password = request.getParameter("password");
- password = StringUtil.encodeMD5(password);
- if (this.checkRegister(email, password)) { // check if all is well
+ 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(password);
+ newUser.setPassword(md5);
newUser.setEmail(email);
User login = proxy.store((User) newUser); // store the new user
if (login == null) {
@@ -685,6 +684,7 @@
session.setAttribute("preference", preference);
initializeToken(session, login);
actionHome(request, login);
+ sendMail(email, password);
request.getRequestDispatcher("main.jsp").forward(request, response);
}
}
@@ -981,18 +981,10 @@
}
private void actionChangePreferences(HttpServletRequest request, HttpSession session, User user)
- throws NoSuchAlgorithmException {
+ throws NoSuchAlgorithmException, AddressException, MessagingException {
+ WikittyProxy proxy = BowProxy.getInstance();
String email = request.getParameter("email");
String password = request.getParameter("password");
- if (email != null && !email.isEmpty()) {
- user.setEmail(email);
- }
- if (password != null && !password.isEmpty()) {
- password = StringUtil.encodeMD5(password);
- user.setPassword(password);
- }
-
- WikittyProxy proxy = BowProxy.getInstance();
Preference preference = (Preference) session.getAttribute("preference");
String colors = request.getParameter("colors");
preference.setColors(colors);
@@ -1006,6 +998,18 @@
preference.setSearchEngineUrlResults(searchEngineResults);
proxy.store(preference);
+ User newUser = proxy.restore(User.class, user.getWikittyId());
+ if (email != null && !email.isEmpty()) {
+ newUser.setEmail(email);
+ }
+ if (password != null && !password.isEmpty()) {
+ String md5 = StringUtil.encodeMD5(password);
+ newUser.setPassword(md5);
+ sendMail(newUser.getEmail(), password);
+ }
+ proxy.store(newUser);
+ session.setAttribute("user", newUser);
+ preference = proxy.restore(Preference.class, newUser.getWikittyId());
request.setAttribute("preference", preference);
}
@@ -1033,7 +1037,8 @@
msg.setSubject(messageSubject);
String messageBody = "Hi,\n\n";
- messageBody += "Here is your new password: " + password + "\n";
+ messageBody += "Your new password: " + password + "\n";
+ messageBody += "Your email: " + email + "\n\n";
msg.setContent(messageBody, "text/plain");
Transport.send(msg);
@@ -1049,8 +1054,8 @@
return false;
}
- protected void actionSendPassword(HttpServletRequest request)
- throws NoSuchAlgorithmException, AddressException, MessagingException {
+ protected void actionSendPassword(HttpServletRequest request, HttpServletResponse response)
+ throws NoSuchAlgorithmException, AddressException, MessagingException, ServletException, IOException {
String email = request.getParameter("email");
if (email != null) {
WikittyProxy proxy = BowProxy.getInstance();
@@ -1068,6 +1073,10 @@
sendMail(email, password);
user.setPassword(md5);
proxy.store(user);
+ request.getRequestDispatcher("login.jsp").forward(request, response);
+ } else {
+ request.setAttribute("error", "This email doesn't exist...");
+ request.getRequestDispatcher("forgotPassword.jsp").forward(request, response);
}
}
}
Added: trunk/src/main/java/org/chorem/bow/UserMigration.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/UserMigration.java (rev 0)
+++ trunk/src/main/java/org/chorem/bow/UserMigration.java 2010-06-21 16:22:07 UTC (rev 75)
@@ -0,0 +1,45 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.chorem.bow;
+
+import java.security.NoSuchAlgorithmException;
+import java.util.ArrayList;
+import java.util.Collection;
+import org.nuiton.util.StringUtil;
+import org.nuiton.wikitty.Wikitty;
+import org.nuiton.wikitty.WikittyException;
+import org.nuiton.wikitty.WikittyExtension;
+import org.nuiton.wikitty.WikittyExtensionMigration;
+import org.nuiton.wikitty.WikittyService;
+import org.nuiton.wikitty.WikittyTransaction;
+
+/**
+ *
+ * @author sherkhan
+ */
+public class UserMigration implements WikittyExtensionMigration {
+
+ @Override
+ public Wikitty migrate(WikittyService service, WikittyTransaction transaction, Wikitty wikitty, WikittyExtension oldExt, WikittyExtension newExt) {
+
+ Wikitty newWikitty = new Wikitty(wikitty.getId());
+ newWikitty.setVersion(wikitty.getVersion());
+ String extensionName = newExt.getName();
+ Collection<WikittyExtension> extensions = wikitty.getExtensions();
+ if (extensions.contains(oldExt)) {
+ extensions.remove(oldExt);
+ extensions.add(newExt);
+ }
+ newWikitty.addExtension(new ArrayList<WikittyExtension>(extensions));
+ String password = newWikitty.getFieldAsString(extensionName, "password");
+ try {
+ password = StringUtil.encodeMD5(password);
+ } catch (NoSuchAlgorithmException ex) {
+ throw new WikittyException(ex);
+ }
+ newWikitty.setField(extensionName, "password", password);
+ return newWikitty;
+ }
+}
Modified: trunk/src/main/xmi/bow.zargo
===================================================================
(Binary files differ)
1
0
r74 - in trunk: . src/main/java/org/chorem/bow src/main/resources src/main/webapp src/main/webapp/css src/main/xmi
by bbrossaud@users.chorem.org 21 Jun '10
by bbrossaud@users.chorem.org 21 Jun '10
21 Jun '10
Author: bbrossaud
Date: 2010-06-21 15:48:25 +0200 (Mon, 21 Jun 2010)
New Revision: 74
Url: http://chorem.org/repositories/revision/bow/74
Log:
addition the new design part (date) and send new password by mail
Added:
trunk/src/main/webapp/forgotPassword.jsp
Modified:
trunk/pom.xml
trunk/src/main/java/org/chorem/bow/BowConfig.java
trunk/src/main/java/org/chorem/bow/ControllerServlet.java
trunk/src/main/resources/bow.properties
trunk/src/main/webapp/bookmark.jsp
trunk/src/main/webapp/css/bookmark.css
trunk/src/main/webapp/css/connexion.css
trunk/src/main/webapp/login.jsp
trunk/src/main/webapp/register.jsp
trunk/src/main/xmi/bow.zargo
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-06-14 14:15:40 UTC (rev 73)
+++ trunk/pom.xml 2010-06-21 13:48:25 UTC (rev 74)
@@ -20,6 +20,12 @@
<dependencies>
<dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ <version>1.4.3</version>
+ </dependency>
+
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
Modified: trunk/src/main/java/org/chorem/bow/BowConfig.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/BowConfig.java 2010-06-14 14:15:40 UTC (rev 73)
+++ trunk/src/main/java/org/chorem/bow/BowConfig.java 2010-06-21 13:48:25 UTC (rev 74)
@@ -14,7 +14,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*##%*/
-
package org.chorem.bow;
import static org.nuiton.i18n.I18n._;
@@ -37,7 +36,6 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(BowConfig.class);
-
/** Singleton instance. */
protected static BowConfig instance = null;
@@ -89,6 +87,24 @@
}
/**
+ * Get bow smtp server as string.
+ *
+ * @return smtpServer
+ */
+ public String getSmtpServer() {
+ return getOption(Option.BOW_SMTPSERVER.key);
+ }
+
+ /**
+ * Get bow address from as string.
+ *
+ * @return addressFrom
+ */
+ public String getAddressFrom() {
+ return getOption(Option.BOW_ADDRESSFROM.key);
+ }
+
+ /**
* Set {@code solr} and {@code jms} system configuration.
*
* This is the "only" way to configure embedded solr.
@@ -111,14 +127,17 @@
public static enum Option {
CONFIG_FILE(CONFIG_FILE_NAME, _("bow.config.configFileName.description"),
- "bow.properties", String.class, false, false),
+ "bow.properties", String.class, false, false),
APPLICATION_VERSION("application.version", _("bow.config.application.version.description"),
- null, String.class, true, true),
+ null, String.class, true, true),
BOW_URL("bow.url", _("bow.config.bow.url.description"),
- null, String.class, false, false),
+ null, String.class, false, false),
+ BOW_SMTPSERVER("bow.smtpServer", _("bow.config.bow.smtpServer.description"),
+ null, String.class, false, false),
+ BOW_ADDRESSFROM("bow.addressFrom", _("bow.config.bow.addressFrom.description"),
+ null, String.class, false, false),
DATA_DIR("solr.data.dir", _("bow.config.data.dir.description"),
- System.getProperty("user.home") + "/.bow/solr", String.class, false, false);
-
+ System.getProperty("user.home") + "/.bow/solr", String.class, false, false);
public final String key;
public final String description;
public final String defaultValue;
@@ -136,5 +155,4 @@
this.isTransient = isTransient;
}
}
-
}
Modified: trunk/src/main/java/org/chorem/bow/ControllerServlet.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-06-14 14:15:40 UTC (rev 73)
+++ trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-06-21 13:48:25 UTC (rev 74)
@@ -14,6 +14,14 @@
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
+import java.util.Properties;
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import javax.mail.Session;
+import javax.mail.Transport;
+import javax.mail.internet.AddressException;
+import javax.mail.internet.InternetAddress;
+import javax.mail.internet.MimeMessage;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
@@ -24,6 +32,7 @@
import org.apache.commons.fileupload.FileUploadException;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
+import org.apache.commons.lang.RandomStringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.htmlparser.Node;
@@ -97,6 +106,11 @@
log.debug("Going to Register");
}
request.getRequestDispatcher("register.jsp").forward(request, response);
+ } else if (action.equals("forgotPassword")) {
+ if (log.isDebugEnabled()) {
+ log.debug("Going to forgotPassword");
+ }
+ request.getRequestDispatcher("forgotPassword.jsp").forward(request, response);
} else if (action.equals("login")) {
if (log.isDebugEnabled()) {
log.debug("Going to actionLogin");
@@ -118,6 +132,12 @@
log.debug("Going to actionAddUrl");
}
this.actionAddUrl(request, response, user);
+ } else if (action.equals("sendPassword")) {
+ if (log.isDebugEnabled()) {
+ log.debug("Going to actionSendPassword");
+ }
+ this.actionSendPassword(request);
+ request.getRequestDispatcher("login.jsp").forward(request, response);
} else if (action.equals("modifyBookmark") && user != null) {
if (log.isDebugEnabled()) {
log.debug("Going to actionModif");
@@ -988,4 +1008,67 @@
proxy.store(preference);
request.setAttribute("preference", preference);
}
+
+ protected void sendMail(String email, String password)
+ throws AddressException, MessagingException {
+
+ BowConfig config = BowConfig.getInstance();
+ String smtpServer = config.getSmtpServer();
+ Properties properties = new Properties();
+ properties.put("mail.smtp.host", smtpServer);
+
+ Session session = Session.getDefaultInstance(properties, null);
+ session.setDebug(true);
+
+ Message msg = new MimeMessage(session);
+
+ InternetAddress toAddress = new InternetAddress(email);
+ msg.addRecipient(Message.RecipientType.TO, toAddress);
+
+ String addressFrom = config.getAddressFrom();
+ InternetAddress fromAddress = new InternetAddress(addressFrom);
+ msg.setFrom(fromAddress);
+
+ String messageSubject = "[Bow] New Password";
+ msg.setSubject(messageSubject);
+
+ String messageBody = "Hi,\n\n";
+ messageBody += "Here is your new password: " + password + "\n";
+ msg.setContent(messageBody, "text/plain");
+
+ Transport.send(msg);
+ }
+
+ protected boolean passwordExists(String password) {
+ WikittyProxy proxy = BowProxy.getInstance();
+ Criteria criteria = Search.query().eq(User.FQ_FIELD_PASSWORD, password).criteria();
+ List<User> users = proxy.findAllByCriteria(User.class, criteria).getAll();
+ if (users != null && users.size() > 0) {
+ return true;
+ }
+ return false;
+ }
+
+ protected void actionSendPassword(HttpServletRequest request)
+ throws NoSuchAlgorithmException, AddressException, MessagingException {
+ String email = request.getParameter("email");
+ if (email != null) {
+ 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);
+ }
+ }
+ }
}
Modified: trunk/src/main/resources/bow.properties
===================================================================
--- trunk/src/main/resources/bow.properties 2010-06-14 14:15:40 UTC (rev 73)
+++ trunk/src/main/resources/bow.properties 2010-06-21 13:48:25 UTC (rev 74)
@@ -1,2 +1,4 @@
application.version=${project.version}
bow.url=http://localhost:8080/bow/
+bow.smtpServer=smtp
+bow.addressFrom=bow(a)chorem.org
Modified: trunk/src/main/webapp/bookmark.jsp
===================================================================
--- trunk/src/main/webapp/bookmark.jsp 2010-06-14 14:15:40 UTC (rev 73)
+++ trunk/src/main/webapp/bookmark.jsp 2010-06-21 13:48:25 UTC (rev 74)
@@ -26,11 +26,10 @@
<div class="bookmark">
<div class="bookmarkhead clearfix">
- <img src="./img/ptit-livre.jpg" alt="web site logo" />
- <a href="<%=url + bookmark.getAlias()%>" title="<%=url + bookmark.getAlias()%>" target="_blank">
+ <a class="alias" href="<%=url + bookmark.getAlias()%>" title="<%=url + bookmark.getAlias()%>" target="_blank">
<%=bookmark.getAlias()%>
</a>
- <span> (<%=sdf.format(bookmark.getDate())%>)</span>
+ <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>
</div>
Modified: trunk/src/main/webapp/css/bookmark.css
===================================================================
--- trunk/src/main/webapp/css/bookmark.css 2010-06-14 14:15:40 UTC (rev 73)
+++ trunk/src/main/webapp/css/bookmark.css 2010-06-21 13:48:25 UTC (rev 74)
@@ -217,7 +217,7 @@
#colonneD .colonnebas{
background:url(/bow/img/piedmenu.jpg) no-repeat;
- height:817px;
+ height:82px;
}
.bookmark{
@@ -231,12 +231,21 @@
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;
@@ -247,6 +256,7 @@
background:url(/bow/img/croix.jpg) no-repeat;
height:32px;
position:absolute;
+ float: right;
top:0;
right:0;
border:none;
@@ -263,6 +273,13 @@
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;
}
Modified: trunk/src/main/webapp/css/connexion.css
===================================================================
--- trunk/src/main/webapp/css/connexion.css 2010-06-14 14:15:40 UTC (rev 73)
+++ trunk/src/main/webapp/css/connexion.css 2010-06-21 13:48:25 UTC (rev 74)
@@ -1,125 +1,135 @@
@charset "utf-8";
/* CSS Document */
*{
-padding:0;
-margin:0;
+ padding:0;
+ margin:0;
}
.clearfix {height:1%}
.clearfix:after {
- content:".";
+ content:".";
- height:0;
+ height:0;
- line-height:0;
+ line-height:0;
- display:block;
+ display:block;
- visibility:hidden;
+ visibility:hidden;
- clear:both;
+ clear:both;
}
body{
-font-size:10px;
-font-family:Verdana, Arial, Helvetica, sans-serif;
+ font-size:10px;
+ font-family:Verdana, Arial, Helvetica, sans-serif;
}
#headback{
-background:#FFFFFF url(/bow/img/fondhead.jpg) repeat-x;
-width:auto;
-height:100px;
+ background:#FFFFFF url(/bow/img/fondhead.jpg) repeat-x;
+ width:auto;
+ height:100px;
}
#head{
-clear:both;
-width:1004px;
-height:100px;
-margin:0 auto;
-position:relative;
+ clear:both;
+ width:1004px;
+ height:100px;
+ margin:0 auto;
+ position:relative;
}
#headleft{
-width:740px;
-float:left;
-height:100px;
+ width:740px;
+ float:left;
+ height:100px;
}
#headleft a.logo{
-background:url(/bow/img/logobow.jpg);
-width:290px;
-height:100px;
-text-indent:-99999px;
-display:block;
+ background:url(/bow/img/logobow.jpg);
+ width:290px;
+ height:100px;
+ text-indent:-99999px;
+ display:block;
}
#mainbodyback{
-background-color:#9edcf8;
-min-height:100px;
+ background-color:#9edcf8;
+ min-height:100px;
}
#mainbody{
-width:1004px;
-margin:0 auto;
-position:relative;
-clear:both;
+ width:1004px;
+ margin:0 auto;
+ position:relative;
+ clear:both;
}
#content{
-width:1004px;
-position:relative;
-margin:0 auto;
-padding-top:20px;
+ width:1004px;
+ position:relative;
+ margin:0 auto;
+ padding-top:20px;
}
#contenu{
-width:225px;
-height:315px;
-background:url(/bow/img/fondconnexion.jpg) no-repeat;
-position:relative;
-margin:100px auto;
-padding:10px 70px;
+ width:225px;
+ height:315px;
+ background:url(/bow/img/fondconnexion.jpg) no-repeat;
+ position:relative;
+ margin:100px auto;
+ padding:10px 70px;
}
#contenu h1{
-color:#804561;
-width:60px;
-position:relative;
-margin:20px auto;
+ color:#804561;
+ width:225px;
+ position:relative;
+ margin:20px auto;
}
#contenu form p{
-color:#804561;
-font-size:16px;
-font-weight:bold;
-padding:15px 0;
+ color:#804561;
+ font-size:16px;
+ font-weight:bold;
+ padding:15px 0;
}
#contenu form input{
-width:225px;
+ width:225px;
}
-#contenu form button{
-float:right;
-margin-top:20px;
-background:url(/bow/img/fdboutonV.jpg) repeat-x;
-height:31px;
-line-height:31px;
-width:60px;
-color:#FFFFFF;
-font-weight:bold;
-border:none;
+#contenu form button {
+ 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;
}
-#contenu a{
-color:#804561;
-position:absolute;
-bottom:50px;
-left:70px;
-font-size:14px;
-font-weight:bold;
+
+#contenu .register{
+ color:#804561;
+ position:absolute;
+ bottom:50px;
+ left:75px;
+ font-size:14px;
+ font-weight:bold;
}
+
+#contenu .forgot{
+ color:#804561;
+ position:absolute;
+ bottom:100px;
+ left:75px;
+ font-size:9px;
+ font-weight:bold;
+}
+
#footer{
-background-color:#804561;
-height:50px;
-width:auto;
+ background-color:#804561;
+ height:50px;
+ width:auto;
}
#footer p{
-color:#bf8a9c;
-font-size:14px;
-text-align:center;
-line-height:50px;
+ color:#bf8a9c;
+ font-size:14px;
+ text-align:center;
+ line-height:50px;
}
\ No newline at end of file
Added: trunk/src/main/webapp/forgotPassword.jsp
===================================================================
--- trunk/src/main/webapp/forgotPassword.jsp (rev 0)
+++ trunk/src/main/webapp/forgotPassword.jsp 2010-06-21 13:48:25 UTC (rev 74)
@@ -0,0 +1,50 @@
+<%@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>
+ <a href="bow" class="register">Login page</a>
+ </div>
+ <br />
+ <%if (error != null) {%>
+ <font color="red"><%=error%></font>
+ <%}%>
+ </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
Modified: trunk/src/main/webapp/login.jsp
===================================================================
--- trunk/src/main/webapp/login.jsp 2010-06-14 14:15:40 UTC (rev 73)
+++ trunk/src/main/webapp/login.jsp 2010-06-21 13:48:25 UTC (rev 74)
@@ -34,7 +34,8 @@
<input type=password name="password" />
<button type="submit">Login</button>
</form>
- <a href="bow?action=registration">Register</a>
+ <a href="bow?action=registration" class="register">Register</a>
+ <a href="bow?action=forgotPassword" class="forgot">Forgot Your Password?</a>
</div>
<br />
<%if (error != null) {%>
Modified: trunk/src/main/webapp/register.jsp
===================================================================
--- trunk/src/main/webapp/register.jsp 2010-06-14 14:15:40 UTC (rev 73)
+++ trunk/src/main/webapp/register.jsp 2010-06-21 13:48:25 UTC (rev 74)
@@ -34,7 +34,7 @@
<input type=password name="password" />
<button>Register</button>
</form>
- <a href="bow">Return to the login page</a>
+ <a href="bow" class="register">Login page</a>
</div>
<br />
<%if (error != null) {%>
Modified: trunk/src/main/xmi/bow.zargo
===================================================================
(Binary files differ)
1
0
Author: bbrossaud
Date: 2010-06-14 16:15:40 +0200 (Mon, 14 Jun 2010)
New Revision: 73
Url: http://chorem.org/repositories/revision/bow/73
Log:
remove bug with token
Modified:
trunk/src/main/java/org/chorem/bow/ControllerServlet.java
Modified: trunk/src/main/java/org/chorem/bow/ControllerServlet.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-06-09 12:32:25 UTC (rev 72)
+++ trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-06-14 14:15:40 UTC (rev 73)
@@ -706,7 +706,7 @@
protected void initializeToken(HttpSession session, User login)
throws NoSuchAlgorithmException {
WikittyProxy proxy = BowProxy.getInstance();
- Criteria criteria = Search.query().eq(User.FQ_FIELD_EMAIL, login.getEmail()).criteria();
+ Criteria criteria = Search.query().eq(Token.FQ_FIELD_EMAIL, login.getEmail()).criteria();
Token token = proxy.findByCriteria(Token.class, criteria);
TokenActions tokenActions = new TokenActions();
if (token == null) {
1
0
Author: bbrossaud
Date: 2010-06-09 14:32:25 +0200 (Wed, 09 Jun 2010)
New Revision: 72
Url: http://chorem.org/repositories/revision/bow/72
Log:
change bow version
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-06-09 12:25:04 UTC (rev 71)
+++ trunk/pom.xml 2010-06-09 12:32:25 UTC (rev 72)
@@ -15,7 +15,7 @@
<groupId>org.chorem</groupId>
<artifactId>bow</artifactId>
- <version>1.0.0</version>
+ <version>0.1-SNAPSHOT</version>
<dependencies>
1
0
Author: bbrossaud
Date: 2010-06-09 14:25:04 +0200 (Wed, 09 Jun 2010)
New Revision: 71
Url: http://chorem.org/repositories/revision/bow/71
Log:
change version 0.0.0 to 1.0.0
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-06-09 09:48:30 UTC (rev 70)
+++ trunk/pom.xml 2010-06-09 12:25:04 UTC (rev 71)
@@ -15,7 +15,7 @@
<groupId>org.chorem</groupId>
<artifactId>bow</artifactId>
- <version>0.0.0-SNAPSHOT</version>
+ <version>1.0.0</version>
<dependencies>
1
0
r70 - in trunk/src/main: java/org/chorem/bow webapp webapp/css
by bbrossaud@users.chorem.org 09 Jun '10
by bbrossaud@users.chorem.org 09 Jun '10
09 Jun '10
Author: bbrossaud
Date: 2010-06-09 11:48:30 +0200 (Wed, 09 Jun 2010)
New Revision: 70
Url: http://chorem.org/repositories/revision/bow/70
Log:
cut the home jsp and search jsp
Added:
trunk/src/main/webapp/bookmark.jsp
trunk/src/main/webapp/tagsCloud.jsp
Modified:
trunk/src/main/java/org/chorem/bow/BookmarkActions.java
trunk/src/main/webapp/bookmarkHome.jsp
trunk/src/main/webapp/bookmarkSearch.jsp
trunk/src/main/webapp/css/bookmark.css
Modified: trunk/src/main/java/org/chorem/bow/BookmarkActions.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/BookmarkActions.java 2010-06-08 15:12:08 UTC (rev 69)
+++ trunk/src/main/java/org/chorem/bow/BookmarkActions.java 2010-06-09 09:48:30 UTC (rev 70)
@@ -413,7 +413,7 @@
public int getFont(int ti) {
int font = 1;
if (tmax > tmin) {
- font = (50 * (ti - tmin)) / (tmax - tmin); // get the font size for a tag frequency
+ font = (30 * (ti - tmin)) / (tmax - tmin); // get the font size for a tag frequency
}
if (font < 10) {
font = 10;
Added: trunk/src/main/webapp/bookmark.jsp
===================================================================
--- trunk/src/main/webapp/bookmark.jsp (rev 0)
+++ trunk/src/main/webapp/bookmark.jsp 2010-06-09 09:48:30 UTC (rev 70)
@@ -0,0 +1,70 @@
+<%@page import="org.chorem.bow.Bookmark" %>
+<%@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 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">
+ <img src="./img/ptit-livre.jpg" alt="web site logo" />
+ <a href="<%=url + bookmark.getAlias()%>" title="<%=url + bookmark.getAlias()%>" target="_blank">
+ <%=bookmark.getAlias()%>
+ </a>
+ <span> (<%=sdf.format(bookmark.getDate())%>)</span>
+ <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="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>
+ </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())) {
+ %>
+ <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>
+<%}%>
Modified: trunk/src/main/webapp/bookmarkHome.jsp
===================================================================
--- trunk/src/main/webapp/bookmarkHome.jsp 2010-06-08 15:12:08 UTC (rev 69)
+++ trunk/src/main/webapp/bookmarkHome.jsp 2010-06-09 09:48:30 UTC (rev 70)
@@ -29,9 +29,9 @@
nbTags = preference.getTags();
}
}
+ request.setAttribute("nbTags", nbTags);
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");
@@ -81,51 +81,10 @@
if (!bookmarkList.isEmpty()) {
int count = 0;
for (Bookmark bookmark : bookmarkList) {
- String link = bookmark.getLink();
- link = link.replace("'", "\\'");
+ request.setAttribute("bookmark", bookmark);
+ request.setAttribute("sdf", sdf);
%>
- <div class="bookmark">
- <div class="bookmarkhead clearfix">
- <a href="<%=url + bookmark.getAlias()%>" title="<%=url + bookmark.getAlias()%>" target="_blank">
- <%=bookmark.getAlias()%>
- </a>
- <span> (<%=sdf.format(bookmark.getDate())%>)</span>
- <a class="edit" href="bow?action=editBookmark&bookmarkId=<%=bookmark.getWikittyId()%>" onclick="return modify('<%=bookmark.getDescription()%>', '<%=bookmark.getAlias()%>', '<%=BookmarkActions.getBookmarkTagsString(bookmark)%>', '<%=link%>', 'bow?action=modifyBookmark&bookmarkId=<%=bookmark.getWikittyId()%>', '<%=bookmark.getWikittyId()%>');"></a>
- <a class="supprim" href="bow?action=removeBookmark&bookmarkId=<%=bookmark.getWikittyId()%>"></a>
- </div>
- <div class="bookmarkcontenu clearfix">
- <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>
- </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())) {
- %>
- <a style="text-decoration: none;" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%>" >
- <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%>" >
- <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>
+ <jsp:include page="bookmark.jsp" flush="true" />
<%
++count;
if (count >= nbBookmarks) {
@@ -148,52 +107,10 @@
if (!lastBookmarks.isEmpty()) {
int count = 0;
for (Bookmark bookmark : lastBookmarks) {
- String link = bookmark.getLink();
- link = link.replace("'", "\\'");
+ request.setAttribute("bookmark", bookmark);
+ request.setAttribute("sdf", sdf);
%>
- <div class="bookmark">
- <div class="bookmarkhead clearfix">
- <a href="<%=url + bookmark.getAlias()%>" title="<%=url + bookmark.getAlias()%>" target="_blank">
- <%=bookmark.getAlias()%>
- </a>
- <span> (<%=sdf.format(bookmark.getDate())%>)</span>
- <a class="edit" href="bow?action=editBookmark&bookmarkId=<%=bookmark.getWikittyId()%>" onclick="return modify('<%=bookmark.getDescription()%>', '<%=bookmark.getAlias()%>', '<%=BookmarkActions.getBookmarkTagsString(bookmark)%>', '<%=link%>', 'bow?action=modifyBookmark&bookmarkId=<%=bookmark.getWikittyId()%>', '<%=bookmark.getWikittyId()%>');"></a>
- <a class="supprim" href="bow?action=removeBookmark&bookmarkId=<%=bookmark.getWikittyId()%>"></a>
- </div>
- <div class="bookmarkcontenu clearfix">
- <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>
- </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())) {
- %>
- <a style="text-decoration: none;" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%>" >
- <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%>" >
- <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>
-
+ <jsp:include page="bookmark.jsp" flush="true" />
<%
++count;
if (count >= nbBookmarks) {
@@ -215,23 +132,7 @@
<li><a href="bow?action=generateToken">Regenerate permanent token</a></li>
</ul>
<div id="nuage">
- <% 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%>" title="<%=value%> results" class="tag" style="font-size: <%=font%>px;"><%=tagName%></a>
- <%
- ++count;
- if (count >= nbTags) {
- break;
- }
- }
- }
- %>
+ <jsp:include page="tagsCloud.jsp" flush="true" />
</div>
<div id="recherche">
<h2>Research</h2>
@@ -255,8 +156,9 @@
<h2>Import Bookmarks</h2>
<form method="POST" action="bow?action=importBookmarks" enctype="multipart/form-data">
<div class="input">
- <input type="file" name="upfile" />
- <button>Parcourir</button>
+ <input type="file" name="upfile" size="15%"/>
+ <br/>
+ <button type="submit">Import</button>
</div>
</form>
<a href="bow?action=exportBookmarks">Export bookmarks</a>
Modified: trunk/src/main/webapp/bookmarkSearch.jsp
===================================================================
--- trunk/src/main/webapp/bookmarkSearch.jsp 2010-06-08 15:12:08 UTC (rev 69)
+++ trunk/src/main/webapp/bookmarkSearch.jsp 2010-06-09 09:48:30 UTC (rev 70)
@@ -27,9 +27,9 @@
nbTags = preference.getTags();
}
}
+ request.setAttribute("nbTags", nbTags);
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");
@@ -90,48 +90,13 @@
if (!bookmarkList.isEmpty()) {
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
for (Bookmark bookmark : bookmarkList) {
- String link = bookmark.getLink();
- link = link.replace("'", "\\'");
+ request.setAttribute("bookmark", bookmark);
+ request.setAttribute("sdf", sdf);
%>
- <div class="bookmark">
- <div class="bookmarkhead clearfix">
- <a href="<%=url + bookmark.getAlias()%>" title="<%=url + bookmark.getAlias()%>" target="_blank">
- <%=bookmark.getAlias()%>
- </a>
- <span> (<%=sdf.format(bookmark.getDate())%>)</span>
- <a class="edit" href="bow?action=editBookmark&bookmarkId=<%=bookmark.getWikittyId()%>&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>" onclick="return modify('<%=bookmark.getDescription()%>', '<%=bookmark.getAlias()%>', '<%=BookmarkActions.getBookmarkTagsString(bookmark)%>', '<%=link%>', 'bow?action=modifyBookmark&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>&bookmarkId=<%=bookmark.getWikittyId()%>', '<%=bookmark.getWikittyId()%>');"></a>
- <a class="supprim" href="bow?action=removeBookmark&bookmarkId=<%=bookmark.getWikittyId()%>&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>"></a>
- </div>
- <div class="bookmarkcontenu clearfix">
- <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></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())) {
- %>
- <a style="text-decoration: none;" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%>&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>" >
- <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%>&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>" >
- <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>
+ <jsp:include page="bookmark.jsp" flush="true">
+ <jsp:param name="searchLine" value="<%=searchLine%>" />
+ <jsp:param name="fullTextLine" value="<%=fullText%>" />
+ </jsp:include>
<%
}
} else {
@@ -149,23 +114,9 @@
<li><a href="bow?action=generateToken&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">Regenerate permanent token</a></li>
</ul>
<div id="nuage">
- <% 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%>&searchLine=<%=searchLine%>" title="<%=value%> results" class="tag" style="font-size: <%=font%>px;"><%=tagName%></a>
- <%
- ++count;
- if (count >= nbTags) {
- break;
- }
- }
- }
- %>
+ <jsp:include page="tagsCloud.jsp" flush="true">
+ <jsp:param name="searchLine" value="<%=searchLine%>" />
+ </jsp:include>
</div>
<div id="recherche">
<h2>Research</h2>
@@ -189,7 +140,7 @@
<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" />
+ <input type="file" name="upfile" size="15%"/>
<br/>
<button type="submit">Import</button>
</div>
Modified: trunk/src/main/webapp/css/bookmark.css
===================================================================
--- trunk/src/main/webapp/css/bookmark.css 2010-06-08 15:12:08 UTC (rev 69)
+++ trunk/src/main/webapp/css/bookmark.css 2010-06-09 09:48:30 UTC (rev 70)
@@ -7,9 +7,9 @@
/*.clearfix {
height:1%;
-}*/
+}
-.clearfix:after {
+*/.clearfix:after {
content:".";
height:0;
line-height:0;
@@ -165,10 +165,10 @@
text-decoration:underline;
}
-#colonneD #add,
#colonneD #nuage,
#colonneD #recherche,
-#colonneD #import{
+#colonneD #import,
+#colonneD #add{
padding: 10px 20px;
border-bottom:2px solid #9edcf8;
}
@@ -211,7 +211,7 @@
height:100px;
}
-#colonneD #import{
+#colonneD #add{
border-bottom:none;
}
@@ -259,9 +259,7 @@
font-size:14px;
line-height:32px;
padding-left:40px;
- background:url(/bow/img/ptit-livre.jpg) no-repeat;
height:32px;
- display:block;
text-decoration:none;
}
Added: trunk/src/main/webapp/tagsCloud.jsp
===================================================================
--- trunk/src/main/webapp/tagsCloud.jsp (rev 0)
+++ trunk/src/main/webapp/tagsCloud.jsp 2010-06-09 09:48:30 UTC (rev 70)
@@ -0,0 +1,29 @@
+<%@page import="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;
+ }
+ }
+ }
+%>
\ No newline at end of file
1
0
Author: bbrossaud
Date: 2010-06-08 17:12:08 +0200 (Tue, 08 Jun 2010)
New Revision: 69
Url: http://chorem.org/repositories/revision/bow/69
Log:
deleted unused files
Removed:
trunk/src/main/webapp/home.jsp
trunk/src/main/webapp/openSearchResult.jsp
trunk/src/main/webapp/preference.jsp
trunk/src/main/webapp/search.jsp
trunk/src/main/webapp/search2.jsp
Modified:
trunk/src/main/webapp/bookmarkHome.jsp
trunk/src/main/webapp/bookmarkSearch.jsp
Modified: trunk/src/main/webapp/bookmarkHome.jsp
===================================================================
--- trunk/src/main/webapp/bookmarkHome.jsp 2010-06-08 15:07:02 UTC (rev 68)
+++ trunk/src/main/webapp/bookmarkHome.jsp 2010-06-08 15:12:08 UTC (rev 69)
@@ -214,16 +214,6 @@
<li><a 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);">Current permanent token</a></li>
<li><a href="bow?action=generateToken">Regenerate permanent token</a></li>
</ul>
- <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 id="nuage">
<% if (bookmarkActions != null) {
List<FacetTopic> tagCloud = bookmarkActions.getTagsCloud();
@@ -271,6 +261,16 @@
</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>
Modified: trunk/src/main/webapp/bookmarkSearch.jsp
===================================================================
--- trunk/src/main/webapp/bookmarkSearch.jsp 2010-06-08 15:07:02 UTC (rev 68)
+++ trunk/src/main/webapp/bookmarkSearch.jsp 2010-06-08 15:12:08 UTC (rev 69)
@@ -148,16 +148,6 @@
<li><a 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);">Current permanent token</a></li>
<li><a href="bow?action=generateToken&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">Regenerate permanent token</a></li>
</ul>
- <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 id="nuage">
<% if (bookmarkActions != null) {
List<FacetTopic> tagCloud = bookmarkActions.getTagsCloud();
@@ -206,6 +196,16 @@
</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>
Deleted: trunk/src/main/webapp/home.jsp
===================================================================
--- trunk/src/main/webapp/home.jsp 2010-06-08 15:07:02 UTC (rev 68)
+++ trunk/src/main/webapp/home.jsp 2010-06-08 15:12:08 UTC (rev 69)
@@ -1,284 +0,0 @@
-<%@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" %>
-
-<%
- TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
- BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions");
- if (tokenActions != null && bookmarkActions != null) {
- String temporaryToken = tokenActions.getTemporaryToken();
- String permanentToken = tokenActions.getPermanentToken();
- String url = (String) request.getAttribute("bowUrl");
-
- 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 formButton = (String) request.getAttribute("button");
- 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 (formButton == null) {
- formButton = "Add";
- }
- if (formAction == null) {
- formAction = "bow?action=addUrl";
- }
-%>
-<body>
- <div id="table">
- <h1 class="result">
- <a style="float: left;font-size: 12px; margin-left: 10px;" href="<%=url%>bow?action=home">home</a>
- Home
- </h1>
- <%
- SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
- List<Bookmark> bookmarkList = bookmarkActions.getBookmarks();
- if (!bookmarkList.isEmpty()) {
- %>
- <h2 class="result">The most used bookmarks</h2>
-
- <%
- for (Bookmark bookmark : bookmarkList) {
- String link = bookmark.getLink();
- link = link.replace("'", "\\'");
- %>
- <table class="result">
- <tr class="result">
- <th>
-
- <div style="float: left">
- <input type="image" src="img/img.png" title="bookmark" />
- <%=bookmark.getAlias()%>
- (<%=sdf.format(bookmark.getDate())%>)
- </div>
-
- <div style="float: right">
- <a style="border:none;text-decoration: none" href="bow?action=editBookmark&bookmarkId=<%=bookmark.getWikittyId()%>" onclick="return modify('<%=bookmark.getDescription()%>', '<%=bookmark.getAlias()%>', '<%=BookmarkActions.getBookmarkTagsString(bookmark)%>', '<%=link%>', 'bow?action=modifyBookmark&bookmarkId=<%=bookmark.getWikittyId()%>', '<%=bookmark.getWikittyId()%>');">
- <IMG style="border:none;" src="img/edit.png" title="Edit" ALT="Edit Bookmark" />
- </a>
- <a style="border:none;text-decoration: none" href="bow?action=removeBookmark&bookmarkId=<%=bookmark.getWikittyId()%>">
- <IMG style="border:none;" SRC="img/remove.png" ALT="Remove bookmark" TITLE="Remove" />
- </a>
- </div>
-
- </th>
- </tr>
-
- <tr>
- <td class="result">
- <div class="test">
- Clicks:
- <br />
- <%=bookmark.getClick()%>
- </div>
- <div style="float: left; margin: 5px;">
- <input type="image" src="img/img.png" title="bookmark" />
- </div>
-
- <div style="float: left;margin: 5px">
- <a title ="<%=bookmark.getLink()%>" href="bow?action=addClick&bookmarkId=<%=bookmark.getWikittyId()%>" target="_blank"><%=bookmark.getDescription()%></a>
- <br />
- tags :
- <%
- Set<String> tagList = bookmark.getTags();
- if (tagList != null && !tagList.isEmpty()) {
- int count = 0;
- for (String tag : tagList) {
- if (formBookmarkId != null && formBookmarkId.equals(bookmark.getWikittyId())) {
- %>
- <a id="<%=bookmark.getWikittyId() + count%>" style="text-decoration: none;" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%>" >
- <IMG style="border:none;" SRC="img/delete.png" ALT="Delete tag" TITLE="Delete" />
- </a>
- <%} else {%>
- <a id="<%=bookmark.getWikittyId() + count%>" style="display:none; text-decoration: none;" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%>" >
- <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>
- <%
- ++count;
- }
- %>
- </div>
- </td>
- <%
- }
- %>
- </tr>
- <br />
- </table>
-
- <%
- }
- } else {
- %>
- <h2 class="result">No Bookmarks</h2>
- <% }
- %>
- <%
- List<Bookmark> lastBookmarks = bookmarkActions.getLastBookmarks();
- if (!lastBookmarks.isEmpty()) {
- %>
- <h2 class="result">The last addition bookmarks</h2>
- <%
- for (Bookmark bookmark : lastBookmarks) {
- String link = bookmark.getLink();
- link = link.replace("'", "\\'");
- %>
- <table class="result">
- <tr class="result">
- <th>
-
- <div style="float: left">
- <input type="image" src="img/img.png" title="bookmark" />
- <%=bookmark.getAlias()%>
- (<%=sdf.format(bookmark.getDate())%>)
- </div>
-
- <div style="float: right">
- <a style="border:none;text-decoration: none" href="bow?action=editBookmark&bookmarkId=<%=bookmark.getWikittyId()%>" onclick="return modifyLast('<%=bookmark.getDescription()%>', '<%=bookmark.getAlias()%>', '<%=BookmarkActions.getBookmarkTagsString(bookmark)%>', '<%=link%>', 'bow?action=modifyBookmark&bookmarkId=<%=bookmark.getWikittyId()%>', '<%=bookmark.getWikittyId()%>');">
- <IMG style="border:none;" src="img/edit.png" title="Edit" ALT="Edit Bookmark" />
- </a>
- <a style="border:none;text-decoration: none" href="bow?action=removeBookmark&bookmarkId=<%=bookmark.getWikittyId()%>">
- <IMG style="border:none;" SRC="img/remove.png" ALT="Remove bookmark" TITLE="Remove" />
- </a>
- </div>
-
- </th>
- </tr>
-
- <tr>
- <td class="result">
- <div class="test">
- Clicks:
- <br />
- <%=bookmark.getClick()%>
- </div>
- <div style="float: left; margin: 5px;">
- <input type="image" src="img/img.png" title="bookmark" />
- </div>
-
- <div style="float: left;margin: 5px">
- <a title ="<%=bookmark.getLink()%>" href="bow?action=addClick&bookmarkId=<%=bookmark.getWikittyId()%>" target="_blank"><%=bookmark.getDescription()%></a>
- <br />
- tags :
- <%
- Set<String> tagList = bookmark.getTags();
- if (tagList != null && !tagList.isEmpty()) {
- int count = 0;
- for (String tag : tagList) {
- if (formBookmarkId != null && formBookmarkId.equals(bookmark.getWikittyId())) {
- %>
- <a id="<%=count + bookmark.getWikittyId()%>" style="text-decoration: none;" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%>" >
- <IMG style="border:none;" SRC="img/delete.png" ALT="Delete tag" TITLE="Delete" />
- </a>
- <%} else {%>
- <a id="<%=count + bookmark.getWikittyId()%>" style="display:none; text-decoration: none;" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%>" >
- <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>
- <%
- ++count;
- }
- %>
- </div>
- </td>
- <%
- }
- %>
- </tr>
- <br />
- </table>
-
- <%
- }
- } else {
- %>
- <h2 class="result">No Bookmarks</h2>
- <% }
- %>
-
- </div>
- <div id="menu">
- <div class="menu">
- <ul id="meta">
- <li><a href="bow?action=logout">Logout</a></li>
- <li><a 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);">Temporary token</a></li>
- <li><a 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);">Current permanent token</a></li>
- <li><a href="bow?action=generateToken">Regenerate permanent token</a></li>
- </ul>
- </div>
- <div class="menu">
- <form id="bookmarkForm" method="POST" action="<%=formAction%>">
- URL<br />
- <input type="text" name="url" size="20" value="<%=formLink%>" /><br />
- Name<br />
- <input type="text" name="name" size="20" value="<%=formName%>" /><br />
- Tags<br />
- <input type="text" name="tags" size="20" value="<%=formTags%>" /><br />
- Alias<br /><input type="text" name="alias" size="20" value="<%=formAlias%>" /><br />
- <input type="submit" name="submit" value="<%=formButton%>" />
- </form>
- </div>
-
- <div class="menu">
- <div class="tagCloud">
- <% if (bookmarkActions
- != null) {
- List<FacetTopic> tagCloud = bookmarkActions.getTagsCloud();
- for (FacetTopic tag : tagCloud) {
- int value = tag.getCount();
- String tagName = tag.getTopicName();
- int font = bookmarkActions.getFont(value);
- %>
- <a href="bow?action=search&addTag=<%=tagName%>" title="<%=value%> results" class="tag" style="font-size: <%=font%>px;"><%=tagName%></a>
- <%
- }
- }
- %>
- <form method="POST" action="bow?action=search" style="text-align: center;margin-left: 20px;">
- <input style="float: left" type="text" name="searchLine" size="15" />
- <input style="float: left;" type="submit" value="Find" />
- </form>
- </div>
- </div>
- <div class="menu">
- <form method="POST" action="bow?action=fullText" style="text-align: center;">
- Full text research
- <input style="float: left" type="text" name="fullTextLine" size="15" value="<%=bookmarkActions.getFullTextLine()%>"/>
- <input style="float: left;" type="submit" value="Find" />
- </form>
- </div>
- <div class="menu">
- <form method="POST" action="bow?action=importBookmarks" enctype="multipart/form-data">
- Import Bookmarks
- <input type="file" name="upfile" />
- <input type="submit" value="Import"/>
- </form>
- <br />
- <a href="bow?action=exportBookmarks">Export bookmarks</a>
- </div>
- </div>
-</body>
-<%}%>
\ No newline at end of file
Deleted: trunk/src/main/webapp/openSearchResult.jsp
===================================================================
--- trunk/src/main/webapp/openSearchResult.jsp 2010-06-08 15:07:02 UTC (rev 68)
+++ trunk/src/main/webapp/openSearchResult.jsp 2010-06-08 15:12:08 UTC (rev 69)
@@ -1,99 +0,0 @@
-<%@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" %>
-
-<%
- BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions");
- if (bookmarkActions != null) {
- String searchLine = "";
- if (bookmarkActions != null) {
- searchLine = bookmarkActions.getSearchLine();
- }
- String version = (String) request.getAttribute("version");
- String url = (String) request.getAttribute("bowUrl");
-%>
-
-<html>
- <jsp:include page="header.jsp" flush="true">
- <jsp:param name="bowUrl" value="<%=url%>"/>
- </jsp:include>
- <body>
- <div id="mainbodyback" class="clearfix">
- <div id="mainbody">
-
- <div id="content">
- <div class="menu clearfix"><p>Result</p>
- <form method="POST" action="bow?action=orderOS&searchLine=<%=searchLine%>">
- <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) {
- String link = bookmark.getLink();
- link = link.replace("'", "\\'");
- %>
- <body>
- <div class="bookmark">
- <div class="bookmarkhead clearfix">
- <a href="<%=url + bookmark.getAlias()%>" title="<%=url + bookmark.getAlias()%>" target="_blank">
- <%=bookmark.getAlias()%>
- </a>
- <span> (<%=sdf.format(bookmark.getDate())%>)</span>
- </div>
- <div class="bookmarkcontenu clearfix">
- <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></p>
- <p class="tags"><strong>Tags :</strong>
- <%
- Set<String> tagList = bookmark.getTags();
- if (tagList != null && !tagList.isEmpty()) {
- for (String tag : tagList) {
- %>
- <%=tag%>
- <%
- }
- }
- %>
- </p>
- </div>
- <div class="click"><%=bookmark.getClick()%></div>
- </div>
- </div>
- <%
- }
- } else {
- %>
- <h2>No Bookmarks</h2>
- <%}%>
- </div>
- </div>
- </div>
- </div>
- <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
Deleted: trunk/src/main/webapp/preference.jsp
===================================================================
--- trunk/src/main/webapp/preference.jsp 2010-06-08 15:07:02 UTC (rev 68)
+++ trunk/src/main/webapp/preference.jsp 2010-06-08 15:12:08 UTC (rev 69)
@@ -1,34 +0,0 @@
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<%@page import="org.chorem.bow.Preference" %>
-<%
- String error = (String) request.getAttribute("msgError");
- String url = (String) request.getAttribute("bowUrl");
- String version = (String) request.getAttribute("version");
- Preference preference = (Preference) request.getAttribute("preference");
- User user = session.getAttribute("user");
-%>
-
-<html>
- <jsp:include page="header.jsp" flush="true">
- <jsp:param name="bowUrl" value="<%=url%>"/>
- </jsp:include>
- <body>
- <h1 class="login">Login</h1>
- <form method="POST" action="bow?action=login">
- email <input type="text" name="email" size="20">
- <br />
- password <input type=password name="password" size="20">
- <br />
- <input type="submit" value="login">
- </form>
- <a href="bow?action=registration">register</a>
- <br />
- <%if (error != null) {%>
- <font color="red"><%=error%></font>
- <%}%>
- <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
Deleted: trunk/src/main/webapp/search.jsp
===================================================================
--- trunk/src/main/webapp/search.jsp 2010-06-08 15:07:02 UTC (rev 68)
+++ trunk/src/main/webapp/search.jsp 2010-06-08 15:12:08 UTC (rev 69)
@@ -1,193 +0,0 @@
-<%@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" %>
-
-<%
- TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
- BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions");
- 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");
-%>
-
-<body>
- <div id="table">
- <h1 class="result">
- <a style="float: left;font-size: 12px; margin-left: 10px;" href="<%=url%>bow?action=home">home</a>
- My Bookmarks
- </h1>
- <%
- if (bookmarkActions != null) {
- List<Bookmark> bookmarkList = bookmarkActions.getBookmarks();
- if (!bookmarkList.isEmpty()) {
- %>
- <table class="result">
- <tr class="result">
- <th class="result remove">Remove</th>
- <th class="result date">
- Date
- <a style="text-decoration:none" href="bow?action=orderAsc&type=date&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>" >
- <IMG style="border:none" SRC="img/asc.png" ALT="order ASC" TITLE="Asc" />
- </a>
- <a style="text-decoration:none" href="bow?action=orderDesc&type=date&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">
- <IMG style="border:none" SRC="img/desc.png" ALT="order DESC" TITLE="Desc" />
- </a>
- </th>
- <th class="result name">
- Name
- <a style="text-decoration:none" href="bow?action=orderAsc&type=name&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">
- <IMG style="border:none" SRC="img/asc.png" ALT="order ASC" TITLE="Asc" />
- </a>
- <a style="text-decoration:none" href="bow?action=orderDesc&type=name&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">
- <IMG style="border:none" SRC="img/desc.png" ALT="order DESC" TITLE="Desc" />
- </a>
- </th>
- <th class ="result tags">Tags</th>
- <th class=" result click">
- Click
- <a style="text-decoration:none" href="bow?action=orderAsc&type=click&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">
- <IMG style="border:none" SRC="img/asc.png" ALT="order ASC" TITLE="Asc" />
- </a>
- <a style="text-decoration:none" href="bow?action=orderDesc&type=click&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">
- <IMG style="border:none" SRC="img/desc.png" ALT="order DESC" TITLE="Desc" />
- </a>
- </th>
- </tr>
- <%
- SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
- for (Bookmark bookmark : bookmarkList) {
- %>
- <tr class="result">
- <td class="result">
- <a style="border:none;" href="bow?action=removeBookmark&bookmarkId=<%=bookmark.getWikittyId()%>&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">
- <IMG style="border:none;" SRC="img/remove.png" ALT="Remove bookmark" TITLE="Remove" />
- </a>
- </td>
- <td class="result">
- <%=sdf.format(bookmark.getDate())%>
- </td>
- <%
- String alias = bookmark.getAlias();
- if (alias != null && !alias.isEmpty()) {
- alias = url + "alias/" + alias;
- }
- %>
- <td class="result">
- <a title ="<%=alias%>" href="bow?action=addClick&bookmarkId=<%=bookmark.getWikittyId()%>" target="_blank"><%=bookmark.getDescription()%></a>
- <form method="POST" action="bow?action=addAlias&bookmarkId=<%=bookmark.getWikittyId()%>&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>" style="display: inline">
- <input type="text" name="alias" size="10" value="<%=bookmark.getAlias()%>" />
- <input style="display: inline;" type="submit" value="Add alias" />
- </form>
- <form method="POST" action="bow?action=editBookmark&bookmarkId=<%=bookmark.getWikittyId()%>&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">
- <input type="text" name="name" size="35" value="<%=bookmark.getDescription()%>" />
- <input type="image" src="img/edit.png" title="Edit"/>
- </form>
- </td>
- <td class="result" style="text-align: left">
- <%
- Set<String> tagList = bookmark.getTags();
- if (tagList != null && !tagList.isEmpty()) {
- for (String tag : tagList) {
- %>
- <div style="display: inline">
- <a style="text-decoration:none" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%>&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">
- <IMG style="border:none" SRC="img/delete.png" ALT="Delete tag" TITLE="Delete" />
- </a>
- <a href="bow?action=search&addTag=<%=tag%>&searchLine=<%=searchLine%>" style="text-decoration: none"><%=tag%></a>
- </div>
- <%
- }
- }
- %>
- <form method="POST" action="bow?action=editBookmark&bookmarkId=<%=bookmark.getWikittyId()%>&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">
- <input type="text" name="tags" size="35" value="<%=BookmarkActions.getBookmarkTagsString(bookmark)%>" />
- <input type="image" src="img/edit.png" title="Edit"/>
- </form>
- </td>
- <td class="result">
- <%=bookmark.getClick()%>
- </td>
- </tr>
- <%
- }
- %>
- </table>
- <%
- } else {
- %>
- <h2 class="result">No Bookmarks</h2>
- <% }
- }
- %>
- </div>
- <div id="menu">
- <div class="menu">
- <ul id="meta">
- <li><a href="bow?action=logout">Logout</a></li>
- <li><a href="bow?action=home">Home</a></li>
- <li><a 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);">Temporary token</a></li>
- <li><a 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);">Current permanent token</a></li>
- <li><a href="bow?action=generateToken&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">Regenerate permanent token</a></li>
- </ul>
- </div>
- <div class="menu">
- <form method="POST" action="bow?action=addUrl&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">
- URL<br />
- <input type="text" name="url" size="20" value="URL" /><br />
- Name<br />
- <input type="text" name="name" size="20" value="name" /><br />
- Tags<br />
- <input type="text" name="tags" size="20" value="tag1 tag2..." /><br />
- <input name="submit" type="submit" value="add" />
- </form>
- </div>
-
- <div class="menu">
- <div class="tagCloud">
- <% if (bookmarkActions != null) {
- List<FacetTopic> tagCloud = bookmarkActions.getTagsCloud();
- for (FacetTopic tag : tagCloud) {
- int value = tag.getCount();
- String tagName = tag.getTopicName();
- int font = bookmarkActions.getFont(value);
- %>
- <a href="bow?action=search&addTag=<%=tagName%>&searchLine=<%=searchLine%>" title="<%=value%> results" class="tag" style="font-size: <%=font%>px;"><%=tagName%></a>
- <%
- }
- }
- %>
- <form method="POST" action="bow?action=search" style="text-align: center;margin-left: 20px;">
- <input style="float: left" type="text" name="searchLine" size="15" value="<%=searchLine%>" />
- <input style="float: left" type="submit" value="Find" />
- </form>
- </div>
- <div class="menu">
- <form method="POST" action="bow?action=fullText" style="text-align: center;">
- Full text research
- <input style="float: left" type="text" name="fullTextLine" size="15" value="<%=bookmarkActions.getFullTextLine()%>" />
- <input style="float: left;" type="submit" value="Find" />
- </form>
- </div>
- <div class="menu">
- <form method="post" action="bow?action=importBookmarks&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>" enctype="multipart/form-data">
- Import Bookmarks
- <input type="file" name="upfile" />
- <input type="submit" value="Import"/>
- </form>
- <br />
- <a href="bow?action=exportBookmarks&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">Export bookmarks</a>
- </div>
- </div>
- </div>
-</body>
-<%}%>
\ No newline at end of file
Deleted: trunk/src/main/webapp/search2.jsp
===================================================================
--- trunk/src/main/webapp/search2.jsp 2010-06-08 15:07:02 UTC (rev 68)
+++ trunk/src/main/webapp/search2.jsp 2010-06-08 15:12:08 UTC (rev 69)
@@ -1,224 +0,0 @@
-<%@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" %>
-
-<%
- TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
- BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions");
- 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");
-
- 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 formButton = (String) request.getAttribute("button");
- 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 (formButton == null) {
- formButton = "Add";
- }
- if (formAction == null) {
- formAction = "bow?action=addUrl";
- }
-%>
-
-<body>
- <div id="table">
- <h1 class="result">
- <a style="float: left;font-size: 12px; margin-left: 10px;" href="<%=url%>bow?action=home">home</a>
- My Bookmarks
- </h1>
- <div style="text-align: center">
- Date
- <a style="text-decoration:none" href="bow?action=orderAsc&type=date&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>" >
- <IMG style="border:none" SRC="img/asc.png" ALT="order ASC" TITLE="Asc" />
- </a>
- <a style="text-decoration:none" href="bow?action=orderDesc&type=date&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">
- <IMG style="border:none" SRC="img/desc.png" ALT="order DESC" TITLE="Desc" />
- </a>
- Name
- <a style="text-decoration:none" href="bow?action=orderAsc&type=name&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">
- <IMG style="border:none" SRC="img/asc.png" ALT="order ASC" TITLE="Asc" />
- </a>
- <a style="text-decoration:none" href="bow?action=orderDesc&type=name&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">
- <IMG style="border:none" SRC="img/desc.png" ALT="order DESC" TITLE="Desc" />
- </a>
- Click
- <a style="text-decoration:none" href="bow?action=orderAsc&type=click&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">
- <IMG style="border:none" SRC="img/asc.png" ALT="order ASC" TITLE="Asc" />
- </a>
- <a style="text-decoration:none" href="bow?action=orderDesc&type=click&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">
- <IMG style="border:none" SRC="img/desc.png" ALT="order DESC" TITLE="Desc" />
- </a>
- </div>
- <br />
- <%
- List<Bookmark> bookmarkList = bookmarkActions.getBookmarks();
- if (!bookmarkList.isEmpty()) {
- SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
- for (Bookmark bookmark : bookmarkList) {
- String link = bookmark.getLink();
- link = link.replace("'", "\\'");
- %>
- <table class="result">
- <tr class="result">
- <th>
-
- <div style="float: left">
- <input type="image" src="img/img.png" title="bookmark" />
- <%=bookmark.getAlias()%>
- (<%=sdf.format(bookmark.getDate())%>)
- </div>
-
- <div style="float: right">
- <a style="border:none;text-decoration: none" href="bow?action=editBookmark&bookmarkId=<%=bookmark.getWikittyId()%>&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>" onclick="return modify('<%=bookmark.getDescription()%>', '<%=bookmark.getAlias()%>', '<%=BookmarkActions.getBookmarkTagsString(bookmark)%>', '<%=link%>', 'bow?action=modifyBookmark&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>&bookmarkId=<%=bookmark.getWikittyId()%>', '<%=bookmark.getWikittyId()%>');">
- <IMG style="border:none;" src="img/edit.png" title="Edit" ALT="Edit Bookmark" />
- </a>
- <a style="border:none;text-decoration: none" href="bow?action=removeBookmark&bookmarkId=<%=bookmark.getWikittyId()%>&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">
- <IMG style="border:none;" SRC="img/remove.png" ALT="Remove bookmark" TITLE="Remove" />
- </a>
- </div>
-
- </th>
- </tr>
-
- <tr>
- <td class="result">
- <div class="test">
- Clicks:
- <br />
- <%=bookmark.getClick()%>
- </div>
- <div style="float: left; margin: 5px;">
- <input type="image" src="img/img.png" title="bookmark" />
- </div>
-
- <div style="float: left;margin: 5px">
- <a title ="<%=bookmark.getLink()%>" href="bow?action=addClick&bookmarkId=<%=bookmark.getWikittyId()%>" target="_blank"><%=bookmark.getDescription()%></a>
- <br />
- tags :
- <%
- Set<String> tagList = bookmark.getTags();
- if (tagList != null && !tagList.isEmpty()) {
- int count = 0;
- for (String tag : tagList) {
- if (formBookmarkId != null && formBookmarkId.equals(bookmark.getWikittyId())) {
- %>
- <a id="<%=bookmark.getWikittyId() + count%>" style="text-decoration: none;" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%>&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>" >
- <IMG style="border:none;" SRC="img/delete.png" ALT="Delete tag" TITLE="Delete" />
- </a>
- <%} else {%>
- <a id="<%=bookmark.getWikittyId() + count%>" style="display:none; text-decoration: none;" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%>&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>" >
- <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>
- <%
- ++count;
- }
- %>
- </div>
- </td>
- <%
- }
- %>
- </tr>
- </table>
- <br />
- <%
- }
- } else {
- %>
- <h2 class="result">No Bookmarks</h2>
- <% }
- %>
- </div>
-
- <div id="menu">
- <div class="menu">
- <ul id="meta">
- <li><a href="bow?action=logout">Logout</a></li>
- <li><a href="bow?action=home">Home</a></li>
- <li><a 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);">Temporary token</a></li>
- <li><a 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);">Current permanent token</a></li>
- <li><a href="bow?action=generateToken&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">Regenerate permanent token</a></li>
- </ul>
- </div>
- <div class="menu">
- <form id="bookmarkForm" method="POST" action="<%=formAction%>&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">
- URL<br />
- <input type="text" name="url" size="20" value="<%=formLink%>" /><br />
- Name<br />
- <input type="text" name="name" size="20" value="<%=formName%>" /><br />
- Tags<br />
- <input type="text" name="tags" size="20" value="<%=formTags%>" /><br />
- Alias<br />
- <input type="text" name="alias" size="20" value="<%=formAlias%>" /><br />
- <input type="submit" name="submit" value="<%=formButton%>" />
- </form>
- </div>
-
- <div class="menu">
- <div class="tagCloud">
- <% if (bookmarkActions != null) {
- List<FacetTopic> tagCloud = bookmarkActions.getTagsCloud();
- for (FacetTopic tag : tagCloud) {
- int value = tag.getCount();
- String tagName = tag.getTopicName();
- int font = bookmarkActions.getFont(value);
- %>
- <a href="bow?action=search&addTag=<%=tagName%>&searchLine=<%=searchLine%>" title="<%=value%> results" class="tag" style="font-size: <%=font%>px;"><%=tagName%></a>
- <%
- }
- }
- %>
- <form method="POST" action="bow?action=search" style="text-align: center;margin-left: 20px;">
- <input style="float: left" type="text" name="searchLine" size="15" value="<%=searchLine%>" />
- <input style="float: left" type="submit" value="Find" />
- </form>
- </div>
- <div class="menu">
- <form method="POST" action="bow?action=fullText" style="text-align: center;">
- Full text research
- <input style="float: left" type="text" name="fullTextLine" size="15" value="<%=bookmarkActions.getFullTextLine()%>" />
- <input style="float: left;" type="submit" value="Find" />
- </form>
- </div>
- <div class="menu">
- <form method="post" action="bow?action=importBookmarks&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>" enctype="multipart/form-data">
- Import Bookmarks
- <input type="file" name="upfile" />
- <input type="submit" value="Import"/>
- </form>
- <br />
- <a href="bow?action=exportBookmarks&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">Export bookmarks</a>
- </div>
- </div>
- </div>
-</body>
-<%}%>
\ No newline at end of file
1
0
r68 - in trunk: . src/main/java/org/chorem/bow src/main/webapp src/main/webapp/css src/main/webapp/img src/main/xmi
by bbrossaud@users.chorem.org 08 Jun '10
by bbrossaud@users.chorem.org 08 Jun '10
08 Jun '10
Author: bbrossaud
Date: 2010-06-08 17:07:02 +0200 (Tue, 08 Jun 2010)
New Revision: 68
Url: http://chorem.org/repositories/revision/bow/68
Log:
integrated the new design, addition preference and remove buggs
Added:
trunk/src/main/webapp/bookmarkHome.jsp
trunk/src/main/webapp/bookmarkSearch.jsp
trunk/src/main/webapp/css/bookmark.css
trunk/src/main/webapp/css/connexion.css
trunk/src/main/webapp/img/aide.jpg
trunk/src/main/webapp/img/click.jpg
trunk/src/main/webapp/img/croix.jpg
trunk/src/main/webapp/img/edit.jpg
trunk/src/main/webapp/img/fdboutonV.jpg
trunk/src/main/webapp/img/fondbouton.jpg
trunk/src/main/webapp/img/fondconnexion.jpg
trunk/src/main/webapp/img/fondhead.jpg
trunk/src/main/webapp/img/livreG.jpg
trunk/src/main/webapp/img/logobow.jpg
trunk/src/main/webapp/img/moyen-livre.jpg
trunk/src/main/webapp/img/piedmenu.jpg
trunk/src/main/webapp/img/pointemenu.jpg
trunk/src/main/webapp/img/ptit-livre.jpg
trunk/src/main/webapp/img/tag.jpg
trunk/src/main/webapp/preference.jsp
trunk/src/main/webapp/preferences.jsp
Removed:
trunk/src/main/webapp/css/styles.css
Modified:
trunk/TODO.txt
trunk/src/main/java/org/chorem/bow/BowProxy.java
trunk/src/main/java/org/chorem/bow/ControllerServlet.java
trunk/src/main/webapp/footer.jsp
trunk/src/main/webapp/header.jsp
trunk/src/main/webapp/login.jsp
trunk/src/main/webapp/main.jsp
trunk/src/main/webapp/openSearchResult.jsp
trunk/src/main/webapp/register.jsp
trunk/src/main/xmi/bow.zargo
Modified: trunk/TODO.txt
===================================================================
--- trunk/TODO.txt 2010-06-04 13:37:29 UTC (rev 67)
+++ trunk/TODO.txt 2010-06-08 15:07:02 UTC (rev 68)
@@ -29,3 +29,7 @@
===> openSearch ==> proposer des url
===> facetisations
+
+===> getElementsByName();
+
+===> formulaire
Modified: trunk/src/main/java/org/chorem/bow/BowProxy.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/BowProxy.java 2010-06-04 13:37:29 UTC (rev 67)
+++ trunk/src/main/java/org/chorem/bow/BowProxy.java 2010-06-08 15:07:02 UTC (rev 68)
@@ -52,8 +52,6 @@
protected BowProxy(BowConfig config) {
WikittyService ws = new WikittyServiceJDBC(config.getFlatOptions());
- // fix me 04/06/2009
- ws = new WikittyServiceNotifier(ws);
ws = new WikittyServiceCached(ws);
setWikittyService(ws);
}
Modified: trunk/src/main/java/org/chorem/bow/ControllerServlet.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-06-04 13:37:29 UTC (rev 67)
+++ trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-06-08 15:07:02 UTC (rev 68)
@@ -164,29 +164,12 @@
log.debug("Going to actionEditBookmark");
}
this.actionEditBookmark(request, response, user);
- } else if (action.equals("orderAsc") && user != null) {
+ } else if (action.equals("order") && user != null) {
if (log.isDebugEnabled()) {
- log.debug("Going to actionOrderAsc");
+ log.debug("Going to actionOrder");
}
- this.actionOrderAsc(request, response, user);
+ this.actionOrder(request, response, user);
request.getRequestDispatcher("main.jsp").forward(request, response);
- } else if (action.equals("orderAscOS") && user != null) {
- if (log.isDebugEnabled()) {
- log.debug("Going to actionOrderAsc");
- }
- this.actionOrderAsc(request, response, user);
- request.getRequestDispatcher("openSearchResult.jsp").forward(request, response);
- } else if (action.equals("orderDesc") && user != null) {
- if (log.isDebugEnabled()) {
- log.debug("Going to actionOrderDesc");
- }
- this.actionOrderDesc(request, response, user);
- request.getRequestDispatcher("main.jsp").forward(request, response);
- } else if (action.equals("orderDescOS") && user != null) {
- if (log.isDebugEnabled()) {
- log.debug("Going to actionOrderDesc");
- }
- this.actionOrderDesc(request, response, user);
} else if (action.equals("addClick") && user != null) {
if (log.isDebugEnabled()) {
log.debug("Going to actionAddClic");
@@ -212,13 +195,24 @@
if (log.isDebugEnabled()) {
log.debug("Going to actionOpenSearchResult");
}
- this.actionOpenSearchResult(request, response, user, token);
+ this.actionOpenSearchResult(request, response, session, user, token);
} else if (action.equals("fullText") && user != null) {
if (log.isDebugEnabled()) {
log.debug("Going to actionFullText");
}
this.actionFullText(request, user);
request.getRequestDispatcher("main.jsp").forward(request, response);
+ } else if (action.equals("preferences") && user != null) {
+ if (log.isDebugEnabled()) {
+ log.debug("Going to actionPreferences");
+ }
+ request.getRequestDispatcher("preferences.jsp").forward(request, response);
+ } else if (action.equals("changePreferences") && user != null) {
+ if (log.isDebugEnabled()) {
+ log.debug("Going to actionChangePreferences");
+ }
+ this.actionChangePreferences(request, session, user);
+ request.getRequestDispatcher("preferences.jsp").forward(request, response);
} else {
if (user != null) {
request.getRequestDispatcher("error.jsp").forward(request, response);
@@ -243,12 +237,14 @@
* @throws ServletException if a servlet error occurs
* @description set the openSearch result
*/
- protected void actionOpenSearchResult(HttpServletRequest request, HttpServletResponse response, User user, String token)
- throws IOException, ServletException {
+ protected void actionOpenSearchResult(HttpServletRequest request, HttpServletResponse response, HttpSession session, User user, String token)
+ throws IOException, ServletException, NoSuchAlgorithmException {
String searchLine = request.getParameter("searchLine");
if (searchLine != null && searchLine.matches("^http://[^ ]*") && !searchLine.contains(" ")) {
response.sendRedirect(searchLine);
} else {
+ session.setAttribute("user", user);
+ initializeToken(session, user);
WikittyProxy proxy = BowProxy.getInstance();
Criteria criteria = getBookmarkListCriteriaByUser(user, searchLine);
criteria = criteria.addSortDescending(Bookmark.FQ_FIELD_CLICK);
@@ -256,7 +252,7 @@
BookmarkActions bookmarkActions = createBookmarkActions(request, result, searchLine);
request.setAttribute("bookmarkActions", bookmarkActions);
request.setAttribute("token", token);
- request.getRequestDispatcher("openSearchResult.jsp").forward(request, response);
+ request.getRequestDispatcher("main.jsp").forward(request, response);
}
}
@@ -340,7 +336,7 @@
* @throws ServletException if a servlet error occurs
* @description order the bookmarks by type
*/
- protected void actionOrderAsc(HttpServletRequest request, HttpServletResponse response, User user)
+ protected void actionOrder(HttpServletRequest request, HttpServletResponse response, User user)
throws IOException, ServletException {
String type = request.getParameter("type");
String searchLine = request.getParameter("searchLine");
@@ -348,42 +344,22 @@
if (type != null && baseCriteria != null && !type.isEmpty()) {
WikittyProxy proxy = BowProxy.getInstance();
PagedResult result = null;
- if (type.equals("name")) {
+ if (type.equals("ascName")) {
Criteria criteria = baseCriteria.addSortAscending(Bookmark.FQ_FIELD_DESCRIPTION);
result = proxy.findAllByCriteria(Bookmark.class, criteria);
- } else if (type.equals("date")) {
+ } else if (type.equals("ascDate")) {
Criteria criteria = baseCriteria.addSortAscending(Bookmark.FQ_FIELD_DATE);
result = proxy.findAllByCriteria(Bookmark.class, criteria);
- } else if (type.equals("click")) {
+ } else if (type.equals("ascClick")) {
Criteria criteria = baseCriteria.addSortAscending(Bookmark.FQ_FIELD_CLICK);
result = proxy.findAllByCriteria(Bookmark.class, criteria);
- }
- BookmarkActions bookmarkActions = createBookmarkActions(request, result, searchLine);
- request.setAttribute("bookmarkActions", bookmarkActions);
- }
- }
-
- /* @param request servlet request
- * @param response servlet response
- * @param user the user
- * @throws ServletException if a servlet error occurs
- * @description order the bookmarks by type
- */
- protected void actionOrderDesc(HttpServletRequest request, HttpServletResponse response, User user)
- throws IOException, ServletException {
- String searchLine = request.getParameter("searchLine");
- String type = request.getParameter("type");
- Criteria baseCriteria = getBookmarkListCriteriaByUser(user, searchLine);
- if (type != null && baseCriteria != null && !type.isEmpty()) {
- WikittyProxy proxy = BowProxy.getInstance();
- PagedResult result = null;
- if (type.equals("name")) {
+ } else if (type.equals("descName")) {
Criteria criteria = baseCriteria.addSortDescending(Bookmark.FQ_FIELD_DESCRIPTION);
result = proxy.findAllByCriteria(Bookmark.class, criteria);
- } else if (type.equals("date")) {
+ } else if (type.equals("descDate")) {
Criteria criteria = baseCriteria.addSortDescending(Bookmark.FQ_FIELD_DATE);
result = proxy.findAllByCriteria(Bookmark.class, criteria);
- } else if (type.equals("click")) {
+ } else if (type.equals("descClick")) {
Criteria criteria = baseCriteria.addSortDescending(Bookmark.FQ_FIELD_CLICK);
result = proxy.findAllByCriteria(Bookmark.class, criteria);
}
@@ -409,7 +385,6 @@
request.setAttribute("name", bookmark.getDescription());
request.setAttribute("alias", bookmark.getAlias());
request.setAttribute("tags", BookmarkActions.getBookmarkTagsString(bookmark));
- request.setAttribute("button", "Modify");
request.setAttribute("action", "bow?action=modifyBookmark");
request.setAttribute("bookmarkId", bookmarkId);
}
@@ -511,6 +486,10 @@
WikittyProxy proxy = BowProxy.getInstance();
Bookmark bookmark = proxy.restore(Bookmark.class, id);
if (bookmark != null) {
+ 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);
}
@@ -533,16 +512,20 @@
String link = request.getParameter("url"); // url of the website
String name = request.getParameter("name"); // website name
String alias = request.getParameter("alias");
+ WikittyProxy proxy = BowProxy.getInstance();
Bookmark bookmark = null;
if (name != null) {
String tags = request.getParameter("tags"); // tags
+ Criteria criteria = Search.query().eq(Bookmark.FQ_FIELD_ALIAS, alias).criteria();
+ if (proxy.findByCriteria(Bookmark.class, criteria) != null) {
+ alias = "";
+ }
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 (bookmark != null) {
- WikittyProxy proxy = BowProxy.getInstance();
proxy.store(bookmark); // store the bookmark if all is Ok
if (log.isDebugEnabled()) {
log.debug("Adding URL");
@@ -678,6 +661,8 @@
request.getRequestDispatcher("error.jsp").forward(request, response);
} else {
session.setAttribute("user", login);
+ Preference preference = proxy.restore(Preference.class, login.getWikittyId());
+ session.setAttribute("preference", preference);
initializeToken(session, login);
actionHome(request, login);
request.getRequestDispatcher("main.jsp").forward(request, response);
@@ -698,7 +683,10 @@
password = StringUtil.encodeMD5(password);
User login = this.checkLogin(email, password); // check if the user exists
if (login != null) {
+ WikittyProxy proxy = BowProxy.getInstance();
session.setAttribute("user", login);
+ Preference preference = proxy.restore(Preference.class, login.getWikittyId());
+ session.setAttribute("preference", preference);
initializeToken(session, login);
actionHome(request, login);
request.getRequestDispatcher("main.jsp").forward(request, response);
@@ -971,4 +959,33 @@
}
return criteria;
}
+
+ private void actionChangePreferences(HttpServletRequest request, HttpSession session, User user)
+ throws NoSuchAlgorithmException {
+ String email = request.getParameter("email");
+ String password = request.getParameter("password");
+ if (email != null && !email.isEmpty()) {
+ user.setEmail(email);
+ }
+ if (password != null && !password.isEmpty()) {
+ password = StringUtil.encodeMD5(password);
+ user.setPassword(password);
+ }
+
+ WikittyProxy proxy = BowProxy.getInstance();
+ Preference preference = (Preference) session.getAttribute("preference");
+ String colors = request.getParameter("colors");
+ preference.setColors(colors);
+ String tags = request.getParameter("tags");
+ preference.setTags(Integer.valueOf(tags));
+ String bookmarks = request.getParameter("bookmarks");
+ preference.setBookmarks(Integer.valueOf(bookmarks));
+ String searchEngineSuggestions = request.getParameter("searchEngineUrlSuggestions");
+ preference.setSearchEngineUrlSuggestions(searchEngineSuggestions);
+ String searchEngineResults = request.getParameter("searchEngineUrlResults");
+ preference.setSearchEngineUrlResults(searchEngineResults);
+
+ proxy.store(preference);
+ request.setAttribute("preference", preference);
+ }
}
Added: trunk/src/main/webapp/bookmarkHome.jsp
===================================================================
--- trunk/src/main/webapp/bookmarkHome.jsp (rev 0)
+++ trunk/src/main/webapp/bookmarkHome.jsp 2010-06-08 15:07:02 UTC (rev 68)
@@ -0,0 +1,281 @@
+<%@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");
+ 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();
+ }
+ }
+ 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");
+
+ 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%>bow?action=home">bow</a>(Bookmarks On the Web)
+ </div>
+ <div id="headright">
+ <form 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) {
+ String link = bookmark.getLink();
+ link = link.replace("'", "\\'");
+ %>
+ <div class="bookmark">
+ <div class="bookmarkhead clearfix">
+ <a href="<%=url + bookmark.getAlias()%>" title="<%=url + bookmark.getAlias()%>" target="_blank">
+ <%=bookmark.getAlias()%>
+ </a>
+ <span> (<%=sdf.format(bookmark.getDate())%>)</span>
+ <a class="edit" href="bow?action=editBookmark&bookmarkId=<%=bookmark.getWikittyId()%>" onclick="return modify('<%=bookmark.getDescription()%>', '<%=bookmark.getAlias()%>', '<%=BookmarkActions.getBookmarkTagsString(bookmark)%>', '<%=link%>', 'bow?action=modifyBookmark&bookmarkId=<%=bookmark.getWikittyId()%>', '<%=bookmark.getWikittyId()%>');"></a>
+ <a class="supprim" href="bow?action=removeBookmark&bookmarkId=<%=bookmark.getWikittyId()%>"></a>
+ </div>
+ <div class="bookmarkcontenu clearfix">
+ <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>
+ </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())) {
+ %>
+ <a style="text-decoration: none;" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%>" >
+ <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%>" >
+ <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>
+ <%
+ ++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) {
+ String link = bookmark.getLink();
+ link = link.replace("'", "\\'");
+ %>
+ <div class="bookmark">
+ <div class="bookmarkhead clearfix">
+ <a href="<%=url + bookmark.getAlias()%>" title="<%=url + bookmark.getAlias()%>" target="_blank">
+ <%=bookmark.getAlias()%>
+ </a>
+ <span> (<%=sdf.format(bookmark.getDate())%>)</span>
+ <a class="edit" href="bow?action=editBookmark&bookmarkId=<%=bookmark.getWikittyId()%>" onclick="return modify('<%=bookmark.getDescription()%>', '<%=bookmark.getAlias()%>', '<%=BookmarkActions.getBookmarkTagsString(bookmark)%>', '<%=link%>', 'bow?action=modifyBookmark&bookmarkId=<%=bookmark.getWikittyId()%>', '<%=bookmark.getWikittyId()%>');"></a>
+ <a class="supprim" href="bow?action=removeBookmark&bookmarkId=<%=bookmark.getWikittyId()%>"></a>
+ </div>
+ <div class="bookmarkcontenu clearfix">
+ <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>
+ </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())) {
+ %>
+ <a style="text-decoration: none;" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%>" >
+ <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%>" >
+ <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>
+
+ <%
+ ++count;
+ if (count >= nbBookmarks) {
+ break;
+ }
+ }
+ } else {
+ %>
+ <h2>No Bookmarks</h2>
+ <% }
+ %>
+ </div>
+ </div>
+ <div id="colonneD">
+ <ul class="droite">
+ <li><a href="bow?action=preferences">Preferences</a></li>
+ <li><a 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);">Temporary token</a></li>
+ <li><a 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);">Current permanent token</a></li>
+ <li><a href="bow?action=generateToken">Regenerate permanent token</a></li>
+ </ul>
+ <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 id="nuage">
+ <% 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%>" title="<%=value%> results" class="tag" style="font-size: <%=font%>px;"><%=tagName%></a>
+ <%
+ ++count;
+ if (count >= nbTags) {
+ break;
+ }
+ }
+ }
+ %>
+ </div>
+ <div id="recherche">
+ <h2>Research</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 research</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" />
+ <button>Parcourir</button>
+ </div>
+ </form>
+ <a href="bow?action=exportBookmarks">Export bookmarks</a>
+ </div>
+ <div class="colonnebas"></div>
+ </div>
+
+ </div>
+
+ </div>
+</body>
+<%}%>
\ No newline at end of file
Added: trunk/src/main/webapp/bookmarkSearch.jsp
===================================================================
--- trunk/src/main/webapp/bookmarkSearch.jsp (rev 0)
+++ trunk/src/main/webapp/bookmarkSearch.jsp 2010-06-08 15:07:02 UTC (rev 68)
@@ -0,0 +1,216 @@
+<!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");
+ 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();
+ }
+ }
+ 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");
+
+ 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%>bow?action=home">bow</a>(Bookmarks On the Web)
+ </div>
+ <div id="headright">
+ <form 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) {
+ String link = bookmark.getLink();
+ link = link.replace("'", "\\'");
+ %>
+ <div class="bookmark">
+ <div class="bookmarkhead clearfix">
+ <a href="<%=url + bookmark.getAlias()%>" title="<%=url + bookmark.getAlias()%>" target="_blank">
+ <%=bookmark.getAlias()%>
+ </a>
+ <span> (<%=sdf.format(bookmark.getDate())%>)</span>
+ <a class="edit" href="bow?action=editBookmark&bookmarkId=<%=bookmark.getWikittyId()%>&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>" onclick="return modify('<%=bookmark.getDescription()%>', '<%=bookmark.getAlias()%>', '<%=BookmarkActions.getBookmarkTagsString(bookmark)%>', '<%=link%>', 'bow?action=modifyBookmark&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>&bookmarkId=<%=bookmark.getWikittyId()%>', '<%=bookmark.getWikittyId()%>');"></a>
+ <a class="supprim" href="bow?action=removeBookmark&bookmarkId=<%=bookmark.getWikittyId()%>&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>"></a>
+ </div>
+ <div class="bookmarkcontenu clearfix">
+ <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></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())) {
+ %>
+ <a style="text-decoration: none;" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%>&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>" >
+ <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%>&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>" >
+ <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>
+ <%
+ }
+ } else {
+ %>
+ <h2>No Bookmarks</h2>
+ <%}%>
+ </div>
+ </div>
+
+ <div id="colonneD">
+ <ul class="droite">
+ <li><a href="bow?action=preferences">Preferences</a></li>
+ <li><a 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);">Temporary token</a></li>
+ <li><a 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);">Current permanent token</a></li>
+ <li><a href="bow?action=generateToken&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">Regenerate permanent token</a></li>
+ </ul>
+ <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 id="nuage">
+ <% 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%>&searchLine=<%=searchLine%>" title="<%=value%> results" class="tag" style="font-size: <%=font%>px;"><%=tagName%></a>
+ <%
+ ++count;
+ if (count >= nbTags) {
+ break;
+ }
+ }
+ }
+ %>
+ </div>
+ <div id="recherche">
+ <h2>Research</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 research</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" />
+ <br/>
+ <button type="submit">Import</button>
+ </div>
+ </form>
+ <a href="bow?action=exportBookmarks&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">Export bookmarks</a>
+ </div>
+ <div class="colonnebas"></div>
+ </div>
+
+ </div>
+
+ </div>
+</body>
+<%}%>
\ No newline at end of file
Added: trunk/src/main/webapp/css/bookmark.css
===================================================================
--- trunk/src/main/webapp/css/bookmark.css (rev 0)
+++ trunk/src/main/webapp/css/bookmark.css 2010-06-08 15:07:02 UTC (rev 68)
@@ -0,0 +1,323 @@
+@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;
+ height:100px;
+
+}
+
+#head{
+ clear:both;
+ width:1004px;
+ height:100px;
+ margin:0 auto;
+ position:relative;
+}
+
+#headleft{
+ width:740px;
+ float:left;
+ height:100px;
+}
+
+#headleft a.logo{
+ background:url(/bow/img/logobow.jpg);
+ width:290px;
+ height:100px;
+ text-indent:-99999px;
+ display:block;
+}
+
+#headright{
+ width:264px;
+ float:left;
+ background:#bf8a9c url(/bow/img/moyen-livre.jpg)no-repeat 30px 10px;
+ height:100px;
+}
+
+#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;
+}
+
+#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;
+}
+
+#mainbodyback{
+ background-color:#9edcf8;
+ min-height:100px;
+}
+
+#mainbody{
+ width:1004px;
+ margin:0 auto;
+ position:relative;
+ clear:both;
+}
+
+#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;
+}
+
+#mainbody .menu p{
+ color:#9edcf8;
+ font-size:18px;
+ font-weight:normal;
+ float:left;
+}
+
+#mainbody .menu form{
+ float:right;
+ color:#9edcf8;
+ font-size:12px;
+}
+
+#content{
+ width:740px;
+ float:left;
+ padding-top:20px;
+}
+
+#contenu{
+ width:660px;
+ margin:10px 40px;
+ background-color:#FFFFFF;
+}
+
+#colonneD{
+ width:264px;
+ float:left;
+ background-color:#804561;
+ font-size:140%;
+ color:#9edcf8;
+ margin-bottom:30px;
+}
+
+#colonneD a{
+ font-size:12px;
+ color:#9edcf8;
+}
+
+#colonneD ul.droite{
+ padding:10px 20px;
+ border-bottom:2px solid #9edcf8;
+}
+
+#colonneD ul.droite li{
+ list-style:none;
+ height:22px;
+}
+
+#colonneD ul.droite li a{
+ font-size:14px;
+ font-weight:normal;
+ text-decoration:none;
+ color:#9edcf8;
+}
+
+#colonneD ul.droite li a:hover{
+ text-decoration:underline;
+}
+
+#colonneD #add,
+#colonneD #nuage,
+#colonneD #recherche,
+#colonneD #import{
+ padding: 10px 20px;
+ border-bottom:2px solid #9edcf8;
+}
+
+#colonneD h2{
+ text-align:center;
+ color:#9edcf8;
+ font-size:170%;
+ font-weight:normal;
+}
+
+#colonneD #add form{
+ text-align:right;
+}
+
+#colonneD form .input{
+ padding:10px 0;
+}
+
+#colonneD form input{
+ height:22px;
+ width:146px;
+}
+
+#colonneD #add form label{
+ padding-right:10px;
+}
+
+#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 #nuage{
+ height:100px;
+}
+
+#colonneD #import{
+ border-bottom:none;
+}
+
+#colonneD .colonnebas{
+ background:url(/bow/img/piedmenu.jpg) no-repeat;
+ height:817px;
+}
+
+.bookmark{
+ width:660px;
+ border-bottom:2px solid #9edcf8;
+}
+
+.bookmark .bookmarkhead{
+ width:620px;
+ height:32px;
+ background-color:#bf8a9c;
+ padding:0 20px;
+ position:relative;
+}
+
+.bookmark .bookmarkhead a.edit{
+ background:url(/bow/img/edit.jpg) no-repeat;
+ height:32px;
+ position:absolute;
+ 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;
+ 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;
+ background:url(/bow/img/ptit-livre.jpg) no-repeat;
+ height:32px;
+ display:block;
+ text-decoration:none;
+}
+
+.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;
+}
+
+#footer p{
+ color:#bf8a9c;
+ font-size:14px;
+ text-align:center;
+ line-height:50px;
+}
\ No newline at end of file
Property changes on: trunk/src/main/webapp/css/bookmark.css
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/src/main/webapp/css/connexion.css
===================================================================
--- trunk/src/main/webapp/css/connexion.css (rev 0)
+++ trunk/src/main/webapp/css/connexion.css 2010-06-08 15:07:02 UTC (rev 68)
@@ -0,0 +1,125 @@
+@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;
+height:100px;
+
+}
+#head{
+clear:both;
+width:1004px;
+height:100px;
+margin:0 auto;
+position:relative;
+}
+#headleft{
+width:740px;
+float:left;
+height:100px;
+}
+#headleft a.logo{
+background:url(/bow/img/logobow.jpg);
+width:290px;
+height:100px;
+text-indent:-99999px;
+display:block;
+}
+
+#mainbodyback{
+background-color:#9edcf8;
+min-height:100px;
+}
+#mainbody{
+width:1004px;
+margin:0 auto;
+position:relative;
+clear:both;
+
+}
+
+#content{
+width:1004px;
+position:relative;
+margin:0 auto;
+padding-top:20px;
+}
+
+#contenu{
+width:225px;
+height:315px;
+background:url(/bow/img/fondconnexion.jpg) no-repeat;
+position:relative;
+margin:100px auto;
+padding:10px 70px;
+}
+#contenu h1{
+color:#804561;
+width:60px;
+position:relative;
+margin:20px auto;
+}
+#contenu form p{
+color:#804561;
+font-size:16px;
+font-weight:bold;
+padding:15px 0;
+}
+#contenu form input{
+width:225px;
+}
+#contenu form button{
+float:right;
+margin-top:20px;
+background:url(/bow/img/fdboutonV.jpg) repeat-x;
+height:31px;
+line-height:31px;
+width:60px;
+color:#FFFFFF;
+font-weight:bold;
+border:none;
+}
+#contenu a{
+color:#804561;
+position:absolute;
+bottom:50px;
+left:70px;
+font-size:14px;
+font-weight:bold;
+}
+#footer{
+background-color:#804561;
+height:50px;
+width:auto;
+}
+#footer p{
+color:#bf8a9c;
+font-size:14px;
+text-align:center;
+line-height:50px;
+}
\ No newline at end of file
Property changes on: trunk/src/main/webapp/css/connexion.css
___________________________________________________________________
Added: svn:executable
+ *
Deleted: trunk/src/main/webapp/css/styles.css
===================================================================
--- trunk/src/main/webapp/css/styles.css 2010-06-04 13:37:29 UTC (rev 67)
+++ trunk/src/main/webapp/css/styles.css 2010-06-08 15:07:02 UTC (rev 68)
@@ -1,175 +0,0 @@
-table.result {
- border:3px solid #6495ed;
- border-collapse:collapse;
- width:900px;
- margin:auto;
-}
-table.actions {
- border-collapse:collapse;
- width:90%;
- margin:auto;
-}
-
-th.result {
- font-family:monospace;
- border:1px dotted #6495ed;
- padding:5px;
- background-color:#EFF6FF;
-}
-
-.remove {
- width:5%;
-}
-
-.edit {
- width:36%;
-}
-
-.name {
- width:20%;
-}
-
-.click {
- width:14%;
-}
-
-.date {
- width:13%;
-}
-
-.tags {
- width:12%;
-}
-
-td.result {
- font-family:monospace;
- border:1px solid #6495ed;
- padding:5px;
- /*text-align:center;*/
-}
-caption {
- font-family:sans-serif;
-}
-
-a.logout {
-
-}
-
-div.tagCloud {
- background: #C5E3F7 none repeat scroll 0 0;
- max-width: 300px;
- min-width: 200px;
- padding-bottom: 5px;
- padding-left: 10px;
- padding-right: 10px;
- padding-top: 5px;
- margin-bottom: 5px;
- text-align: center;
- border-radius:40px;
- -webkit-border-radius:40px;
- -opera-border-radius:40px;
- -moz-border-radius:40px;
-}
-
-#menu {
- margin: 0;
- padding: 0;
- float: left;
- background-color:#eaf3f9;
- display: inline-block;
- position: relative;
- width: 20%;
-}
-
-#table {
- margin: 0;
- padding: 0;
- float: left;
- position: relative;
- width: 80%;
-}
-
-h1.result {
- font-family:monospace;
- color:#FF3F42;
- font-size:1.6em;
- font-weight:normal;
- line-height:20px;
- margin-bottom:20px;
- margin-left: 5px;
- margin-right: 5px;
- text-align: center;
- background-color: #C5E3F7;
- border-radius: 30px;
- -webkit-border-radius: 30px;
- -moz-border-radius: 30px;
- -opera-border-radius:30px;
-
-}
-
-h1.login {
- font-family:monospace;
- color:#FF3F42;
- border-bottom: 3px solid #C5E3F7;
- margin-bottom: 10px;
-}
-
-h2.result {
- font-family:monospace;
- color:#FF3F42;
- font-size:1em;
- font-weight:normal;
- line-height:20px;
- margin-top:50px;
- text-align: center;
-}
-
-div.menu{
- margin: 10px;
- border-bottom: 1px solid #ccc;
-}
-
-#meta{
- list-style-type: none;
- padding-left: 0px;
-}
-
-#meta li {
- margin-bottom: 5px;
-}
-
-a {
- font-family:monospace;
- color:#0078C8;
- padding: 0;
- margin: 0;
-}
-
-a:hover {
- color: #0095f8;
-}
-
-a.tag {
- font-family:monospace;
- color: #FF3F42;
- margin-left: 2px;
- margin-right: 2px;
- border-radius: 30px;
- -webkit-border-radius: 30px;
- -moz-border-radius: 30px;
- -opera-border-radius:30px;
- text-decoration:none;
-}
-a.tag:hover {
- background:#A9BCE1 none repeat scroll 0 0;
- color:#FFFFFF;
-}
-
-.test {
- text-align: center;
- float: right;
- position: relative;
- bottom: 1%;
- right: 0px;
- width: 4em;
-}
\ No newline at end of file
Modified: trunk/src/main/webapp/footer.jsp
===================================================================
--- trunk/src/main/webapp/footer.jsp 2010-06-04 13:37:29 UTC (rev 67)
+++ trunk/src/main/webapp/footer.jsp 2010-06-08 15:07:02 UTC (rev 68)
@@ -4,15 +4,15 @@
String version = (String) request.getAttribute("version");
%>
<body>
- <br />
- <br />
- <div class="Index" id="footer" style="float: left">
- <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>
+ <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
Modified: trunk/src/main/webapp/header.jsp
===================================================================
--- trunk/src/main/webapp/header.jsp 2010-06-04 13:37:29 UTC (rev 67)
+++ trunk/src/main/webapp/header.jsp 2010-06-08 15:07:02 UTC (rev 68)
@@ -4,46 +4,26 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <meta name="description" content="Bookmark On Web" />
+ <meta name="description" content="Bookmark On the Web" />
<title>Bow</title>
- <link rel="stylesheet" type="text/css" href="./css/styles.css" />
<link rel="search" type="application/opensearchdescription+xml" title="bowTemporarySearchEngine" href="<%=url%>bow?action=temporaryXml" />
<link rel="search" type="application/opensearchdescription+xml" title="bowPermanentSearchEngine" href="<%=url%>bow?action=permanentXml" />
+ <link rel="stylesheet" type="text/css" href="./css/bookmark.css" />
<script type="text/javascript">
<!--
- function modify(name, alias, tags, link, action, id) {
- var form = document.getElementById("bookmarkForm");
- form.elements["url"].value = link;
- form.elements["name"].value = name;
- form.elements["tags"].value = tags;
- form.elements["alias"].value = alias;
- form.elements["submit"].value = 'Modif';
- form.action = action;
- var del = null;
- var count = 0;
- for ((del = document.getElementById(id + count)); del != null; del = document.getElementById(id + count)) {
- del.style.display = 'inline';
- ++count;
- }
- return false;
+ function modify(name, alias, tags, link, action, id) {
+ var form = document.getElementById("bookmarkForm");
+ form.elements["url"].value = link;
+ form.elements["name"].value = name;
+ form.elements["tags"].value = tags;
+ form.elements["alias"].value = alias;
+ form.action = action;
+ var tab = document.getElementsByName(id);
+ for (var count = 0; count < tab.length; ++count) {
+ tab[count].style.display = 'inline';
}
-
- function modifyLast(name, alias, tags, link, action, id) {
- var form = document.getElementById("bookmarkForm");
- form.elements["url"].value = link;
- form.elements["name"].value = name;
- form.elements["tags"].value = tags;
- form.elements["alias"].value = alias;
- form.elements["submit"].value = 'Modif';
- form.action = action;
- var del = null;
- var count = 0;
- for ((del = document.getElementById(count + id)); del != null; del = document.getElementById(count + id)) {
- del.style.display = 'inline';
- ++count;
- }
- return false;
- }
+ return false;
+ }
//-->
</script>
</head>
\ No newline at end of file
Added: trunk/src/main/webapp/img/aide.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/img/aide.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/webapp/img/click.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/img/click.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/webapp/img/croix.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/img/croix.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/webapp/img/edit.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/img/edit.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/webapp/img/fdboutonV.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/img/fdboutonV.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/webapp/img/fondbouton.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/img/fondbouton.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/webapp/img/fondconnexion.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/img/fondconnexion.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/webapp/img/fondhead.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/img/fondhead.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/webapp/img/livreG.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/img/livreG.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/webapp/img/logobow.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/img/logobow.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/webapp/img/moyen-livre.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/img/moyen-livre.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/webapp/img/piedmenu.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/img/piedmenu.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/webapp/img/pointemenu.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/img/pointemenu.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/webapp/img/ptit-livre.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/img/ptit-livre.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/webapp/img/tag.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/img/tag.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/src/main/webapp/login.jsp
===================================================================
--- trunk/src/main/webapp/login.jsp 2010-06-04 13:37:29 UTC (rev 67)
+++ trunk/src/main/webapp/login.jsp 2010-06-08 15:07:02 UTC (rev 68)
@@ -6,26 +6,47 @@
%>
<html>
- <jsp:include page="header.jsp" flush="true">
- <jsp:param name="bowUrl" value="<%=url%>"/>
- </jsp:include>
+ <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>
- <h1 class="login">Login</h1>
- <form method="POST" action="bow?action=login">
- email <input type="text" name="email" size="20">
- <br />
- password <input type=password name="password" size="20">
- <br />
- <input type="submit" value="login">
- </form>
- <a href="bow?action=registration">register</a>
- <br />
- <%if (error != null) {%>
- <font color="red"><%=error%></font>
- <%}%>
- <jsp:include page="footer.jsp" flush="true" >
- <jsp:param name="bowUrl" value="<%=url%>" />
- <jsp:param name="version" value="<%=version%>" />
- </jsp:include>
+ <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>
+ <a href="bow?action=registration">Register</a>
+ </div>
+ <br />
+ <%if (error != null) {%>
+ <font color="red"><%=error%></font>
+ <%}%>
+ </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
Modified: trunk/src/main/webapp/main.jsp
===================================================================
--- trunk/src/main/webapp/main.jsp 2010-06-04 13:37:29 UTC (rev 67)
+++ trunk/src/main/webapp/main.jsp 2010-06-08 15:07:02 UTC (rev 68)
@@ -15,18 +15,17 @@
String formBookmarkId = (String) request.getAttribute("bookmarkId");
String formTags = (String) request.getAttribute("tags");
String formAlias = (String) request.getAttribute("alias");
- String formButton = (String) request.getAttribute("button");
String formAction = (String) request.getAttribute("action");
%>
-<html>
+<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="search2.jsp" flush="true">
+ <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%>"/>
@@ -35,12 +34,12 @@
<jsp:param name="bookmarkId" value="<%=formBookmarkId%>"/>
<jsp:param name="tags" value="<%=formTags%>"/>
<jsp:param name="alias" value="<%=formAlias%>"/>
- <jsp:param name="button" value="<%=formButton%>"/>
<jsp:param name="action" value="<%=formAction%>"/>
</jsp:include>
<% } else {
%>
- <jsp:include page="home.jsp" flush="true">
+
+ <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%>"/>
@@ -49,7 +48,6 @@
<jsp:param name="bookmarkId" value="<%=formBookmarkId%>"/>
<jsp:param name="tags" value="<%=formTags%>"/>
<jsp:param name="alias" value="<%=formAlias%>"/>
- <jsp:param name="button" value="<%=formButton%>"/>
<jsp:param name="action" value="<%=formAction%>"/>
</jsp:include>
<% }
Modified: trunk/src/main/webapp/openSearchResult.jsp
===================================================================
--- trunk/src/main/webapp/openSearchResult.jsp 2010-06-04 13:37:29 UTC (rev 67)
+++ trunk/src/main/webapp/openSearchResult.jsp 2010-06-08 15:07:02 UTC (rev 68)
@@ -24,83 +24,72 @@
<jsp:param name="bowUrl" value="<%=url%>"/>
</jsp:include>
<body>
- <h1 class="result">Results</h1>
+ <div id="mainbodyback" class="clearfix">
+ <div id="mainbody">
- <% if (bookmarkActions != null) {
- List<Bookmark> bookmarkList = bookmarkActions.getBookmarks();
- if (!bookmarkList.isEmpty()) {
- %>
- <table class="result">
- <tr class="result">
- <th class="result">
- Date
- <a style="text-decoration:none" href="bow?action=orderAscOS&type=date&searchLine=<%=searchLine%>" >
- <IMG style="border:none" SRC="img/asc.png" ALT="order ASC" TITLE="Asc" />
- </a>
- <a style="text-decoration:none" href="bow?action=orderDescOS&type=date&searchLine=<%=searchLine%>">
- <IMG style="border:none" SRC="img/desc.png" ALT="order DESC" TITLE="Desc" />
- </a>
- </th>
- <th class="result">
- Name
- <a style="text-decoration:none" href="bow?action=orderAscOS&type=name&searchLine=<%=searchLine%>">
- <IMG style="border:none" SRC="img/asc.png" ALT="order ASC" TITLE="Asc" />
- </a>
- <a style="text-decoration:none" href="bow?action=orderDescOS&type=name&searchLine=<%=searchLine%>">
- <IMG style="border:none" SRC="img/desc.png" ALT="order DESC" TITLE="Desc" />
- </a>
- </th>
- <th class="result">Tags</th>
- <th class="result">
- Click
- <a style="text-decoration:none" href="bow?action=orderAscOS&type=click&searchLine=<%=searchLine%>">
- <IMG style="border:none" SRC="img/asc.png" ALT="order ASC" TITLE="Asc" />
- </a>
- <a style="text-decoration:none" href="bow?action=orderDescOS&type=click&searchLine=<%=searchLine%>">
- <IMG style="border:none" SRC="img/desc.png" ALT="order DESC" TITLE="Desc" />
- </a>
- </th>
- </tr>
- <%
- SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
- for (Bookmark bookmark : bookmarkList) {
- %>
- <tr class="result">
- <td class="result">
- <%=sdf.format(bookmark.getDate())%>
- </td>
- <td class="result">
- <a href="bow?action=addClick&bookmarkId=<%=bookmark.getWikittyId()%>" target="_blank"><%=bookmark.getDescription()%></a>
- </td>
- <td class="result">
- <%
- Set<String> tagList = bookmark.getTags();
- if (tagList != null && !tagList.isEmpty()) {
- for (String tag : tagList) {
- %>
- <%=tag%>
- <%
- }
- %>
- </td>
- <%
- }
- %>
- <td class="result">
- <%=bookmark.getClick()%>
- </td>
- </tr>
- <%
- }
- %>
- </table>
- <%
- } else {
- %>
- <h2 class="result">No Bookmarks found</h2>
- <% }
- }
- %>
+ <div id="content">
+ <div class="menu clearfix"><p>Result</p>
+ <form method="POST" action="bow?action=orderOS&searchLine=<%=searchLine%>">
+ <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) {
+ String link = bookmark.getLink();
+ link = link.replace("'", "\\'");
+ %>
+ <body>
+ <div class="bookmark">
+ <div class="bookmarkhead clearfix">
+ <a href="<%=url + bookmark.getAlias()%>" title="<%=url + bookmark.getAlias()%>" target="_blank">
+ <%=bookmark.getAlias()%>
+ </a>
+ <span> (<%=sdf.format(bookmark.getDate())%>)</span>
+ </div>
+ <div class="bookmarkcontenu clearfix">
+ <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></p>
+ <p class="tags"><strong>Tags :</strong>
+ <%
+ Set<String> tagList = bookmark.getTags();
+ if (tagList != null && !tagList.isEmpty()) {
+ for (String tag : tagList) {
+ %>
+ <%=tag%>
+ <%
+ }
+ }
+ %>
+ </p>
+ </div>
+ <div class="click"><%=bookmark.getClick()%></div>
+ </div>
+ </div>
+ <%
+ }
+ } else {
+ %>
+ <h2>No Bookmarks</h2>
+ <%}%>
+ </div>
+ </div>
+ </div>
+ </div>
<jsp:include page="footer.jsp" flush="true" >
<jsp:param name="bowUrl" value="<%=url%>" />
<jsp:param name="version" value="<%=version%>" />
Added: trunk/src/main/webapp/preference.jsp
===================================================================
--- trunk/src/main/webapp/preference.jsp (rev 0)
+++ trunk/src/main/webapp/preference.jsp 2010-06-08 15:07:02 UTC (rev 68)
@@ -0,0 +1,34 @@
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@page import="org.chorem.bow.Preference" %>
+<%
+ String error = (String) request.getAttribute("msgError");
+ String url = (String) request.getAttribute("bowUrl");
+ String version = (String) request.getAttribute("version");
+ Preference preference = (Preference) request.getAttribute("preference");
+ User user = session.getAttribute("user");
+%>
+
+<html>
+ <jsp:include page="header.jsp" flush="true">
+ <jsp:param name="bowUrl" value="<%=url%>"/>
+ </jsp:include>
+ <body>
+ <h1 class="login">Login</h1>
+ <form method="POST" action="bow?action=login">
+ email <input type="text" name="email" size="20">
+ <br />
+ password <input type=password name="password" size="20">
+ <br />
+ <input type="submit" value="login">
+ </form>
+ <a href="bow?action=registration">register</a>
+ <br />
+ <%if (error != null) {%>
+ <font color="red"><%=error%></font>
+ <%}%>
+ <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
Added: trunk/src/main/webapp/preferences.jsp
===================================================================
--- trunk/src/main/webapp/preferences.jsp (rev 0)
+++ trunk/src/main/webapp/preferences.jsp 2010-06-08 15:07:02 UTC (rev 68)
@@ -0,0 +1,82 @@
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+
+<%@page import="org.chorem.bow.Preference" %>
+<%@page import="org.chorem.bow.User" %>
+
+<%
+ User user = (User) session.getAttribute("user");
+ Preference preference = (Preference) session.getAttribute("preference");
+ if (user != null && preference != null) {
+ String url = (String) request.getAttribute("bowUrl");
+ String version = (String) request.getAttribute("version");
+ 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="bow">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>Password :</p>
+ <input type=password name="password"/>
+
+ <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
Modified: trunk/src/main/webapp/register.jsp
===================================================================
--- trunk/src/main/webapp/register.jsp 2010-06-04 13:37:29 UTC (rev 67)
+++ trunk/src/main/webapp/register.jsp 2010-06-08 15:07:02 UTC (rev 68)
@@ -4,28 +4,49 @@
String url = (String) request.getAttribute("bowUrl");
String version = (String) request.getAttribute("version");
%>
+
<html>
- <jsp:include page="header.jsp" flush="true">
- <jsp:param name="bowUrl" value="<%=url%>"/>
- </jsp:include>
+ <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>
- <h1 class="login">Register</h1>
+ <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">
- <form method="POST" action="bow?action=register">
- email <input type="text" name="email" size="20">
- <br />
- password <input type=password name="password" size="20">
- <br />
- <input type="submit" value="Register">
- </form>
- <a href="bow">Return to the login page</a>
- <br />
- <%if (error != null && error.isEmpty() == false) {%>
- <font color="red"><%=error%></font>
- <%}%>
- <jsp:include page="footer.jsp" flush="true" >
- <jsp:param name="bowUrl" value="<%=url%>" />
- <jsp:param name="version" value="<%=version%>" />
- </jsp:include>
+ <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>
+ <a href="bow">Return to the login page</a>
+ </div>
+ <br />
+ <%if (error != null) {%>
+ <font color="red"><%=error%></font>
+ <%}%>
+ </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
Modified: trunk/src/main/xmi/bow.zargo
===================================================================
(Binary files differ)
1
0