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
- 617 discussions
r163 - in trunk/src/main: resources/i18n webapp/jsp webapp/jsp/inc
by vbriand@users.chorem.org 06 Jan '11
by vbriand@users.chorem.org 06 Jan '11
06 Jan '11
Author: vbriand
Date: 2011-01-06 10:56:50 +0100 (Thu, 06 Jan 2011)
New Revision: 163
Url: http://chorem.org/repositories/revision/bow/163
Log:
The bookmarks are now displayed on the home page
Modified:
trunk/src/main/resources/i18n/bow_en_GB.properties
trunk/src/main/resources/i18n/bow_fr_FR.properties
trunk/src/main/webapp/jsp/inc/bookmark.jsp
trunk/src/main/webapp/jsp/inc/bookmarkTop.jsp
trunk/src/main/webapp/jsp/inc/errorFrame.jsp
trunk/src/main/webapp/jsp/login.jsp
Modified: trunk/src/main/resources/i18n/bow_en_GB.properties
===================================================================
--- trunk/src/main/resources/i18n/bow_en_GB.properties 2011-01-05 21:58:10 UTC (rev 162)
+++ trunk/src/main/resources/i18n/bow_en_GB.properties 2011-01-06 09:56:50 UTC (rev 163)
@@ -15,6 +15,9 @@
bow.forgotPassword.emailDoesntExist=
bow.forgotpwd.submit=Send
bow.forgotpwd.title=Forgot your password?
+bow.home.latestBookmarks=
+bow.home.mostUsedBookmarks=
+bow.home.noBookmarks=
bow.home.title=
bow.label.locale.english=
bow.label.locale.french=
Modified: trunk/src/main/resources/i18n/bow_fr_FR.properties
===================================================================
--- trunk/src/main/resources/i18n/bow_fr_FR.properties 2011-01-05 21:58:10 UTC (rev 162)
+++ trunk/src/main/resources/i18n/bow_fr_FR.properties 2011-01-06 09:56:50 UTC (rev 163)
@@ -15,6 +15,9 @@
bow.forgotPassword.emailDoesntExist=
bow.forgotpwd.submit=Envoyer
bow.forgotpwd.title=Vous avez oubli\u00E9 votre mot de passe ?
+bow.home.latestBookmarks=
+bow.home.mostUsedBookmarks=
+bow.home.noBookmarks=
bow.home.title=
bow.label.locale.english=
bow.label.locale.french=
Modified: trunk/src/main/webapp/jsp/inc/bookmark.jsp
===================================================================
--- trunk/src/main/webapp/jsp/inc/bookmark.jsp 2011-01-05 21:58:10 UTC (rev 162)
+++ trunk/src/main/webapp/jsp/inc/bookmark.jsp 2011-01-06 09:56:50 UTC (rev 163)
@@ -23,6 +23,7 @@
#L%
-->
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@taglib prefix="s" uri="/struts-tags" %>
<%@page import="org.chorem.bow.BowConfig" %>
<%@page import="org.chorem.bow.Bookmark" %>
<%@page import="java.text.SimpleDateFormat" %>
@@ -43,6 +44,7 @@
if (fullTextLine != null) {
search += "&fullTextLine=" + fullTextLine;
}
+url = "toto"; //TODO: à changer
if (url != null && bookmark != null && sdf != null && bookmarkActions != null) {
String formBookmarkId = (String) request.getAttribute("formBookmarkId");
String link = bookmark.getLink();
@@ -54,8 +56,14 @@
<%=bookmark.getAlias()%>
</a>
<p class="date"> (<%=sdf.format(bookmark.getDate())%>)</p>
- <a class="edit" href="/bow/editBookmark.action&bookmarkId=<%=bookmark.getWikittyId()%><%=search%>" onclick="return modify('<%=bookmark.getDescription()%>', '<%=bookmark.getAlias()%>', '<%=BookmarkActions.getBookmarkTagsString(bookmark)%>', '<%=link%>', 'bow/modifyBookmark.action&bookmarkId=<%=bookmark.getWikittyId()%><%=search%>', '<%=bookmark.getWikittyId()%>');"></a>
- <a class="supprim" href="/bow/removeBookmark.action&bookmarkId=<%=bookmark.getWikittyId()%><%=search%>"></a>
+ <s:url id="editBookmark" action="editBookmark">
+ <s:param name="bookmarkId"><%=bookmark.getWikittyId()%><%=search%></s:param>
+ </s:url>
+ <s:a cssClass="edit" href="%{editBookmark}" onclick="return modify('<%=bookmark.getDescription()%>', '<%=bookmark.getAlias()%>', '<%=BookmarkActions.getBookmarkTagsString(bookmark)%>', '<%=link%>', %{editBookmark}, '<%=bookmark.getWikittyId()%>');"></s:a>
+ <s:url id="removeBookmark" action="removeBookmark">
+ <s:param name="bookmarkId"><%=bookmark.getWikittyId()%><%=search%></s:param>
+ </s:url>
+ <s:a cssClass="supprim" href="%{removeBookmark}"></s:a>
</div>
<div class="bookmarkcontenu">
<div class="screenshot"></div>
@@ -63,7 +71,11 @@
<div class="description">
<h3>Description :</h3>
<p>
- <a title ="<%=bookmark.getLink()%>" href="/bow/addClick.action&bookmarkId=<%=bookmark.getWikittyId()%>" onclick="window.open(this.href); return false;"><%=bookmark.getDescription()%></a>
+ <s:url id="addClick" action="addClick">
+ <s:param name="bookmarkId"><%=bookmark.getWikittyId()%></s:param>
+ </s:url>
+ <s:a title="" href="%{addClick}" onclick="window.open(this.href); return false;"><%=bookmark.getDescription()%></s:a>
+ <!-- <%=bookmark.getLink()%>-->
</p>
<p class="tags">
<strong>Tags :</strong>
@@ -71,19 +83,29 @@
Set<String> tagList = bookmark.getTags();
if (tagList != null && !tagList.isEmpty()) {
for (String tag : tagList) {
+ %>
+ <s:url id="deleteTag" action="deleteTag">
+ <s:param name="bookmarkId"><%=bookmark.getWikittyId()%></s:param>
+ <s:param name="deleteTag"><%=tag%><%=search%></s:param>
+ </s:url>
+ <%
if (formBookmarkId != null && formBookmarkId.equals(bookmark.getWikittyId())) {
%>
- <a style="text-decoration: none;" href="/bow/deleteTag.action&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%><%=search%>">
+ <s:a cssStyle="text-decoration: none;" href="%{deleteTag}">
<img style="border:none;" src="img/delete.png" alt="Delete tag" title="Delete" />
- </a>
+ </s:a>
<%
} else {
%>
- <a name="<%=bookmark.getWikittyId()%>" style="display:none; text-decoration: none;" href="/bow/deleteTag.action&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%><%=search%>">
+ <!-- <%=bookmark.getWikittyId()%> -->
+ <s:a name="" cssStyle="display:none; text-decoration: none;" href="%{deleteTag}">
<img style="border:none;" src="img/delete.png" alt="Delete tag" title="Delete" />
- </a>
+ </s:a>
<% } %>
- <a href="/bow/search.action&searchLine=<%=tag%>" style="text-decoration: none"><%=tag%></a>
+ <s:url id="search" action="search">
+ <s:param name="searchLine"><%=tag%></s:param>
+ </s:url>
+ <s:a href="%{search}" cssStyle="text-decoration: none"><%=tag%></s:a>
<%
}
}
Modified: trunk/src/main/webapp/jsp/inc/bookmarkTop.jsp
===================================================================
--- trunk/src/main/webapp/jsp/inc/bookmarkTop.jsp 2011-01-05 21:58:10 UTC (rev 162)
+++ trunk/src/main/webapp/jsp/inc/bookmarkTop.jsp 2011-01-06 09:56:50 UTC (rev 163)
@@ -37,13 +37,11 @@
TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions");
Boolean admin = (Boolean) session.getAttribute("admin");
-if (admin == null)
-{
+if (admin == null) {
admin = false;
}
-if (tokenActions != null && bookmarkActions != null)
-{
+if (tokenActions != null && bookmarkActions != null) {
String temporaryToken = tokenActions.getTemporaryToken();
String permanentToken = tokenActions.getPermanentToken();
String url = (String) request.getAttribute("bowUrl");
@@ -52,8 +50,7 @@
}
int tags = preference.getTags();
-if (preference != null && tags > 0)
-{
+if (preference != null && tags > 0) {
nbTags = tags;
}
@@ -64,43 +61,33 @@
String formAlias = (String) request.getAttribute("alias");
String formAction = (String) request.getAttribute("action");
-if (formLink == null)
-{
+if (formLink == null) {
formLink = "URL";
}
-if (formName == null)
-{
+if (formName == null) {
formName = "name";
}
-if (formTags == null)
-{
+if (formTags == null) {
formTags = "tag1 tag2...";
}
-if (formAlias == null)
-{
+if (formAlias == null) {
formAlias = "alias";
}
-if (formAction == null)
-{
+if (formAction == null) {
formAction = "bow?action=addUrl";
}
-if (tokenActions != null && bookmarkActions != null)
-{
- if (searchLine != null)
- {
+if (tokenActions != null && bookmarkActions != null) {
+ if (searchLine != null) {
String searchLine = bookmarkActions.getSearchLine();
String fullText = bookmarkActions.getFullTextLine();
- }
- else
- {
- if (preference != null && preference.getBookmarks() > 0)
- {
+ } else {
+ if (preference != null && preference.getBookmarks() > 0) {
nbBookmarks = preference.getBookmarks();
}
}
-%>
+%>
\ No newline at end of file
Modified: trunk/src/main/webapp/jsp/inc/errorFrame.jsp
===================================================================
--- trunk/src/main/webapp/jsp/inc/errorFrame.jsp 2011-01-05 21:58:10 UTC (rev 162)
+++ trunk/src/main/webapp/jsp/inc/errorFrame.jsp 2011-01-06 09:56:50 UTC (rev 163)
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
+<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%
-String userError = (String) request.getAttribute("errorMsgUser");
-String techError = (String) request.getAttribute("errorMsgTech");
+String userError = (String)request.getAttribute("errorMsgUser");
+String techError = (String)request.getAttribute("errorMsgTech");
if (userError != null) {
%>
Modified: trunk/src/main/webapp/jsp/login.jsp
===================================================================
--- trunk/src/main/webapp/jsp/login.jsp 2011-01-05 21:58:10 UTC (rev 162)
+++ trunk/src/main/webapp/jsp/login.jsp 2011-01-06 09:56:50 UTC (rev 163)
@@ -24,10 +24,10 @@
</p>
</s:form>
<s:url id="localeEN" action="login_input">
- <s:param name="request_locale" >en_GB</s:param>
+ <s:param name="request_locale">en_GB</s:param>
</s:url>
<s:url id="localeFR" action="login_input">
- <s:param name="request_locale" >fr_FR</s:param>
+ <s:param name="request_locale">fr_FR</s:param>
</s:url>
<s:a href="%{localeEN}">English</s:a><br />
1
0
r162 - in trunk/src/main/webapp/extensions: . chromium chromium/css
by kmorin@users.chorem.org 05 Jan '11
by kmorin@users.chorem.org 05 Jan '11
05 Jan '11
Author: kmorin
Date: 2011-01-05 22:58:10 +0100 (Wed, 05 Jan 2011)
New Revision: 162
Url: http://chorem.org/repositories/revision/bow/162
Log:
- change add bookmark call (xhr instead of running a js script)
- layout
Modified:
trunk/src/main/webapp/extensions/bow4chromium.crx
trunk/src/main/webapp/extensions/bow4chromium.pem
trunk/src/main/webapp/extensions/chromium/css/extension.css
trunk/src/main/webapp/extensions/chromium/css/options.css
trunk/src/main/webapp/extensions/chromium/options.html
trunk/src/main/webapp/extensions/chromium/popup.html
Modified: trunk/src/main/webapp/extensions/bow4chromium.crx
===================================================================
(Binary files differ)
Modified: trunk/src/main/webapp/extensions/bow4chromium.pem
===================================================================
--- trunk/src/main/webapp/extensions/bow4chromium.pem 2011-01-05 17:40:08 UTC (rev 161)
+++ trunk/src/main/webapp/extensions/bow4chromium.pem 2011-01-05 21:58:10 UTC (rev 162)
@@ -1,16 +1,16 @@
-----BEGIN PRIVATE KEY-----
-MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAM7n867IJSfHF6egn
-sBS5kBR8rCwFbljqraMmTWY8tvZtUk6B7e0gZxMpoZy83NBbztqZMCrg1uu5Sjbes
-mfsWXQuXydapl4ROKN85MUsuaHy+TvO27Zso5GjswDo982cShioU3oidYw7ZQC/Pu
-FPmlzkzMfrIFqOA8S8lh7+XiZAgMBAAECgYAzFbfnvojV8mUXwSORDqbE2LbYAxHK
-DR6YJcyqHBJST8VfyBEhvVKG+bHf3j/XhB9nhxRLMc2j9GGmHdKKN4B/1jsJAR43L
-1ByYhp4L9ICjTGXrUz5ldl9bU3uuKIYeLaK6vKkmq+S7nlFKQDSv4X3uXEvCIZec/
-ESLcm9yiIBUQJBAO4r26CLVBTVKsg/Tmx9b7HHosyuUEv2zJzpo/SNztndpo1VOy2
-JVQC5U4IoV1BhI+q6za5oTo3rnIfTjsyoJyUCQQDeZPMEcmroUrDpvy4bhnI2idZZ
-F4H1vVmcbcxd/RCmQSYUTa2c9HyZdUxJG/dveExEkC58HP6ZSc2svb+TwrtlAkEAw
-8hXvUxrLMjiZ0PrArHGTFzwTdMI/Lj/EAnblh+wJ1XWIJ4sjE01C+hMZlUlGVURAl
-bW1wS1dmJ1BQ56d2/O5QJBAM/3LL3a1Rg9w4xCKDa7KfDQQq57ah9HmxXKI1M9BCX
-ERHy2CwT8J8xFQToYufD2WLPA9IdBgeAMgRXpNs5RSnUCQEAcKEx37eDto1LJPRh1
-nxyMzcgonNBSP2UtwGZdTeujM2KxBX4YMUuEz0u6fzlB+vD/ZM9af1IxYzDaH0mZc
-6c=
+MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMkSF9yn8GdHkNaI2
+fh8b+eGwe/YAia1DjKlf9/G00CZQ+iW893FXLcfm+Oy8pIt1fAiCe7wYJDMd0UIZ/
+RKFVY9b8edA3+aQgKp+6JFOR/Acfc1gIdnpR17tq0sRzku+pdpNjNU6oNJlVMUSbJ
+DFD7G4bp8Pk2ICwQzfB2EmhxzAgMBAAECgYBcB3f8erFB1DOqvcBmRy5A3iDt0gRK
+CxyQecdpeOs/6eZ3EoBTxP2Go2UKduEnnusImcvKHSNVowAEDLDn0vCoVE2Sl+lz0
+Qv71P5TDycOhi8ih88PeOjfYDQXMapfnymC8Z/pqaQuYx8B17D3T/mgPtRcFp64oi
+y48lkCM/+dIQJBAO5iV7TEvNxbucr/VuWh3GDyVkFbP19CoSA8lSwAQbhhyxXmnd4
+gVkEATyQV5ZsSlV9MaxlaYZOSMrmRNnxCHFcCQQDX7d53lvmutburHJaihGed7C5c
+oMxiteqUUjET0yjzOYBXhQQF+4FB9LrTd+m71STgoYprXd5cRhAPFV2EP69FAkEAh
+dpEgyVBIr6CeYCci34yX2FTm4kf8V5ZWN+Lp1RRkrWesiJ3HGWt6PvCdHGzJjruEr
++3F1pPlewufVITdPwuKwJAEpelvzBdwWBej2Y/xjCWZ2+tskYaMyms0CafmTBmZ0L
+9PQv0A7vbLl2vNIQvuP+qVDk0nPgRLGrP+SyCx99f7QJBAJz8/LMTJpZxsesIJFqe
+E3fn6XTc7erciuJhsX+iKgKCgpXxe4qXOVUQ0EW2NmOit0ucSAtL7ov0I2vmZ2Qtg
+to=
-----END PRIVATE KEY-----
Modified: trunk/src/main/webapp/extensions/chromium/css/extension.css
===================================================================
--- trunk/src/main/webapp/extensions/chromium/css/extension.css 2011-01-05 17:40:08 UTC (rev 161)
+++ trunk/src/main/webapp/extensions/chromium/css/extension.css 2011-01-05 21:58:10 UTC (rev 162)
@@ -36,7 +36,7 @@
margin-bottom: 20px;
}
-button {
+input[type="button"] {
float: right;
background: url('/img/fdboutonV.jpg') repeat-x;
color: #FFFFFF;
@@ -48,14 +48,14 @@
}
.labels {
- margin-top: 5px;
+ margin-top: 10px;
}
.inputs {
width: 100%;
}
-input {
+input[type="text"] {
width: 100%;
}
Modified: trunk/src/main/webapp/extensions/chromium/css/options.css
===================================================================
--- trunk/src/main/webapp/extensions/chromium/css/options.css 2011-01-05 17:40:08 UTC (rev 161)
+++ trunk/src/main/webapp/extensions/chromium/css/options.css 2011-01-05 21:58:10 UTC (rev 162)
@@ -23,166 +23,139 @@
*/
@charset "utf-8";
/* CSS Document */
-*{
- padding:0;
- margin:0;
+* {
+ padding: 0;
+ margin: 0;
}
-body{
- font-size:10px;
- font-family:Verdana, Arial, Helvetica, sans-serif;
+body {
+ font-size: 10px;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
}
-.clearfix{
- height:1%;
+#wrap {
+ clear: both;
+ float: left;
+ overflow-x: hidden;
+ overflow-y: visible;
+ position: relative;
+ width: 100%;
+ background-color: #9EDCF8;
}
-.clearfix:after{
- content:".";
- height:0;
- line-height:0;
- display:block;
- visibility:hidden;
- clear:both;
+#footer {
+ background-color: #804561;
+ padding-top: 30px;
}
-#wrap{
- clear:both;
- float:left;
- overflow-x:hidden;
- overflow-y:visible;
- position:relative;
- width:100%;
- background-color:#9EDCF8;
+#footer a {
+ color: #bf8a9c;
}
-#main div[class="menu clearfix"] h2{
- color:#9edcf8;
- font-size:18px;
- font-weight:normal;
- float:left;
+#footer p {
+ font-size: 14px;
+ text-align: center;
+ line-height: 50px;
}
-#main .menu form{
- float:right;
- color:#9edcf8;
- font-size:12px;
+#header {
+ background: #FFFFFF url('/img/fondhead.jpg') repeat-x;
+ width: 100%;
+ float: left;
+ height: 100px;
+ clear: both;
+ margin: 0 auto;
+ position: relative;
}
-#footer{
- background-color:#804561;
- padding-top:30px;
+#header a.logo {
+ background: url('/img/logobow.jpg');
+ width: 290px;
+ height: 100px;
+ text-indent: -99999px;
+ display: block;
}
-#footer a{
- color:#bf8a9c;
-}
-
-#footer p{
- font-size:14px;
- text-align:center;
- line-height:50px;
-}
-
-#header{
- background:#FFFFFF url('/img/fondhead.jpg') repeat-x;
- width:100%;
- float:left;
- height:100px;
- clear:both;
- margin:0 auto;
+#main {
+ width: 1004px;
+ margin: 0 auto;
position: relative;
+ clear: both;
}
-#header a.logo{
- background:url('/img/logobow.jpg');
- width:290px;
- height:100px;
- text-indent:-99999px;
- display:block;
-}
-
-#main{
- width:1004px;
- margin:0 auto;
- position:relative;
- clear:both;
-}
-
-#main .menu{
- margin-top: 25px;
-}
-
#page {
- width:100%;
- margin:0 auto;
- clear:both;
+ width: 100%;
+ margin: 0 auto;
+ clear: both;
}
-#content{
- width:1004px;
- position:relative;
- margin:0 auto;
- padding-top:20px;
+#content {
+ width: 1004px;
+ position: relative;
+ margin: 0 auto;
+ padding-top: 20px;
}
-#formFrame{
- width:225px;
- height:315px;
- background:url('/img/fondconnexion.jpg') no-repeat;
- position:relative;
- margin:100px auto;
- padding:10px 70px;
+#formFrame {
+ width: 225px;
+ height: 315px;
+ background: url('/img/fondconnexion.jpg') no-repeat;
+ position: relative;
+ margin: 100px auto;
+ padding: 10px 70px;
}
-#formFrame h1{
- color:#804561;
- width:225px;
- position:relative;
- margin:15px auto;
+#formFrame h1 {
+ color: #804561;
+ width: 225px;
+ position: relative;
+ margin: 15px auto;
}
-#formFrame div div{
- color:#804561;
- font-size:16px;
- font-weight:bold;
- width:225px;
+#formFrame div div {
+ color: #804561;
+ font-size: 16px;
+ font-weight: bold;
+ width: 225px;
}
.label {
- margin-top:30px;
+ margin-top: 30px;
}
.buttons {
- margin-top:30px;
+ position: absolute;
+ top: 250px;
+ text-align: center;
}
-#formFrame input[type="text"]{
- width:225px;
+#formFrame input[type="text"] {
+ width: 225px;
}
-#formFrame a{
+#formFrame a {
position: absolute;
- color:#804561;
- left:75px;
- font-weight:bold;
+ color: #804561;
+ left: 75px;
+ font-weight: bold;
font-size: 12px;
}
-#formFrame #register{
- bottom:50px;
- font-size:14px;
+#formFrame .message {
+ width: 100%;
+ color: green;
+ font-size: 12px;
+ text-align: center;
+ margin-top: 30px;
}
-button {
- float:right;
- margin-top:20px;
- background:url('/img/fdboutonV.jpg') repeat-x;
- height:31px;
- color:#FFFFFF;
- font-weight:bold;
- border:none;
- width:auto;
+#formFrame input[type="button"] {
+ background: url('/img/fdboutonV.jpg') repeat-x;
+ height: 31px;
+ color: #FFFFFF;
+ font-weight: bold;
+ border: none;
+ width: auto;
padding: 5px;
- cursor:pointer;
+ cursor: pointer;
}
Modified: trunk/src/main/webapp/extensions/chromium/options.html
===================================================================
--- trunk/src/main/webapp/extensions/chromium/options.html 2011-01-05 17:40:08 UTC (rev 161)
+++ trunk/src/main/webapp/extensions/chromium/options.html 2011-01-05 21:58:10 UTC (rev 162)
@@ -45,10 +45,11 @@
var sessionTokenId = sessionTokenIdInput.value;
localStorage["sessionTokenId"] = sessionTokenId;
- alert(chrome.i18n.getMessage("optionSavedMessage"));
+ var formMessage = document.getElementById("formMessage");
+ formMessage.innerHTML = chrome.i18n.getMessage("optionSavedMessage");
}
- // Restores select box state to saved value from localStorage.
+ // Restores values from localStorage.
function restore_options() {
var permanentTokenId = localStorage["permanentTokenId"];
var sessionTokenId = localStorage["sessionTokenId"];
@@ -73,7 +74,7 @@
title.innerHTML = chrome.i18n.getMessage("optionTitle");
var saveOptionButton = document.getElementById("saveOptionButton");
- saveOptionButton.innerHTML = chrome.i18n.getMessage("saveOptionButton");
+ saveOptionButton.value = chrome.i18n.getMessage("saveOptionButton");
var licenseLink = document.getElementById("licenseLink");
licenseLink.innerHTML = chrome.i18n.getMessage("licenseLink");
@@ -117,8 +118,9 @@
<input type="text" name="permanentTokenIdInput" id="permanentTokenIdInput" />
</div>
<div class="buttons">
- <button type="button" id="saveOptionButton" onclick="save_options()"></button>
+ <input type="button" id="saveOptionButton" onclick="save_options()" />
</div>
+ <div class="message" id="formMessage"></div>
</div>
</div>
</div>
@@ -126,7 +128,7 @@
</div>
<div id="footer">
<p>
- <a shape="rect" id="bow_website" href="#">bow</a>
+ <a shape="rect" id="bow_website" href="#" target="_blank">bow</a>
<a shape="rect" href="http://www.chorem.org/projects/list_files/bow">0.3-SNAPSHOT</a> -
<a shape="rect" href="http://www.gnu.org/licenses/agpl.html" id="licenseLink"></a> -
<span title="Copyright">©2010 - 2011</span>
Modified: trunk/src/main/webapp/extensions/chromium/popup.html
===================================================================
--- trunk/src/main/webapp/extensions/chromium/popup.html 2011-01-05 17:40:08 UTC (rev 161)
+++ trunk/src/main/webapp/extensions/chromium/popup.html 2011-01-05 21:58:10 UTC (rev 162)
@@ -54,12 +54,15 @@
var tagsValue = tagsInput.value;
//BOW_URL is defined in properties.js
- var link = BOW_URL + "/bow?action=addUrl&token=" + tokenId + "&url=" + encodeURIComponent(url) + "&name=" + encodeURIComponent(nameValue) + "&alias=" + encodeURIComponent(aliasValue) + "&tags=" + encodeURIComponent(tagsValue);
+ var link = BOW_URL + "/bow?action=addUrl&token=" + tokenId
+ + "&url=" + encodeURIComponent(url)
+ + "&name=" + encodeURIComponent(nameValue)
+ + "&alias=" + encodeURIComponent(aliasValue)
+ + "&tags=" + encodeURIComponent(tagsValue);
- var script = document.createElement('script');
- script.src = link;
- script.type = 'text/javascript';
- document.body.appendChild(script);
+ var xhr = new XMLHttpRequest();
+ xhr.open("GET", link, true);
+ xhr.send();
};
function init() {
@@ -83,7 +86,7 @@
var sessionTokenId = localStorage["sessionTokenId"];
var sessionTokenButton = document.getElementById("sessionTokenButton");
if (!isEmpty(sessionTokenId)) {
- sessionTokenButton.innerHTML = chrome.i18n.getMessage("sessionTokenButton");
+ sessionTokenButton.value = chrome.i18n.getMessage("sessionTokenButton");
} else {
sessionTokenButton.style.visibility = "hidden";
}
@@ -91,7 +94,7 @@
var permanentTokenId = localStorage["permanentTokenId"];
var permanentTokenButton = document.getElementById("permanentTokenButton");
if (!isEmpty(permanentTokenId)) {
- permanentTokenButton.innerHTML = chrome.i18n.getMessage("permanentTokenButton");
+ permanentTokenButton.value = chrome.i18n.getMessage("permanentTokenButton");
} else {
permanentTokenButton.style.visibility = "hidden";
}
@@ -132,8 +135,8 @@
<input id="tagsInput" name="tagsInput" type="text" />
</div>
<div id="buttons">
- <button id="permanentTokenButton" onclick="bookmarkPermanent()" type="button"></button>
- <button id="sessionTokenButton" onclick="bookmarkSession()" type="button"></button>
+ <input id="permanentTokenButton" onclick="bookmarkPermanent()" type="button" />
+ <input id="sessionTokenButton" onclick="bookmarkSession()" type="button" />
</div>
</body>
</html>
1
0
05 Jan '11
Author: kmorin
Date: 2011-01-05 18:40:08 +0100 (Wed, 05 Jan 2011)
New Revision: 161
Url: http://chorem.org/repositories/revision/bow/161
Log:
- layout
Modified:
trunk/src/main/webapp/extensions/bow4chromium.crx
trunk/src/main/webapp/extensions/bow4chromium.pem
trunk/src/main/webapp/extensions/chromium/css/extension.css
Modified: trunk/src/main/webapp/extensions/bow4chromium.crx
===================================================================
(Binary files differ)
Modified: trunk/src/main/webapp/extensions/bow4chromium.pem
===================================================================
--- trunk/src/main/webapp/extensions/bow4chromium.pem 2011-01-05 13:08:40 UTC (rev 160)
+++ trunk/src/main/webapp/extensions/bow4chromium.pem 2011-01-05 17:40:08 UTC (rev 161)
@@ -1,16 +1,16 @@
-----BEGIN PRIVATE KEY-----
-MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBALrlCv8Iof1JnkgI3
-RNY5wkX+sCmrNetsMlkFZPmlmrvzkpiF4yz9ND5SL+DkfJ1z2cNQ0OcYE47IOrPac
-HLKDeArqp1L2pWNXStYNyvEgYeeIiLgOa7MsxgZHEDKssQ/hCSaenFTi4ny2exrS/
-hRDZLZc4q4SDKhkW77qdBzTFrAgMBAAECgYBDA1uFBMhotJvvglYa2NbGmPWNXHY/
-Q4VPQPbHuHeY0nGqlC+TgPc4cxoVqYyMXpfGgKfst0aE5oiwCT0HgtvhJaWiYLoIN
-FIx2fo6l2vh5yoBGsoCEeVddIpsLVE+vLmmlTexrpOH/IpjZQwGO0TWE71PjtXpWD
-P+DL2FpJH2qQJBAOoxfWjaqGh3ZFMAiRY4lV+T8roGU5cTftSCgAr8xHdVkVdPgBA
-UTCXMBhJF3SPVvs0QjSZKnNpsd+cKp0I7jiUCQQDMTBZDxD+Q9s8r/9IR/IQMqrDv
-lrzNFbDFTn40AWctNBGPxNoWmyDPt6I1fJ47lY/V4nAiGxVfZBwbxa12uMRPAkEAh
-N1Q9fTfiGz72O871wSBEjmAgrNmJxbjZLMo65Ld74n3LB6pW/X4AZWPeDx0qojwd6
-zFN40rEexp1gVAQR5ClQJBAJHrfrOkhqqqPst0i70hGchaWsqmZfAuH/at2+KVZfa
-ZjDmeJw+iecsjpI6DlhmE+BmTBPi3U4qw3IrRpNZ5nm0CQQDousvMfCfh7kdSoaIt
-5WOajqt+FAF6AeMsc+Yg7Qeu4w7XkMOTQFqTMuVjLdnQQy6BxGfhuAnKxaXlBxJwM
-LzF
+MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAM7n867IJSfHF6egn
+sBS5kBR8rCwFbljqraMmTWY8tvZtUk6B7e0gZxMpoZy83NBbztqZMCrg1uu5Sjbes
+mfsWXQuXydapl4ROKN85MUsuaHy+TvO27Zso5GjswDo982cShioU3oidYw7ZQC/Pu
+FPmlzkzMfrIFqOA8S8lh7+XiZAgMBAAECgYAzFbfnvojV8mUXwSORDqbE2LbYAxHK
+DR6YJcyqHBJST8VfyBEhvVKG+bHf3j/XhB9nhxRLMc2j9GGmHdKKN4B/1jsJAR43L
+1ByYhp4L9ICjTGXrUz5ldl9bU3uuKIYeLaK6vKkmq+S7nlFKQDSv4X3uXEvCIZec/
+ESLcm9yiIBUQJBAO4r26CLVBTVKsg/Tmx9b7HHosyuUEv2zJzpo/SNztndpo1VOy2
+JVQC5U4IoV1BhI+q6za5oTo3rnIfTjsyoJyUCQQDeZPMEcmroUrDpvy4bhnI2idZZ
+F4H1vVmcbcxd/RCmQSYUTa2c9HyZdUxJG/dveExEkC58HP6ZSc2svb+TwrtlAkEAw
+8hXvUxrLMjiZ0PrArHGTFzwTdMI/Lj/EAnblh+wJ1XWIJ4sjE01C+hMZlUlGVURAl
+bW1wS1dmJ1BQ56d2/O5QJBAM/3LL3a1Rg9w4xCKDa7KfDQQq57ah9HmxXKI1M9BCX
+ERHy2CwT8J8xFQToYufD2WLPA9IdBgeAMgRXpNs5RSnUCQEAcKEx37eDto1LJPRh1
+nxyMzcgonNBSP2UtwGZdTeujM2KxBX4YMUuEz0u6fzlB+vD/ZM9af1IxYzDaH0mZc
+6c=
-----END PRIVATE KEY-----
Modified: trunk/src/main/webapp/extensions/chromium/css/extension.css
===================================================================
--- trunk/src/main/webapp/extensions/chromium/css/extension.css 2011-01-05 13:08:40 UTC (rev 160)
+++ trunk/src/main/webapp/extensions/chromium/css/extension.css 2011-01-05 17:40:08 UTC (rev 161)
@@ -19,28 +19,30 @@
* #L%
*/
body {
- width: 300px;
- font-size:14px;
- font-family:Verdana, Arial, Helvetica, sans-serif;
- font-weight:bold;
- background-color:#9EDCF8;
- color:#804561;
+ width: 330px;
+ height: 288px;
+ font-size: 12px;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-weight: bold;
+ background: #9EDCF8 url('/img/fondconnexion.jpg') no-repeat;
+ color: #804561;
padding: 5px 10px 5px 10px;
}
h1 {
- font-size:18px;
+ font-size: 18px;
width: 100%;
text-align: center;
+ margin-bottom: 20px;
}
button {
- float:right;
- background:url('/img/fdboutonV.jpg') repeat-x;
- color:#FFFFFF;
- font-weight:bold;
- border:none;
- width:auto;
+ float: right;
+ background: url('/img/fdboutonV.jpg') repeat-x;
+ color: #FFFFFF;
+ font-weight: bold;
+ border: none;
+ width: auto;
padding: 5px;
cursor: pointer;
}
@@ -59,7 +61,7 @@
#buttons {
width: 100%;
- margin-top: 10px;
+ margin-top: 30px;
height: 30px;
text-align: center;
text-color: red;
1
0
05 Jan '11
Author: kmorin
Date: 2011-01-05 14:08:40 +0100 (Wed, 05 Jan 2011)
New Revision: 160
Url: http://chorem.org/repositories/revision/bow/160
Log:
- forgot to externalize the logo link in the options
Modified:
trunk/src/main/webapp/extensions/bow4chromium.crx
trunk/src/main/webapp/extensions/bow4chromium.pem
trunk/src/main/webapp/extensions/chromium/options.html
Modified: trunk/src/main/webapp/extensions/bow4chromium.crx
===================================================================
(Binary files differ)
Modified: trunk/src/main/webapp/extensions/bow4chromium.pem
===================================================================
--- trunk/src/main/webapp/extensions/bow4chromium.pem 2011-01-05 13:01:02 UTC (rev 159)
+++ trunk/src/main/webapp/extensions/bow4chromium.pem 2011-01-05 13:08:40 UTC (rev 160)
@@ -1,16 +1,16 @@
-----BEGIN PRIVATE KEY-----
-MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBANbNmpzgPf3vX1821
-TD++YmnC0D82s7nZ4jDXiYgQWUbf/nr1scPQqdKKWAmemqt29WICDYXhyvbyG/o3P
-meM2rgxV75hRjlRgtkVzXyMGiVsj/4piNPEAMByuW9A7x3UMilMEy45sHyp62gd2t
-JE6firpD86gFXk0316N1k2NCBAgMBAAECgYAQhAiCTV+W2cPcf0vPE5u+MMDVw1tT
-k0lLo7Hmfo5opr+lSLPf5FV8pWAfC3ZYI3wGpAn1lsOG5MQ5jo8HBlnvlqT2MJmX6
-wcWD/4dx7YxLP0JyvPig48t4HBhSfQCZKASwO/6clM1Mj9XpQPB/sN+TP6h5ikaGB
-7Ya9xQrtn47QJBAPzX+iBVlO0T1+JevImu76GpW9EBF48YiqDBaoALB8/Hf9yDln3
-vjajjJlwiAElfdQHfgC/cfAo+YZ5xx9UDrxsCQQDZfA8qLYIB5j67N6KEZf5Ny0cE
-9k7jzITYaaqsA2hdpNn6++U1WA97ri4jmHp3rXBGa3Hlvk4ELWvSunkg8gyTAkA/6
-YAqaDeq7dcmO3hA/V1Jafvxiusfmr6AACQhlag112H0pbaGwuT2CeUKaPXVljGHda
-17a6pXFImseWpf5/x9AkB3RS733Y8vxXpfp+orm9e0CCgBk6a+DPpJyOE9hnzk5jR
-ZDW2tLIcJOAO7p7J6EZbCN8h1y0Dzz4kTPwqQw82bAkEAuVFyoPRwCMFJQ3UZGa5V
-LNgk8srKActA6D/YqEWvNyondvjjotwYIwS+II0VR6wbe+98JTZEhZ2iDBKsN2PP6
-A==
+MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBALrlCv8Iof1JnkgI3
+RNY5wkX+sCmrNetsMlkFZPmlmrvzkpiF4yz9ND5SL+DkfJ1z2cNQ0OcYE47IOrPac
+HLKDeArqp1L2pWNXStYNyvEgYeeIiLgOa7MsxgZHEDKssQ/hCSaenFTi4ny2exrS/
+hRDZLZc4q4SDKhkW77qdBzTFrAgMBAAECgYBDA1uFBMhotJvvglYa2NbGmPWNXHY/
+Q4VPQPbHuHeY0nGqlC+TgPc4cxoVqYyMXpfGgKfst0aE5oiwCT0HgtvhJaWiYLoIN
+FIx2fo6l2vh5yoBGsoCEeVddIpsLVE+vLmmlTexrpOH/IpjZQwGO0TWE71PjtXpWD
+P+DL2FpJH2qQJBAOoxfWjaqGh3ZFMAiRY4lV+T8roGU5cTftSCgAr8xHdVkVdPgBA
+UTCXMBhJF3SPVvs0QjSZKnNpsd+cKp0I7jiUCQQDMTBZDxD+Q9s8r/9IR/IQMqrDv
+lrzNFbDFTn40AWctNBGPxNoWmyDPt6I1fJ47lY/V4nAiGxVfZBwbxa12uMRPAkEAh
+N1Q9fTfiGz72O871wSBEjmAgrNmJxbjZLMo65Ld74n3LB6pW/X4AZWPeDx0qojwd6
+zFN40rEexp1gVAQR5ClQJBAJHrfrOkhqqqPst0i70hGchaWsqmZfAuH/at2+KVZfa
+ZjDmeJw+iecsjpI6DlhmE+BmTBPi3U4qw3IrRpNZ5nm0CQQDousvMfCfh7kdSoaIt
+5WOajqt+FAF6AeMsc+Yg7Qeu4w7XkMOTQFqTMuVjLdnQQy6BxGfhuAnKxaXlBxJwM
+LzF
-----END PRIVATE KEY-----
Modified: trunk/src/main/webapp/extensions/chromium/options.html
===================================================================
--- trunk/src/main/webapp/extensions/chromium/options.html 2011-01-05 13:01:02 UTC (rev 159)
+++ trunk/src/main/webapp/extensions/chromium/options.html 2011-01-05 13:08:40 UTC (rev 160)
@@ -86,6 +86,9 @@
var bow_website_link = document.links["bow_website"];
bow_website_link.href = BOW_URL;
+
+ var bow_logo_link = document.links["bow_logo"];
+ bow_logo_link.href = BOW_URL;
}
//-->
</script>
@@ -94,7 +97,7 @@
<div id="wrap">
<div id="page">
<div id="header">
- <a class="logo" href="http://bow.chorem.org">bow</a>
+ <a class="logo" id="bow_logo" href="#">bow</a>
</div>
<div id="main">
<div id="content">
1
0
Author: kmorin
Date: 2011-01-05 14:01:02 +0100 (Wed, 05 Jan 2011)
New Revision: 159
Url: http://chorem.org/repositories/revision/bow/159
Log:
- update extension
Modified:
trunk/src/main/webapp/extensions/bow4chromium.crx
trunk/src/main/webapp/extensions/bow4chromium.pem
Modified: trunk/src/main/webapp/extensions/bow4chromium.crx
===================================================================
(Binary files differ)
Modified: trunk/src/main/webapp/extensions/bow4chromium.pem
===================================================================
--- trunk/src/main/webapp/extensions/bow4chromium.pem 2011-01-05 12:59:32 UTC (rev 158)
+++ trunk/src/main/webapp/extensions/bow4chromium.pem 2011-01-05 13:01:02 UTC (rev 159)
@@ -1,16 +1,16 @@
-----BEGIN PRIVATE KEY-----
-MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJjmILwD7CIl3TGVv
-uILgGeyqBAI4eKv5jTWm481o1l1d3rcZgf1dpcXPkDTaEs/EcKAN8RG2c5R9dY6h5
-im2R4ERH1CqWJwfdpg7nwnuFFtlkAvzNLruUe5C15dg9yexnRYR35i/5ihJp0iwEx
-ZEfwYWNH5YI7i9x2heTV8U1HLAgMBAAECgYAwiKQNamVTNZev/KuZzzLUN9a3OEqT
-jWhSj2jTnaAbbnkdq8ZLcnRRY5RkOXcao4t8pPyOtjq/Di8t8GhIYXX7Xp01BXpM3
-11R1a8oz5IAOiCAyiOWZ7g5Y4mNSmarzKrZjha/00DgMfILRT1rSKo8t7+MjBt7on
-y3UKzkLS/AmQJBAMgMMw8IunMgYE+vmKblauSLghD4BATmV0qmRQItsQaxpL56WAP
-kN+TBNM8V+YpwCdS+L0ej4CLiKe+oY72ufbcCQQDDqf0b5dX02Np/GcSYFZa62OrC
-JplUiSnzt8wDwYACLMe2pIdz7qcUKLMkr2Y8twWMMYCfmQXzTpuK4JKdSIyNAkB72
-LmffBrZ/VhC3QYXhP55QTkjwjfSxLuT9n3QjHMFHuNMHTfyKM7FqytDbWpQ323mrF
-te8cBoODYYLdqZ6rXfAkAuaQ7BZEXYuuswxLLuBAjprvQYM0GhXJuX1JvOtEIhwe9
-pMiNy60O0M2cyp2wPsLXfKArDUG+p45ZfXZ9JMWEtAkEAkIKZtSUxsHy+uYxXK2mi
-DeZYNKk51vfP7/cVM8b6o47A/kxFLk4eRV3BjVzDLRb/tV+L5436jTOkmIHUnjNHP
+MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBANbNmpzgPf3vX1821
+TD++YmnC0D82s7nZ4jDXiYgQWUbf/nr1scPQqdKKWAmemqt29WICDYXhyvbyG/o3P
+meM2rgxV75hRjlRgtkVzXyMGiVsj/4piNPEAMByuW9A7x3UMilMEy45sHyp62gd2t
+JE6firpD86gFXk0316N1k2NCBAgMBAAECgYAQhAiCTV+W2cPcf0vPE5u+MMDVw1tT
+k0lLo7Hmfo5opr+lSLPf5FV8pWAfC3ZYI3wGpAn1lsOG5MQ5jo8HBlnvlqT2MJmX6
+wcWD/4dx7YxLP0JyvPig48t4HBhSfQCZKASwO/6clM1Mj9XpQPB/sN+TP6h5ikaGB
+7Ya9xQrtn47QJBAPzX+iBVlO0T1+JevImu76GpW9EBF48YiqDBaoALB8/Hf9yDln3
+vjajjJlwiAElfdQHfgC/cfAo+YZ5xx9UDrxsCQQDZfA8qLYIB5j67N6KEZf5Ny0cE
+9k7jzITYaaqsA2hdpNn6++U1WA97ri4jmHp3rXBGa3Hlvk4ELWvSunkg8gyTAkA/6
+YAqaDeq7dcmO3hA/V1Jafvxiusfmr6AACQhlag112H0pbaGwuT2CeUKaPXVljGHda
+17a6pXFImseWpf5/x9AkB3RS733Y8vxXpfp+orm9e0CCgBk6a+DPpJyOE9hnzk5jR
+ZDW2tLIcJOAO7p7J6EZbCN8h1y0Dzz4kTPwqQw82bAkEAuVFyoPRwCMFJQ3UZGa5V
+LNgk8srKActA6D/YqEWvNyondvjjotwYIwS+II0VR6wbe+98JTZEhZ2iDBKsN2PP6
A==
-----END PRIVATE KEY-----
1
0
r158 - in trunk/src/main/webapp/extensions/chromium: . css img
by kmorin@users.chorem.org 05 Jan '11
by kmorin@users.chorem.org 05 Jan '11
05 Jan '11
Author: kmorin
Date: 2011-01-05 13:59:32 +0100 (Wed, 05 Jan 2011)
New Revision: 158
Url: http://chorem.org/repositories/revision/bow/158
Log:
- extract bow website url to be able to change it more easily
- put files in repertories
Added:
trunk/src/main/webapp/extensions/chromium/css/
trunk/src/main/webapp/extensions/chromium/css/extension.css
trunk/src/main/webapp/extensions/chromium/css/options.css
trunk/src/main/webapp/extensions/chromium/img/
trunk/src/main/webapp/extensions/chromium/img/favicon.png
trunk/src/main/webapp/extensions/chromium/img/fdboutonV.jpg
trunk/src/main/webapp/extensions/chromium/img/fondconnexion.jpg
trunk/src/main/webapp/extensions/chromium/img/fondhead.jpg
trunk/src/main/webapp/extensions/chromium/img/logobow.jpg
trunk/src/main/webapp/extensions/chromium/img/moyen-livre.jpg
trunk/src/main/webapp/extensions/chromium/img/ptit-livre.jpg
trunk/src/main/webapp/extensions/chromium/properties.js
Removed:
trunk/src/main/webapp/extensions/chromium/bow.crx
trunk/src/main/webapp/extensions/chromium/favicon.png
trunk/src/main/webapp/extensions/chromium/fdboutonV.jpg
trunk/src/main/webapp/extensions/chromium/fondconnexion.jpg
trunk/src/main/webapp/extensions/chromium/fondhead.jpg
trunk/src/main/webapp/extensions/chromium/logobow.jpg
trunk/src/main/webapp/extensions/chromium/moyen-livre.jpg
trunk/src/main/webapp/extensions/chromium/options.css
trunk/src/main/webapp/extensions/chromium/ptit-livre.jpg
Modified:
trunk/src/main/webapp/extensions/chromium/manifest.json
trunk/src/main/webapp/extensions/chromium/options.html
trunk/src/main/webapp/extensions/chromium/popup.html
Deleted: trunk/src/main/webapp/extensions/chromium/bow.crx
===================================================================
(Binary files differ)
Added: trunk/src/main/webapp/extensions/chromium/css/extension.css
===================================================================
--- trunk/src/main/webapp/extensions/chromium/css/extension.css (rev 0)
+++ trunk/src/main/webapp/extensions/chromium/css/extension.css 2011-01-05 12:59:32 UTC (rev 158)
@@ -0,0 +1,66 @@
+/*
+ * #%L
+ * bow
+ * %%
+ * Copyright (C) 2010 - 2011 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+body {
+ width: 300px;
+ font-size:14px;
+ font-family:Verdana, Arial, Helvetica, sans-serif;
+ font-weight:bold;
+ background-color:#9EDCF8;
+ color:#804561;
+ padding: 5px 10px 5px 10px;
+}
+
+h1 {
+ font-size:18px;
+ width: 100%;
+ text-align: center;
+}
+
+button {
+ float:right;
+ background:url('/img/fdboutonV.jpg') repeat-x;
+ color:#FFFFFF;
+ font-weight:bold;
+ border:none;
+ width:auto;
+ padding: 5px;
+ cursor: pointer;
+}
+
+.labels {
+ margin-top: 5px;
+}
+
+.inputs {
+ width: 100%;
+}
+
+input {
+ width: 100%;
+}
+
+#buttons {
+ width: 100%;
+ margin-top: 10px;
+ height: 30px;
+ text-align: center;
+ text-color: red;
+}
Added: trunk/src/main/webapp/extensions/chromium/css/options.css
===================================================================
--- trunk/src/main/webapp/extensions/chromium/css/options.css (rev 0)
+++ trunk/src/main/webapp/extensions/chromium/css/options.css 2011-01-05 12:59:32 UTC (rev 158)
@@ -0,0 +1,188 @@
+/*
+ * #%L
+ * bow
+ *
+ * $Id: options.css 144 2010-12-23 10:24:48Z bpoussin $
+ * $HeadURL: http://svn.chorem.org/svn/bow/trunk/src/main/webapp/extensions/chromium/opt… $
+ * %%
+ * Copyright (C) 2010 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+@charset "utf-8";
+/* CSS Document */
+*{
+ padding:0;
+ margin:0;
+}
+
+body{
+ font-size:10px;
+ font-family:Verdana, Arial, Helvetica, sans-serif;
+}
+
+.clearfix{
+ height:1%;
+}
+
+.clearfix:after{
+ content:".";
+ height:0;
+ line-height:0;
+ display:block;
+ visibility:hidden;
+ clear:both;
+}
+
+#wrap{
+ clear:both;
+ float:left;
+ overflow-x:hidden;
+ overflow-y:visible;
+ position:relative;
+ width:100%;
+ background-color:#9EDCF8;
+}
+
+#main div[class="menu clearfix"] h2{
+ color:#9edcf8;
+ font-size:18px;
+ font-weight:normal;
+ float:left;
+}
+
+#main .menu form{
+ float:right;
+ color:#9edcf8;
+ font-size:12px;
+}
+
+#footer{
+ background-color:#804561;
+ padding-top:30px;
+}
+
+#footer a{
+ color:#bf8a9c;
+}
+
+#footer p{
+ font-size:14px;
+ text-align:center;
+ line-height:50px;
+}
+
+#header{
+ background:#FFFFFF url('/img/fondhead.jpg') repeat-x;
+ width:100%;
+ float:left;
+ height:100px;
+ clear:both;
+ margin:0 auto;
+ position: relative;
+}
+
+#header a.logo{
+ background:url('/img/logobow.jpg');
+ width:290px;
+ height:100px;
+ text-indent:-99999px;
+ display:block;
+}
+
+#main{
+ width:1004px;
+ margin:0 auto;
+ position:relative;
+ clear:both;
+}
+
+#main .menu{
+ margin-top: 25px;
+}
+
+#page {
+ width:100%;
+ margin:0 auto;
+ clear:both;
+}
+
+#content{
+ width:1004px;
+ position:relative;
+ margin:0 auto;
+ padding-top:20px;
+}
+
+#formFrame{
+ width:225px;
+ height:315px;
+ background:url('/img/fondconnexion.jpg') no-repeat;
+ position:relative;
+ margin:100px auto;
+ padding:10px 70px;
+}
+
+#formFrame h1{
+ color:#804561;
+ width:225px;
+ position:relative;
+ margin:15px auto;
+}
+
+#formFrame div div{
+ color:#804561;
+ font-size:16px;
+ font-weight:bold;
+ width:225px;
+}
+
+.label {
+ margin-top:30px;
+}
+
+.buttons {
+ margin-top:30px;
+}
+
+#formFrame input[type="text"]{
+ width:225px;
+}
+
+#formFrame a{
+ position: absolute;
+ color:#804561;
+ left:75px;
+ font-weight:bold;
+ font-size: 12px;
+}
+
+#formFrame #register{
+ bottom:50px;
+ font-size:14px;
+}
+
+button {
+ float:right;
+ margin-top:20px;
+ background:url('/img/fdboutonV.jpg') repeat-x;
+ height:31px;
+ color:#FFFFFF;
+ font-weight:bold;
+ border:none;
+ width:auto;
+ padding: 5px;
+ cursor:pointer;
+}
Deleted: trunk/src/main/webapp/extensions/chromium/favicon.png
===================================================================
(Binary files differ)
Deleted: trunk/src/main/webapp/extensions/chromium/fdboutonV.jpg
===================================================================
(Binary files differ)
Deleted: trunk/src/main/webapp/extensions/chromium/fondconnexion.jpg
===================================================================
(Binary files differ)
Deleted: trunk/src/main/webapp/extensions/chromium/fondhead.jpg
===================================================================
(Binary files differ)
Added: trunk/src/main/webapp/extensions/chromium/img/favicon.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/extensions/chromium/img/favicon.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/webapp/extensions/chromium/img/fdboutonV.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/extensions/chromium/img/fdboutonV.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/webapp/extensions/chromium/img/fondconnexion.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/extensions/chromium/img/fondconnexion.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/webapp/extensions/chromium/img/fondhead.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/extensions/chromium/img/fondhead.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/webapp/extensions/chromium/img/logobow.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/extensions/chromium/img/logobow.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/webapp/extensions/chromium/img/moyen-livre.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/extensions/chromium/img/moyen-livre.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/webapp/extensions/chromium/img/ptit-livre.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/webapp/extensions/chromium/img/ptit-livre.jpg
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Deleted: trunk/src/main/webapp/extensions/chromium/logobow.jpg
===================================================================
(Binary files differ)
Modified: trunk/src/main/webapp/extensions/chromium/manifest.json
===================================================================
--- trunk/src/main/webapp/extensions/chromium/manifest.json 2011-01-03 10:17:10 UTC (rev 157)
+++ trunk/src/main/webapp/extensions/chromium/manifest.json 2011-01-05 12:59:32 UTC (rev 158)
@@ -4,13 +4,13 @@
"default_locale": "en",
"description": "__MSG_extensionDescription__",
- "icons": { "16": "ptit-livre.jpg",
- "48": "moyen-livre.jpg",
- "128": "moyen-livre.jpg" },
+ "icons": { "16": "img/ptit-livre.jpg",
+ "48": "img/moyen-livre.jpg",
+ "128": "img/moyen-livre.jpg" },
"page_action": {
"default_title": "__MSG_actionTitle__",
- "default_icon": "favicon.png",
+ "default_icon": "img/favicon.png",
"default_popup": "popup.html"
},
@@ -18,6 +18,6 @@
"options_page": "options.html",
"homepage_url": "http://www.codelutin.com",
"permissions": [
- "tabs", "http://*/*", "https://*/*"
+ "tabs", "http://bow.chorem.org/bow/*"
]
}
Deleted: trunk/src/main/webapp/extensions/chromium/moyen-livre.jpg
===================================================================
(Binary files differ)
Deleted: trunk/src/main/webapp/extensions/chromium/options.css
===================================================================
--- trunk/src/main/webapp/extensions/chromium/options.css 2011-01-03 10:17:10 UTC (rev 157)
+++ trunk/src/main/webapp/extensions/chromium/options.css 2011-01-05 12:59:32 UTC (rev 158)
@@ -1,188 +0,0 @@
-/*
- * #%L
- * bow
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2010 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-@charset "utf-8";
-/* CSS Document */
-*{
- padding:0;
- margin:0;
-}
-
-body{
- font-size:10px;
- font-family:Verdana, Arial, Helvetica, sans-serif;
-}
-
-.clearfix{
- height:1%;
-}
-
-.clearfix:after{
- content:".";
- height:0;
- line-height:0;
- display:block;
- visibility:hidden;
- clear:both;
-}
-
-#wrap{
- clear:both;
- float:left;
- overflow-x:hidden;
- overflow-y:visible;
- position:relative;
- width:100%;
- background-color:#9EDCF8;
-}
-
-#main div[class="menu clearfix"] h2{
- color:#9edcf8;
- font-size:18px;
- font-weight:normal;
- float:left;
-}
-
-#main .menu form{
- float:right;
- color:#9edcf8;
- font-size:12px;
-}
-
-#footer{
- background-color:#804561;
- padding-top:30px;
-}
-
-#footer a{
- color:#bf8a9c;
-}
-
-#footer p{
- font-size:14px;
- text-align:center;
- line-height:50px;
-}
-
-#header{
- background:#FFFFFF url('fondhead.jpg') repeat-x;
- width:100%;
- float:left;
- height:100px;
- clear:both;
- margin:0 auto;
- position: relative;
-}
-
-#header a.logo{
- background:url(logobow.jpg);
- width:290px;
- height:100px;
- text-indent:-99999px;
- display:block;
-}
-
-#main{
- width:1004px;
- margin:0 auto;
- position:relative;
- clear:both;
-}
-
-#main .menu{
- margin-top: 25px;
-}
-
-#page {
- width:100%;
- margin:0 auto;
- clear:both;
-}
-
-#content{
- width:1004px;
- position:relative;
- margin:0 auto;
- padding-top:20px;
-}
-
-#formFrame{
- width:225px;
- height:315px;
- background:url('fondconnexion.jpg') no-repeat;
- position:relative;
- margin:100px auto;
- padding:10px 70px;
-}
-
-#formFrame h1{
- color:#804561;
- width:225px;
- position:relative;
- margin:15px auto;
-}
-
-#formFrame div div{
- color:#804561;
- font-size:16px;
- font-weight:bold;
- width:225px;
-}
-
-.label {
- margin-top:30px;
-}
-
-.buttons {
- margin-top:30px;
-}
-
-#formFrame input[type="text"]{
- width:225px;
-}
-
-#formFrame a{
- position: absolute;
- color:#804561;
- left:75px;
- font-weight:bold;
- font-size: 12px;
-}
-
-#formFrame #register{
- bottom:50px;
- font-size:14px;
-}
-
-button {
- float:right;
- margin-top:20px;
- background:url('fdboutonV.jpg') repeat-x;
- height:31px;
- color:#FFFFFF;
- font-weight:bold;
- border:none;
- width:auto;
- padding: 5px;
- cursor:pointer;
-}
Modified: trunk/src/main/webapp/extensions/chromium/options.html
===================================================================
--- trunk/src/main/webapp/extensions/chromium/options.html 2011-01-03 10:17:10 UTC (rev 157)
+++ trunk/src/main/webapp/extensions/chromium/options.html 2011-01-05 12:59:32 UTC (rev 158)
@@ -26,9 +26,13 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="description" content="Bookmarks On the Web" />
+
<title>BOW Extension Options</title>
- <link rel="icon" type="image/png" href="favicon.png" />
- <link rel="stylesheet" type="text/css" href="options.css" />
+
+ <link rel="icon" type="image/png" href="img/favicon.png" />
+ <link rel="stylesheet" type="text/css" href="css/options.css" />
+
+ <script type="text/javascript" src="properties.js"></script>
<script type="text/javascript">
<!--
// Saves options to localStorage.
@@ -80,6 +84,8 @@
var userSupport = document.getElementById("userSupport");
userSupport.innerHTML = chrome.i18n.getMessage("userSupport");
+ var bow_website_link = document.links["bow_website"];
+ bow_website_link.href = BOW_URL;
}
//-->
</script>
@@ -117,10 +123,10 @@
</div>
<div id="footer">
<p>
- <a shape="rect" href="http://localhost:8080/bow/bow">bow</a>
+ <a shape="rect" id="bow_website" href="#">bow</a>
<a shape="rect" href="http://www.chorem.org/projects/list_files/bow">0.3-SNAPSHOT</a> -
<a shape="rect" href="http://www.gnu.org/licenses/agpl.html" id="licenseLink"></a> -
- <span title="Copyright">©2010</span>
+ <span title="Copyright">©2010 - 2011</span>
<a shape="rect" href="http://www.codelutin.com">Code Lutin</a> -
<a shape="rect" href="http://www.chorem.org/projects/bow/issues" id="bugReport"></a> -
<a shape="rect" href="http://list.chorem.org/cgi-bin/mailman/listinfo/bow-users" id="userSupport"></a>
Modified: trunk/src/main/webapp/extensions/chromium/popup.html
===================================================================
--- trunk/src/main/webapp/extensions/chromium/popup.html 2011-01-03 10:17:10 UTC (rev 157)
+++ trunk/src/main/webapp/extensions/chromium/popup.html 2011-01-05 12:59:32 UTC (rev 158)
@@ -23,6 +23,7 @@
-->
<html>
<head>
+ <script type="text/javascript" src="properties.js"></script>
<script>
function bookmarkPermanent() {
@@ -52,11 +53,12 @@
var tagsInput = document.getElementById("tagsInput");
var tagsValue = tagsInput.value;
- var link = "http://bow.chorem.org/bow/bow?action=addUrl&token=" + tokenId + "&url=" + encodeURIComponent(url) + "&name=" + encodeURIComponent(nameValue) + "&alias=" + encodeURIComponent(aliasValue) + "&tags=" + encodeURIComponent(tagsValue);
+ //BOW_URL is defined in properties.js
+ var link = BOW_URL + "/bow?action=addUrl&token=" + tokenId + "&url=" + encodeURIComponent(url) + "&name=" + encodeURIComponent(nameValue) + "&alias=" + encodeURIComponent(aliasValue) + "&tags=" + encodeURIComponent(tagsValue);
- var script=document.createElement('script');
- script.src=link;
- script.type='text/javascript';
+ var script = document.createElement('script');
+ script.src = link;
+ script.type = 'text/javascript';
document.body.appendChild(script);
};
@@ -105,55 +107,9 @@
}
</script>
- <style>
- body {
- width: 300px;
- font-size:14px;
- font-family:Verdana, Arial, Helvetica, sans-serif;
- font-weight:bold;
- background-color:#9EDCF8;
- color:#804561;
- padding: 5px 10px 5px 10px;
- }
-
- h1 {
- font-size:18px;
- width: 100%;
- text-align: center;
- }
-
- button {
- float:right;
- background:url('fdboutonV.jpg') repeat-x;
- color:#FFFFFF;
- font-weight:bold;
- border:none;
- width:auto;
- padding: 5px;
- cursor: pointer;
- }
-
- .labels {
- margin-top: 5px;
- }
-
- .inputs {
- width: 100%;
- }
-
- input {
- width: 100%;
- }
-
- #buttons {
- width: 100%;
- margin-top: 10px;
- height: 30px;
- text-align: center;
- text-color: red;
- }
-
- </style>
+
+ <link rel="stylesheet" type="text/css" href="css/extension.css" />
+
</head>
<body onLoad="init()">
<h1 id="title"></h1>
Added: trunk/src/main/webapp/extensions/chromium/properties.js
===================================================================
--- trunk/src/main/webapp/extensions/chromium/properties.js (rev 0)
+++ trunk/src/main/webapp/extensions/chromium/properties.js 2011-01-05 12:59:32 UTC (rev 158)
@@ -0,0 +1 @@
+var BOW_URL = "http://bow.chorem.org/bow";
Deleted: trunk/src/main/webapp/extensions/chromium/ptit-livre.jpg
===================================================================
(Binary files differ)
1
0
Author: kmorin
Date: 2011-01-03 11:17:10 +0100 (Mon, 03 Jan 2011)
New Revision: 157
Url: http://chorem.org/repositories/revision/bow/157
Log:
- add chromium extension doc
Modified:
trunk/src/site/rst/index.rst
trunk/src/site/rst/user/addBookmark.rst
trunk/src/site/site.xml
Modified: trunk/src/site/rst/index.rst
===================================================================
--- trunk/src/site/rst/index.rst 2010-12-31 16:27:15 UTC (rev 156)
+++ trunk/src/site/rst/index.rst 2011-01-03 10:17:10 UTC (rev 157)
@@ -69,5 +69,5 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comme on n'a pas forcément envie de s'identifier dans Bow pour rajouter un
-marque-page, il est possible de marquer un lien dans son navigateur qui ajoute
-la page consultée dans Bow avec les tags définis.
\ No newline at end of file
+marque-page, il est possible de marquer un lien dans son navigateur, ou pour ceux qui utilisent Chromium, d'installe une extension, qui ajoute
+la page consultée dans Bow avec les tags définis.
Modified: trunk/src/site/rst/user/addBookmark.rst
===================================================================
--- trunk/src/site/rst/user/addBookmark.rst 2010-12-31 16:27:15 UTC (rev 156)
+++ trunk/src/site/rst/user/addBookmark.rst 2011-01-03 10:17:10 UTC (rev 157)
@@ -55,3 +55,18 @@
Nom du marque-page|tag1 tag2 tag3
Une fois que vous avez validé, le marque-page est enregistré.
+
+Extension Chromium
+------------------
+
+Pour les utilisateurs de Chromium, il est possible d'installer une extension dans votre navigateur. Cette extension est disponible dans le menu de droite.
+
+Il suffit ensuite de remplir dans les options, soit le token de session (qui n'est valide que tant que vous êtes identifiés sur le site) ou le token permanent.
+
+Pour ajouter une page dans vos marques-page Bow, cliquez sur l'icone de Bow dans la barre d'adresse de votre navigateur à droite. Remplissez les champs dans la popup :
+
+- le titre que vous voulez donner au marque-page
+- l'alias que vous voulez associer au marque-page
+- les tags que vous voulez associer au marque-page
+
+Pour enregistrer le marque-page, validez le formulaire en cliquant sur le bouton correspondant au token que vous souhaitez utiliser (permanent ou de session).
Modified: trunk/src/site/site.xml
===================================================================
--- trunk/src/site/site.xml 2010-12-31 16:27:15 UTC (rev 156)
+++ trunk/src/site/site.xml 2011-01-03 10:17:10 UTC (rev 157)
@@ -43,7 +43,7 @@
<item name="Préférences" href="user/preferences.html" />
</menu>
- <menu name="Utilisateur">
+ <menu name="Développeur">
<item name="Presentation" href="developper/presentation.html" />
<item name="Installation" href="developper/installation.html" />
</menu>
1
0
r156 - in trunk/src/main/webapp: WEB-INF/decorators jsp jsp/inc
by vbriand@users.chorem.org 31 Dec '10
by vbriand@users.chorem.org 31 Dec '10
31 Dec '10
Author: vbriand
Date: 2010-12-31 17:27:15 +0100 (Fri, 31 Dec 2010)
New Revision: 156
Url: http://chorem.org/repositories/revision/bow/156
Log:
Nouvelles modifications pour i18n
Modified:
trunk/src/main/webapp/WEB-INF/decorators/main.jsp
trunk/src/main/webapp/jsp/home.jsp
trunk/src/main/webapp/jsp/inc/rightMenu.jsp
Modified: trunk/src/main/webapp/WEB-INF/decorators/main.jsp
===================================================================
--- trunk/src/main/webapp/WEB-INF/decorators/main.jsp 2010-12-31 15:48:49 UTC (rev 155)
+++ trunk/src/main/webapp/WEB-INF/decorators/main.jsp 2010-12-31 16:27:15 UTC (rev 156)
@@ -7,13 +7,17 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title><decorator:title default="Bow" /></title>
+ <title>Bow : <decorator:title default="Bow" /></title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="description" content="Bookmarks on the web" />
- <link rel="search" type="application/opensearchdescription+xml" title="bowTemporarySearchEngine" href="?action=temporaryXml" />
- <link rel="search" type="application/opensearchdescription+xml" title="bowPermanentSearchEngine" href="?action=permanentXml" />
- <link href="<s:url value='/css/global.css'/>" rel="stylesheet" type="text/css" media="all" />
- <script type="text/javascript" src="<s:url value='/js/bookmark.js' />"></script>
+ <s:url id="temporaryXml" action="temporaryXml" />
+ <s:url id="permanentXml" action="permanentXml" />
+ <link rel="search" type="application/opensearchdescription+xml" title="bowTemporarySearchEngine" href="${temporaryXml}" />
+ <link rel="search" type="application/opensearchdescription+xml" title="bowPermanentSearchEngine" href="${permanentXml}" />
+ <s:url id="globalCSS" value="/css/global.css" />
+ <link href="${globalCSS}" rel="stylesheet" type="text/css" media="all" />
+ <s:url id="bookmarkJS" value="/js/bookmark.js" />
+ <script type="text/javascript" src="${bookmarkJS}"></script>
<decorator:head />
</head>
<body id="page-home">
Modified: trunk/src/main/webapp/jsp/home.jsp
===================================================================
--- trunk/src/main/webapp/jsp/home.jsp 2010-12-31 15:48:49 UTC (rev 155)
+++ trunk/src/main/webapp/jsp/home.jsp 2010-12-31 16:27:15 UTC (rev 156)
@@ -49,7 +49,7 @@
</head>
<body>
<div class="menu clearfix">
- <h2><s:property value="%{getText('mostUsedBookmarks')}" /></h2>
+ <h2><s:text name="bow.home.mostUsedBookmarks" /></h2>
</div>
<div class="content">
<%
@@ -75,12 +75,12 @@
}
}
else { %>
- <p class="nobookmarks"><s:property value="%{getText('noBookmarks')}" /></p><s:set var="formAction" value="%{formAction}" />
+ <p class="nobookmarks"><s:text name="bow.home.noBookmarks" /></p>
<% } %>
</div>
<div class="menu clearfix">
- <h2><s:property value="%{getText('latestBookmarks')}" /></h2>
+ <h2><s:text name="bow.home.latestBookmarks" /></h2>
</div>
<div class="content">
<%
@@ -101,7 +101,7 @@
}
}
else { %>
- <p class="nobookmarks"><s:property value="%{getText('noBookmarks')}" /></p>
+ <p class="nobookmarks"><s:text name="bow.home.noBookmarks" /></p>
<% } %>
</div>
<jsp:include page="/jsp/inc/rightMenu.jsp" />
Modified: trunk/src/main/webapp/jsp/inc/rightMenu.jsp
===================================================================
--- trunk/src/main/webapp/jsp/inc/rightMenu.jsp 2010-12-31 15:48:49 UTC (rev 155)
+++ trunk/src/main/webapp/jsp/inc/rightMenu.jsp 2010-12-31 16:27:15 UTC (rev 156)
@@ -81,39 +81,39 @@
xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <s:form action="/bow/logout.action">
+ <s:form action="logout">
<div class="input">
- <s:submit value="%{getText('logout')}" />
+ <s:submit name="bow.rightMenu.logout" />
</div>
</s:form>
- <a href="http://maven-site.chorem.org/bow/" class="help" target="_blank"><s:property value="%{getText('help')}" /></a>
+ <a href="http://maven-site.chorem.org/bow/" class="help" target="_blank"><s:text name="bow.rightMenu.help" /></a>
</div>
<div id="side">
<div id="colonneD">
<ul class="droite">
<% if (admin) { %>
- <li><a href="/bow/admin.action"><s:property value="%{getText('admin')}" /></a></li>
+ <li><s:a action="admin"><s:text name="bow.rightMenu.admin" /></s:a></li>
<% } %>
- <li><a href="/bow/preferences.action"><s:property value="%{getText('preferences')}" /></a></li>
- <li><a title="%{getText('temporaryLinkDescription')}" 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%>/addUrl.action&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);"><s:property value="%{getText('temporaryLink')}" /></a></li>
- <li><a title="%{getText('permanentLinkDescription')}" 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%>/addUrl.action&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);"><s:property value="%{getText('permanentLink')}" /></a></li>
+ <li><s:a action="preferences"><s:text name="bow.preferences.title" /></s:a></li>
+ <li><a title="%{getText('temporaryLinkDescription')}" 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%>/addUrl.action&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);"><s:text name="bow.rightMenu.bookmark.temporaryLink" /></a></li>
+ <li><a title="%{getText('permanentLinkDescription')}" 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%>/addUrl.action&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);"><s:text name="bow.rightMenu.bookmark.permanentLink" /></a></li>
</ul>
<div id="extensions">
- <h2><s:property value="%{getText('extensions')}" /></h2>
+ <h2><s:text name="bow.rightMenu.extensions" /></h2>
<ul class="droite">
<li><a href="extensions/bow4chromium.crx"><img src="img/chromium.png" class="extensionIcon" /><div class="extensionName">Extension pour Chromium</div></a></li>
- <li><strong><s:property value="%{getText('permanentTokenId')}" /></strong> <%= permanentToken %></li>
- <li><strong><s:property value="%{getText('sessionTokenId')}" /></strong> <%= temporaryToken %></li>
+ <li><strong><s:text name="bow.rightMenu.token.permanent" /></strong> <%= permanentToken %></li>
+ <li><strong><s:text name="bow.rightMenu.token.temporary" /></strong> <%= temporaryToken %></li>
</ul>
</div>
<div id="add" class="clearfix">
- <h2><s:property value="%{getText('addModify')}" /></h2>
- <s:form id="bookmarkForm" action="/bow/addUrl.action">
- <div class="input"><s:textfield key="link" name="link" label="%{getText('link')}" /></div><!-- <%=formLink%> -->
- <div class="input"><s:textfield key="alias" name="alias" label="%{getText('alias')}" value="" /></div><!-- <%=formAlias%> -->
- <div class="input"><s:textfield key="name" name="name" label="%{getText('name')}" value="" /></div><!-- <%=formName%> -->
- <div class="input"><s:textfield key="tags" name="tags" label="%{getText('tags')}" value="" /></div><!-- <%=formTags%> -->
- <div class="input"><s:submit value="%{getText('save')}" /></div>
+ <h2><s:text name="bow.rightMenu.bookmark.addModify" /></h2>
+ <s:form id="bookmarkForm" action="addUrl">
+ <div class="input"><s:textfield key="bow.rightMenu.bookmark.link" name="link" /></div><!-- <%=formLink%> -->
+ <div class="input"><s:textfield key="bow.rightMenu.bookmark.alias" name="alias" /></div><!-- <%=formAlias%> -->
+ <div class="input"><s:textfield key="bow.rightMenu.bookmark.name" name="name" /></div><!-- <%=formName%> -->
+ <div class="input"><s:textfield key="bow.rightMenu.bookmark.tags" name="tags" /></div><!-- <%=formTags%> -->
+ <div class="input"><s:submit key="bow.rightMenu.bookmark.submit" /></div>
</s:form>
</div>
<div id="nuage">
@@ -126,36 +126,36 @@
<% } %>
</div>
<div class="recherche">
- <h2><label for="searchLine"><s:property value="%{getText('search')}" /></label></h2>
- <s:form action="/bow/search.action">
+ <h2><label for="searchLine"><s:text name="bow.rightMenu.search" /></label></h2>
+ <s:form action="search">
<div class="input">
- <s:textfield key="searchLine" name="searchLine" />
- <s:submit value="%{getText('find')}" />
+ <s:textfield key="bow.rightMenu.find.searchLine" name="searchLine" />
+ <s:submit key="bow.rightMenu.find.submit" />
</div>
</s:form>
</div>
<div class="recherche">
- <h2><label for="fullTextLine"><s:property value="%{getText('fullTextSearch')}" /></label></h2>
- <s:form action="/bow/fullText.action">
+ <h2><label for="fullTextLine"><s:text name="bow.rightMenu.fullTextSearch}" /></label></h2>
+ <s:form action="fullText">
<div class="input">
<% if (fullText != null) { %>
- <s:textfield key="fullTextLine" name="fullTextLine" value="" /> <!-- <%=fullText%> -->
+ <s:textfield key="bow.rightMenu.search.fullTextLine" name="fullTextLine" value="" /> <!-- <%=fullText%> -->
<% } else { %>
- <s:textfield key="fullTextLine" name="fullTextLine" />
+ <s:textfield key="bow.rightMenu.search.fullTextLine" name="fullTextLine" />
<% } %>
- <s:submit value="%{getText('find')}" />
+ <s:submit key="bow.rightMenu.find" />
</div>
</s:form>
</div>
<div id="import">
- <h2><s:property value="%{getText('importBookmarks')}" /></h2>
- <s:form action="/bow/importBookmarks.action" enctype="multipart/form-data">
+ <h2><s:text name="bow.rightMenu.importBookmarks" /></h2>
+ <s:form action="importBookmarks" enctype="multipart/form-data">
<div class="input">
- <s:file name="upfile" size="15%" label="%{getText('file')}" /><br />
- <s:submit value="%{getText('import')}" />
+ <s:file name="upfile" size="15%" key="bow.rightMenu.import.file" /><br />
+ <s:submit key="bow.rightMenu.import.submit" />
</div>
</s:form>
- <a href="/bow/exportBookmarks.action"><s:property value="%{getText('exportBookmarks')}" /></a>
+ <s:a action="exportBookmarks"><s:text name="bow.rightMenu.exportBookmarks" /></s:a>
</div>
<div class="colonnebas">
<img src="img/piedmenu.jpg" width="401" height="77" alt="Pied de menu" />
1
0
r155 - in trunk: . src/main src/main/i18n src/main/java/org/chorem/bow src/main/java/org/chorem/bow/action src/main/resources src/main/resources/i18n src/main/resources/org/chorem/bow/action src/main/webapp src/main/webapp/WEB-INF src/main/webapp/jsp src/main/webapp/jsp/inc
by vbriand@users.chorem.org 31 Dec '10
by vbriand@users.chorem.org 31 Dec '10
31 Dec '10
Author: vbriand
Date: 2010-12-31 16:48:49 +0100 (Fri, 31 Dec 2010)
New Revision: 155
Url: http://chorem.org/repositories/revision/bow/155
Log:
Utilisation du plugin i18n mais tout n'est pas encore traduit et les cl?\195?\169s ne sont pas toutes dans un format valide.
Added:
trunk/src/main/i18n/
trunk/src/main/i18n/jsp.rules
trunk/src/main/java/org/chorem/bow/action/BowBaseAction.java
trunk/src/main/resources/i18n/
trunk/src/main/resources/i18n/bow_en_GB.properties
trunk/src/main/resources/i18n/bow_fr_FR.properties
trunk/src/main/resources/org/chorem/bow/action/ForgotPasswordAction-validation.xml
trunk/src/main/webapp/jsp/admin.jsp
trunk/src/main/webapp/jsp/error.jsp
trunk/src/main/webapp/jsp/inc/bookmarkTop.jsp
trunk/src/main/webapp/jsp/permanentXml.jsp
trunk/src/main/webapp/jsp/search.jsp
trunk/src/main/webapp/jsp/suggestions.jsp
trunk/src/main/webapp/jsp/temporaryXml.jsp
Removed:
trunk/src/main/resources/org/chorem/bow/action/HomeAction.properties
trunk/src/main/resources/org/chorem/bow/action/HomeAction_fr.properties
trunk/src/main/resources/org/chorem/bow/action/LoginAction.properties
trunk/src/main/resources/org/chorem/bow/action/LoginAction_fr.properties
trunk/src/main/resources/org/chorem/bow/action/RegisterAction.properties
trunk/src/main/resources/org/chorem/bow/action/RegisterAction_fr.properties
trunk/src/main/resources/org/chorem/bow/action/package.properties
trunk/src/main/resources/org/chorem/bow/action/package_fr.properties
trunk/src/main/webapp/admin.jsp
trunk/src/main/webapp/bookmark.jsp
trunk/src/main/webapp/bookmarkTop.jsp
trunk/src/main/webapp/error.jsp
trunk/src/main/webapp/errorFrame.jsp
trunk/src/main/webapp/footer.jsp
trunk/src/main/webapp/forgotPassword.jsp
trunk/src/main/webapp/header.jsp
trunk/src/main/webapp/home.jsp
trunk/src/main/webapp/jsp/index.jsp
trunk/src/main/webapp/login.jsp
trunk/src/main/webapp/permanentXml.jsp
trunk/src/main/webapp/preferences.jsp
trunk/src/main/webapp/register.jsp
trunk/src/main/webapp/search.jsp
trunk/src/main/webapp/suggestions.jsp
trunk/src/main/webapp/temporaryXml.jsp
Modified:
trunk/pom.xml
trunk/src/main/java/org/chorem/bow/BowInit.java
trunk/src/main/java/org/chorem/bow/action/AddAliasAction.java
trunk/src/main/java/org/chorem/bow/action/AddClickAction.java
trunk/src/main/java/org/chorem/bow/action/AddUrlAction.java
trunk/src/main/java/org/chorem/bow/action/ChangePreferencesAction.java
trunk/src/main/java/org/chorem/bow/action/DeleteImportAction.java
trunk/src/main/java/org/chorem/bow/action/DeleteSearchResultsAction.java
trunk/src/main/java/org/chorem/bow/action/DeleteTagAction.java
trunk/src/main/java/org/chorem/bow/action/EditBookmarkAction.java
trunk/src/main/java/org/chorem/bow/action/ExportBookmarksAction.java
trunk/src/main/java/org/chorem/bow/action/ForgotPasswordAction.java
trunk/src/main/java/org/chorem/bow/action/GenerateTokenAction.java
trunk/src/main/java/org/chorem/bow/action/HomeAction.java
trunk/src/main/java/org/chorem/bow/action/ImportBookmarksAction.java
trunk/src/main/java/org/chorem/bow/action/LocaleAction.java
trunk/src/main/java/org/chorem/bow/action/LoginAction.java
trunk/src/main/java/org/chorem/bow/action/LogoutAction.java
trunk/src/main/java/org/chorem/bow/action/ModifyBookmarkAction.java
trunk/src/main/java/org/chorem/bow/action/OpenSearchResultAction.java
trunk/src/main/java/org/chorem/bow/action/OpenSearchSuggestionAction.java
trunk/src/main/java/org/chorem/bow/action/OrderAction.java
trunk/src/main/java/org/chorem/bow/action/ReIndexationAction.java
trunk/src/main/java/org/chorem/bow/action/RegisterAction.java
trunk/src/main/java/org/chorem/bow/action/RemoveBookmarkAction.java
trunk/src/main/java/org/chorem/bow/action/SearchAction.java
trunk/src/main/resources/org/chorem/bow/action/LoginAction-validation.xml
trunk/src/main/resources/org/chorem/bow/action/RegisterAction-validation.xml
trunk/src/main/resources/struts.properties
trunk/src/main/webapp/WEB-INF/decorators.xml
trunk/src/main/webapp/jsp/forgotPassword.jsp
trunk/src/main/webapp/jsp/home.jsp
trunk/src/main/webapp/jsp/inc/bookmark.jsp
trunk/src/main/webapp/jsp/inc/errorFrame.jsp
trunk/src/main/webapp/jsp/inc/rightMenu.jsp
trunk/src/main/webapp/jsp/inc/tagsCloud.jsp
trunk/src/main/webapp/jsp/login.jsp
trunk/src/main/webapp/jsp/preferences.jsp
trunk/src/main/webapp/jsp/register.jsp
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/pom.xml 2010-12-31 15:48:49 UTC (rev 155)
@@ -176,7 +176,11 @@
<slf4jVersion>1.6.1</slf4jVersion>
<struts2.version>2.1.8.1</struts2.version>
- <locales>en</locales>
+ <i18n.bundles>fr_FR,en_GB</i18n.bundles>
+ <i18n.silent>true</i18n.silent>
+ <i18n.bundleOutputName>bow-i18n</i18n.bundleOutputName>
+ <i18n.bundleOutputDir>${basedir}/target/generated-sources/resources</i18n.bundleOutputDir>
+ <i18n.addBundleOuputDirParent>false</i18n.addBundleOuputDirParent>
<!-- license to use -->
<license.licenseName>agpl_v3</license.licenseName>
@@ -243,6 +247,42 @@
</dependency>
</dependencies>
</plugin>
+
+ <plugin>
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>maven-i18n-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>scan-java-sources</id>
+ <goals>
+ <goal>parserJava</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>scan-jsp-sources</id>
+ <goals>
+ <goal>parserJsp</goal>
+ </goals>
+ <configuration>
+ <userRulesFiles>
+ <file>${basedir}/src/main/i18n/jsp.rules</file>
+ </userRulesFiles>
+ <namespaces>
+ <s>http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd</s>
+ <sx>http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd</sx>
+ <jsp>http://java.sun.com/JSP/Page</jsp>
+ </namespaces>
+ </configuration>
+ </execution>
+ <execution>
+ <id>gen-and-make-bundle</id>
+ <goals>
+ <goal>gen</goal>
+ <goal>bundle</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>
Added: trunk/src/main/i18n/jsp.rules
===================================================================
--- trunk/src/main/i18n/jsp.rules (rev 0)
+++ trunk/src/main/i18n/jsp.rules 2010-12-31 15:48:49 UTC (rev 155)
@@ -0,0 +1,9 @@
+# Règles i18n pour les jsp
+
+//s:text/@name
+//s:submit/@key
+//s:textfield/@key
+//s:password/@key
+//s:file/@key
+
+//sx:datetimepicker/@key
Modified: trunk/src/main/java/org/chorem/bow/BowInit.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/BowInit.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/BowInit.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -34,6 +34,7 @@
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) {
token = new TokenImpl();
String newToken = tokenActions.generateToken();
Modified: trunk/src/main/java/org/chorem/bow/action/AddAliasAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/AddAliasAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/AddAliasAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -8,9 +8,7 @@
import org.nuiton.wikitty.WikittyProxy;
import org.nuiton.wikitty.search.Search;
-import com.opensymphony.xwork2.ActionSupport;
-
-public class AddAliasAction extends ActionSupport {
+public class AddAliasAction extends BowBaseAction {
private static final long serialVersionUID = 2565840071468031758L;
protected String alias;
protected String bookmarkId;
@@ -43,7 +41,6 @@
this.bookmarkId = bookmarkId;
}
- @Override
public String execute() {
if (alias != null && !alias.isEmpty()) {
WikittyProxy proxy = BowProxy.getInstance();
Modified: trunk/src/main/java/org/chorem/bow/action/AddClickAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/AddClickAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/AddClickAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -4,9 +4,7 @@
import org.chorem.bow.BowProxy;
import org.nuiton.wikitty.WikittyProxy;
-import com.opensymphony.xwork2.ActionSupport;
-
-public class AddClickAction extends ActionSupport {
+public class AddClickAction extends BowBaseAction {
private static final long serialVersionUID = 8579081104294143087L;
protected String bookmarkId;
@@ -23,7 +21,6 @@
this.bookmarkId = bookmarkId;
}
- @Override
public String execute() {
if (bookmarkId != null && !bookmarkId.isEmpty()) {
WikittyProxy proxy = BowProxy.getInstance();
Modified: trunk/src/main/java/org/chorem/bow/action/AddUrlAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/AddUrlAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/AddUrlAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -11,9 +11,7 @@
import org.nuiton.wikitty.WikittyProxy;
import org.nuiton.wikitty.search.Search;
-import com.opensymphony.xwork2.ActionSupport;
-
-public class AddUrlAction extends ActionSupport implements SessionAware {
+public class AddUrlAction extends BowBaseAction implements SessionAware {
private static final long serialVersionUID = 3389170166034184139L;
protected String link;
protected String name;
@@ -97,7 +95,6 @@
this.session = session;
}
- @Override
public String execute() {
WikittyProxy proxy = BowProxy.getInstance();
Bookmark bookmark = null;
Added: trunk/src/main/java/org/chorem/bow/action/BowBaseAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/BowBaseAction.java (rev 0)
+++ trunk/src/main/java/org/chorem/bow/action/BowBaseAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -0,0 +1,79 @@
+package org.chorem.bow.action;
+
+import com.opensymphony.xwork2.ActionSupport;
+import com.opensymphony.xwork2.util.ValueStack;
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import java.util.List;
+
+public class BowBaseAction extends ActionSupport {
+
+ private static final long serialVersionUID = 1L;
+ public static final String UNTRANSLATED_MARKER = "???";
+ private static final Log log = LogFactory.getLog(BowBaseAction.class);
+
+ @Override
+ public String getText(String aTextName) {
+ String value = super.getText(aTextName);
+ return getSafeText(aTextName, value);
+ }
+
+ @Override
+ public String getText(String aTextName, String defaultValue) {
+ String value = super.getText(aTextName, defaultValue);
+ return getSafeText(aTextName, value);
+ }
+
+ @Override
+ public String getText(String aTextName, String defaultValue, String obj) {
+ String value = super.getText(aTextName, defaultValue, obj);
+ return getSafeText(aTextName, value);
+ }
+
+ @Override
+ public String getText(String aTextName, List<Object> args) {
+ String value = super.getText(aTextName, args);
+ return getSafeText(aTextName, value);
+ }
+
+ @Override
+ public String getText(String key, String[] args) {
+ String value = super.getText(key, args);
+ return getSafeText(key, value);
+ }
+
+ @Override
+ public String getText(String aTextName, String defaultValue, List<Object> args) {
+ String value = super.getText(aTextName, defaultValue, args);
+ return getSafeText(aTextName, value);
+ }
+
+ @Override
+ public String getText(String key, String defaultValue, String[] args) {
+ String value = super.getText(key, defaultValue, args);
+ return getSafeText(key, value);
+ }
+
+ @Override
+ public String getText(String key, String defaultValue, List<Object> args, ValueStack stack) {
+ String value = super.getText(key, defaultValue, args, stack);
+ return getSafeText(key, value);
+ }
+
+ @Override
+ public String getText(String key, String defaultValue, String[] args, ValueStack stack) {
+ String value = super.getText(key, defaultValue, args, stack);
+ return getSafeText(key, value);
+ }
+
+ protected String getSafeText(String key, String value) {
+ if (StringUtils.isEmpty(value)) {
+ if (log.isWarnEnabled()) {
+ log.warn("Key [" + key + "] is not translated");
+ }
+ return UNTRANSLATED_MARKER + key + UNTRANSLATED_MARKER;
+ }
+ return value;
+ }
+}
\ No newline at end of file
Property changes on: trunk/src/main/java/org/chorem/bow/action/BowBaseAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/org/chorem/bow/action/ChangePreferencesAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/ChangePreferencesAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/ChangePreferencesAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -10,9 +10,7 @@
import org.nuiton.util.StringUtil;
import org.nuiton.wikitty.WikittyProxy;
-import com.opensymphony.xwork2.ActionSupport;
-
-public class ChangePreferencesAction extends ActionSupport implements SessionAware {
+public class ChangePreferencesAction extends BowBaseAction implements SessionAware {
private static final long serialVersionUID = -1923646256914239581L;
protected String colors;
protected String tagsNb;
@@ -187,7 +185,6 @@
return newUser;
}
- @Override
public String execute() {
WikittyProxy proxy = BowProxy.getInstance();
Preference preference = changePreference();
Modified: trunk/src/main/java/org/chorem/bow/action/DeleteImportAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/DeleteImportAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/DeleteImportAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -14,9 +14,7 @@
import org.nuiton.wikitty.search.Element;
import org.nuiton.wikitty.search.Search;
-import com.opensymphony.xwork2.ActionSupport;
-
-public class DeleteImportAction extends ActionSupport implements SessionAware {
+public class DeleteImportAction extends BowBaseAction implements SessionAware {
private static final long serialVersionUID = 8714394293884265516L;
protected String date;
protected Map<String, Object> session;
@@ -39,7 +37,6 @@
this.session = session;
}
- @Override
public String execute() {
if (date != null) {
WikittyProxy proxy = BowProxy.getInstance();
Modified: trunk/src/main/java/org/chorem/bow/action/DeleteSearchResultsAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/DeleteSearchResultsAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/DeleteSearchResultsAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -13,9 +13,7 @@
import org.nuiton.wikitty.WikittyProxy;
import org.nuiton.wikitty.search.Search;
-import com.opensymphony.xwork2.ActionSupport;
-
-public class DeleteSearchResultsAction extends ActionSupport implements SessionAware {
+public class DeleteSearchResultsAction extends BowBaseAction implements SessionAware {
private static final long serialVersionUID = -3903724044644625507L;
protected String searchLine;
protected String fullTextLine;
@@ -54,7 +52,6 @@
this.session = session;
}
- @Override
public String execute() {
if (searchLine != null && fullTextLine != null) {
WikittyProxy proxy = BowProxy.getInstance();
Modified: trunk/src/main/java/org/chorem/bow/action/DeleteTagAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/DeleteTagAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/DeleteTagAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -4,9 +4,7 @@
import org.chorem.bow.BowProxy;
import org.nuiton.wikitty.WikittyProxy;
-import com.opensymphony.xwork2.ActionSupport;
-
-public class DeleteTagAction extends ActionSupport {
+public class DeleteTagAction extends BowBaseAction {
private static final long serialVersionUID = -6174966873862161966L;
protected String bookmarkId;
protected String deleteTag;
@@ -36,7 +34,6 @@
this.deleteTag = deleteTag;
}
- @Override
public String execute() {
if (deleteTag != null && bookmarkId != null) {
if (!bookmarkId.isEmpty()) {
Modified: trunk/src/main/java/org/chorem/bow/action/EditBookmarkAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/EditBookmarkAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/EditBookmarkAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -16,9 +16,7 @@
import org.chorem.bow.User;
import org.nuiton.wikitty.WikittyProxy;
-import com.opensymphony.xwork2.ActionSupport;
-
-public class EditBookmarkAction extends ActionSupport implements SessionAware, ServletRequestAware {
+public class EditBookmarkAction extends BowBaseAction implements SessionAware, ServletRequestAware {
private static final long serialVersionUID = 2706590901233864637L;
protected String bookmarkId;
protected String searchLine;
@@ -63,7 +61,6 @@
this.request = request;
}
- @Override
public String execute() {
if (bookmarkId != null && !bookmarkId.isEmpty()) {
WikittyProxy proxy = BowProxy.getInstance();
@@ -74,7 +71,7 @@
request.setAttribute("name", bookmark.getDescription());
request.setAttribute("alias", bookmark.getAlias());
request.setAttribute("tags", BookmarkActions.getBookmarkTagsString(bookmark));
- request.setAttribute("action", "bow?action=modifyBookmark");
+ request.setAttribute("action", "bow/modifyBookmark.action");
request.setAttribute("bookmarkId", bookmarkId);
}
}
Modified: trunk/src/main/java/org/chorem/bow/action/ExportBookmarksAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/ExportBookmarksAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/ExportBookmarksAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -17,9 +17,7 @@
import org.nuiton.wikitty.WikittyProxy;
import org.nuiton.wikitty.search.Search;
-import com.opensymphony.xwork2.ActionSupport;
-
-public class ExportBookmarksAction extends ActionSupport implements SessionAware, ServletResponseAware {
+public class ExportBookmarksAction extends BowBaseAction implements SessionAware, ServletResponseAware {
private static final long serialVersionUID = 45880214686011946L;
protected Map<String, Object> session;
protected HttpServletResponse response;
@@ -34,7 +32,6 @@
this.response = response;
}
- @Override
public String execute() {
WikittyProxy proxy = BowProxy.getInstance();
Criteria criteria = Search.query().eq(Bookmark.FQ_FIELD_EMAIL, ((User)session.get("user")).getEmail()).criteria();
Modified: trunk/src/main/java/org/chorem/bow/action/ForgotPasswordAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/ForgotPasswordAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/ForgotPasswordAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -14,9 +14,9 @@
import org.nuiton.wikitty.WikittyProxy;
import org.nuiton.wikitty.search.Search;
-import com.opensymphony.xwork2.ActionSupport;
+import static org.nuiton.i18n.I18n.n_;
-public class ForgotPasswordAction extends ActionSupport{
+public class ForgotPasswordAction extends BowBaseAction {
private static final long serialVersionUID = -8207951465957204954L;
protected String email;
@@ -43,7 +43,7 @@
}
return false;
}
-
+
public String execute() {
if (email != null) {
email = email.trim();
@@ -63,9 +63,9 @@
}
String mailContent;
- mailContent = getText("mailHi") + "\n\n" + getText("mailPwd") + password + "\n\n" + getText("mailEmail") + email + "\n\n";
+ mailContent = getText(n_("bow.register.mailHi")) + "\n\n" + getText(n_("bow.register.mailPwd")) + password + "\n\n" + getText(n_("bow.register.mailEmail")) + email + "\n\n";
try {
- BowMail.sendMail(email, getText("mailSubject"), mailContent); //TODO: modifier les noms et peut-être la manière de faire car c'est pas très beau
+ BowMail.sendMail(email, getText(n_("bow.register.mailSubject")), mailContent); //TODO: modifier les noms et peut-être la manière de faire car c'est pas très beau
} catch (AddressException e) {
// TODO Auto-generated catch block
e.printStackTrace();
@@ -77,7 +77,7 @@
proxy.store(user);
return SUCCESS;
} else {
- addFieldError("email", getText("emailDoesntExist"));
+ addFieldError("email", getText(n_("bow.forgotPassword.emailDoesntExist")));
}
}
}
Modified: trunk/src/main/java/org/chorem/bow/action/GenerateTokenAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/GenerateTokenAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/GenerateTokenAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -13,9 +13,7 @@
import org.nuiton.wikitty.WikittyProxy;
import org.nuiton.wikitty.search.Search;
-import com.opensymphony.xwork2.ActionSupport;
-
-public class GenerateTokenAction extends ActionSupport implements SessionAware {
+public class GenerateTokenAction extends BowBaseAction implements SessionAware {
private static final long serialVersionUID = 1141019772989666309L;
protected Map<String, Object> session;
@@ -24,7 +22,6 @@
this.session = session;
}
- @Override
public String execute() {
WikittyProxy proxy = BowProxy.getInstance();
User user = (User)session.get("user");
Modified: trunk/src/main/java/org/chorem/bow/action/HomeAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/HomeAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/HomeAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -15,9 +15,7 @@
import org.nuiton.wikitty.WikittyProxy;
import org.nuiton.wikitty.search.Search;
-import com.opensymphony.xwork2.ActionSupport;
-
-public class HomeAction extends ActionSupport implements SessionAware, ServletRequestAware {
+public class HomeAction extends BowBaseAction implements SessionAware, ServletRequestAware {
private static final long serialVersionUID = -3735250067223062719L;
protected String token;
protected Map<String, Object> session;
@@ -60,7 +58,6 @@
return null;
}
- @Override
public String execute() {
User user = (User)session.get("user");
Modified: trunk/src/main/java/org/chorem/bow/action/ImportBookmarksAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/ImportBookmarksAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/ImportBookmarksAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -29,9 +29,9 @@
import org.htmlparser.util.SimpleNodeIterator;
import org.nuiton.wikitty.WikittyProxy;
-import com.opensymphony.xwork2.ActionSupport;
+import static org.nuiton.i18n.I18n.n_;
-public class ImportBookmarksAction extends ActionSupport implements SessionAware, ServletRequestAware {
+public class ImportBookmarksAction extends BowBaseAction implements SessionAware, ServletRequestAware {
private static final long serialVersionUID = -5962680416570797028L;
protected Map<String, Object> session;
protected HttpServletRequest request;
@@ -105,7 +105,6 @@
}
}
- @Override
public String execute() {
// Check that we have a file upload request
boolean isMultipart = ServletFileUpload.isMultipartContent(request);
@@ -143,11 +142,10 @@
return SUCCESS;
}
catch (ParserException e) {
- request.setAttribute("errorMsgUser", "Bad bookmarks file format, expected Netscape-like bookmarks file");
+ request.setAttribute("errorMsgUser", getText(n_("bow.bookmark.badFileFormat")));
request.setAttribute("errorMsgTech", e.getMessage());
- String searchLine = request.getParameter("searchLine");
- if (searchLine == null) {
+ if (request.getParameter("searchLine") == null) {
BowInit.initHomePage(request, user);
return "home";
} else {
Modified: trunk/src/main/java/org/chorem/bow/action/LocaleAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/LocaleAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/LocaleAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,8 +1,6 @@
package org.chorem.bow.action;
-import com.opensymphony.xwork2.ActionSupport;
-
-public class LocaleAction extends ActionSupport {
+public class LocaleAction extends BowBaseAction {
private static final long serialVersionUID = 9124549040894568467L;
public String execute() {
Modified: trunk/src/main/java/org/chorem/bow/action/LoginAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/LoginAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/LoginAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -39,9 +39,9 @@
import org.nuiton.wikitty.WikittyProxy;
import org.nuiton.wikitty.search.Search;
-import com.opensymphony.xwork2.ActionSupport;
+import static org.nuiton.i18n.I18n.n_;
-public class LoginAction extends ActionSupport implements SessionAware, ServletRequestAware {
+public class LoginAction extends BowBaseAction implements SessionAware, ServletRequestAware {
private static final long serialVersionUID = 6891064800288772246L;
protected String email;
protected String password;
@@ -91,7 +91,7 @@
User user = proxy.findByCriteria(User.class, criteria);
if (user == null) {
- addActionError(getText("authenticationFailure"));
+ addActionError(getText(n_("bow.login.authenticationFailure")));
}
return user;
}
@@ -99,13 +99,14 @@
return null;
}
- @Override
public String execute() {
if (email != null) {
email = email.trim();
+
if (password != null) {
String md5 = StringUtil.encodeMD5(password);
User user;
+
try {
user = checkLogin(email, md5);
} catch (NoSuchAlgorithmException e) {
Modified: trunk/src/main/java/org/chorem/bow/action/LogoutAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/LogoutAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/LogoutAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -5,9 +5,7 @@
import org.apache.struts2.dispatcher.SessionMap;
import org.apache.struts2.interceptor.SessionAware;
-import com.opensymphony.xwork2.ActionSupport;
-
-public class LogoutAction extends ActionSupport implements SessionAware {
+public class LogoutAction extends BowBaseAction implements SessionAware {
private static final long serialVersionUID = 4806944250461551896L;
protected Map<String, Object> session;
Modified: trunk/src/main/java/org/chorem/bow/action/ModifyBookmarkAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/ModifyBookmarkAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/ModifyBookmarkAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -7,9 +7,7 @@
import org.nuiton.wikitty.WikittyProxy;
import org.nuiton.wikitty.search.Search;
-import com.opensymphony.xwork2.ActionSupport;
-
-public class ModifyBookmarkAction extends ActionSupport {
+public class ModifyBookmarkAction extends BowBaseAction {
private static final long serialVersionUID = 8197008295267924063L;
protected String url;
protected String name;
@@ -87,7 +85,6 @@
this.bookmarkId = bookmarkId;
}
- @Override
public String execute() {
WikittyProxy proxy = BowProxy.getInstance();
Bookmark bookmark = proxy.restore(Bookmark.class, bookmarkId);
Modified: trunk/src/main/java/org/chorem/bow/action/OpenSearchResultAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/OpenSearchResultAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/OpenSearchResultAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -22,9 +22,7 @@
import org.nuiton.wikitty.WikittyProxy;
import org.nuiton.wikitty.search.Search;
-import com.opensymphony.xwork2.ActionSupport;
-
-public class OpenSearchResultAction extends ActionSupport implements SessionAware, ServletRequestAware, ServletResponseAware {
+public class OpenSearchResultAction extends BowBaseAction implements SessionAware, ServletRequestAware, ServletResponseAware {
private static final long serialVersionUID = -1691325797986483856L;
protected String searchLine;
protected String token;
@@ -76,7 +74,6 @@
}
//TODO : gérer toutes les redirections comme il faut avec Struts2
- @Override
public String execute() {
User user = (User)session.get("user");
Modified: trunk/src/main/java/org/chorem/bow/action/OpenSearchSuggestionAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/OpenSearchSuggestionAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/OpenSearchSuggestionAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -19,9 +19,7 @@
import org.nuiton.wikitty.WikittyProxy;
import org.nuiton.wikitty.search.Search;
-import com.opensymphony.xwork2.ActionSupport;
-
-public class OpenSearchSuggestionAction extends ActionSupport implements SessionAware, ServletRequestAware {
+public class OpenSearchSuggestionAction extends BowBaseAction implements SessionAware, ServletRequestAware {
private static final long serialVersionUID = 3973618635494129146L;
protected Map<String, Object> session;
protected String searchLine;
@@ -51,7 +49,6 @@
this.request = request;
}
- @Override
public String execute() {
User user = (User)session.get("user");
Modified: trunk/src/main/java/org/chorem/bow/action/OrderAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/OrderAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/OrderAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -15,9 +15,7 @@
import org.nuiton.wikitty.PagedResult;
import org.nuiton.wikitty.WikittyProxy;
-import com.opensymphony.xwork2.ActionSupport;
-
-public class OrderAction extends ActionSupport implements SessionAware, ServletRequestAware {
+public class OrderAction extends BowBaseAction implements SessionAware, ServletRequestAware {
private static final long serialVersionUID = 203690999710176818L;
protected Map<String, Object> session;
protected String type;
@@ -62,7 +60,6 @@
this.request = request;
}
- @Override
public String execute() {
Criteria baseCriteria = BowBookmark.getBookmarkListCriteriaByUser((User)session.get("user"), searchLine);
Modified: trunk/src/main/java/org/chorem/bow/action/ReIndexationAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/ReIndexationAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/ReIndexationAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -6,9 +6,7 @@
import org.chorem.bow.BowProxy;
import org.nuiton.wikitty.WikittyProxy;
-import com.opensymphony.xwork2.ActionSupport;
-
-public class ReIndexationAction extends ActionSupport implements SessionAware {
+public class ReIndexationAction extends BowBaseAction implements SessionAware {
private static final long serialVersionUID = 6226574522402739559L;
protected Map<String, Object> session;
@@ -17,7 +15,6 @@
this.session = session;
}
- @Override
public String execute() {
if ((Boolean)session.get("admin")) { //If is admin
WikittyProxy proxy = BowProxy.getInstance();
Modified: trunk/src/main/java/org/chorem/bow/action/RegisterAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/RegisterAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/RegisterAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -18,9 +18,9 @@
import org.nuiton.wikitty.WikittyProxy;
import org.nuiton.wikitty.search.Search;
-import com.opensymphony.xwork2.ActionSupport;
+import static org.nuiton.i18n.I18n.n_;
-public class RegisterAction extends ActionSupport implements SessionAware, ServletRequestAware {
+public class RegisterAction extends BowBaseAction implements SessionAware, ServletRequestAware {
private static final long serialVersionUID = 2204772861770399542L;
protected String email;
protected String password;
@@ -90,7 +90,7 @@
return false;
}
//FIXME : message d'erreur mais return true ???
- addFieldError("email", getText("emailAldyUsed"));
+ addFieldError("email", getText(n_("bow.register.emailAldyUsed")));
return true;
}
}
@@ -98,13 +98,13 @@
//request.setAttribute("errorMsgUser", "Email and password must be correctly filled");
return true;
}
-
+
public String execute() {
if (email != null) {
email = email.trim();
if (password != null) {
if (!password.equals(repeatPassword)) {
- addActionError(getText("pwdDontMatch"));
+ addActionError(getText(n_("bow.register.pwdDontMatch")));
return INPUT;
}
String md5 = StringUtil.encodeMD5(password);
@@ -126,8 +126,8 @@
try {
String mailContent;
- mailContent = getText("mailHi") + "\n\n" + getText("mailPwd") + password + "\n\n" + getText("mailEmail") + email + "\n\n";
- BowMail.sendMail(email, getText("mailSubject"), mailContent); //TODO: modifier les noms et peut-être la manière de faire car c'est pas très beau
+ mailContent = getText(n_("bow.register.mailHi")) + "\n\n" + getText(n_("bow.register.mailPwd")) + password + "\n\n" + getText(n_("bow.register.mailEmail")) + email + "\n\n";
+ BowMail.sendMail(email, getText(n_("bow.register.mailSubject")), mailContent); //TODO: modifier les noms et peut-être la manière de faire car c'est pas très beau
} catch (AddressException e) {
// TODO Auto-generated catch block
e.printStackTrace();
@@ -138,7 +138,7 @@
return SUCCESS;
} else {
- addFieldError("email", getText("invalidLogin"));
+ addFieldError("email", getText(n_("bow.register.invalidLogin")));
}
}
}
Modified: trunk/src/main/java/org/chorem/bow/action/RemoveBookmarkAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/RemoveBookmarkAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/RemoveBookmarkAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -4,9 +4,7 @@
import org.chorem.bow.BowProxy;
import org.nuiton.wikitty.WikittyProxy;
-import com.opensymphony.xwork2.ActionSupport;
-
-public class RemoveBookmarkAction extends ActionSupport {
+public class RemoveBookmarkAction extends BowBaseAction {
private static final long serialVersionUID = 820566716695285561L;
protected String bookmarkId;
@@ -24,7 +22,6 @@
this.bookmarkId = bookmarkId;
}
- @Override
public String execute() {
if (bookmarkId != null && !bookmarkId.isEmpty()) {
try {
Modified: trunk/src/main/java/org/chorem/bow/action/SearchAction.java
===================================================================
--- trunk/src/main/java/org/chorem/bow/action/SearchAction.java 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/java/org/chorem/bow/action/SearchAction.java 2010-12-31 15:48:49 UTC (rev 155)
@@ -18,9 +18,7 @@
import org.nuiton.wikitty.PagedResult;
import org.nuiton.wikitty.WikittyProxy;
-import com.opensymphony.xwork2.ActionSupport;
-
-public class SearchAction extends ActionSupport implements SessionAware, ServletRequestAware {
+public class SearchAction extends BowBaseAction implements SessionAware, ServletRequestAware {
private static final long serialVersionUID = -2161661766242362907L;
protected Map<String, Object> session;
protected String searchLine;
@@ -80,7 +78,6 @@
this.request = request;
}
- @Override
public String execute() {
User user = (User)session.get("user");
@@ -107,10 +104,12 @@
}
WikittyProxy proxy = BowProxy.getInstance();
Criteria criteria = BowBookmark.getBookmarkListCriteriaByUser(user, searchLine);
- criteria = criteria.addSortDescending(Bookmark.FQ_FIELD_CLICK);
- PagedResult<Bookmark> result = proxy.findAllByCriteria(Bookmark.class, criteria); //Selects all bookmarks by user
- BookmarkActions bookmarkActions = BowBookmark.createBookmarkActions(request, result, searchLine);
- request.setAttribute("bookmarkActions", bookmarkActions);
+ if (criteria != null) {
+ criteria = criteria.addSortDescending(Bookmark.FQ_FIELD_CLICK);
+ PagedResult<Bookmark> result = proxy.findAllByCriteria(Bookmark.class, criteria); //Selects all bookmarks by user
+ BookmarkActions bookmarkActions = BowBookmark.createBookmarkActions(request, result, searchLine);
+ request.setAttribute("bookmarkActions", bookmarkActions);
+ }
}
return SUCCESS;
}
Added: trunk/src/main/resources/i18n/bow_en_GB.properties
===================================================================
--- trunk/src/main/resources/i18n/bow_en_GB.properties (rev 0)
+++ trunk/src/main/resources/i18n/bow_en_GB.properties 2010-12-31 15:48:49 UTC (rev 155)
@@ -0,0 +1,48 @@
+bookmarksHomePage=
+bow.action.locale.english=English
+bow.action.locale.french=French
+bow.bookmark.badFileFormat=
+bow.config.alias.url.description=
+bow.config.application.version.description=
+bow.config.bow.addressFrom.description=
+bow.config.bow.admins.description=
+bow.config.bow.smtpServer.description=
+bow.config.bow.url.description=
+bow.config.configFileName.description=
+bow.config.data.dir.description=
+bow.config.search.engine.description=
+bow.config.servlet.bow.description=
+bow.forgotPassword.emailDoesntExist=
+bow.forgotpwd.submit=Send
+bow.forgotpwd.title=Forgot your password?
+bow.home.title=
+bow.label.locale.english=
+bow.label.locale.french=
+bow.login.authenticationFailure=
+bow.login.email=Email
+bow.login.email.required=Email is required
+bow.login.email.wrongformat=Your email address isn''t valid
+bow.login.password=Password
+bow.login.password.required=Password is required
+bow.login.repeatPassword=Repeat your password
+bow.login.repeatPassword.required=Please repeat your password
+bow.login.submit=Login
+bow.login.title=Login
+bow.register.emailAldyUsed=This email address is already used
+bow.register.invalidLogin=
+bow.register.mailEmail=
+bow.register.mailHi=
+bow.register.mailPwd=
+bow.register.mailSubject=
+bow.register.pwdDontMatch=Passwords don't match
+bow.register.submit=Register
+bow.register.title=Register
+bow.requiredstring=${getText(fieldKey)} is required
+colors=
+confirmNewPassword=
+currentPassword=
+email=
+newPassword=
+searchEngineUrlResults=
+searchEngineUrlSuggestions=
+tagsNb=
Property changes on: trunk/src/main/resources/i18n/bow_en_GB.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/src/main/resources/i18n/bow_fr_FR.properties
===================================================================
--- trunk/src/main/resources/i18n/bow_fr_FR.properties (rev 0)
+++ trunk/src/main/resources/i18n/bow_fr_FR.properties 2010-12-31 15:48:49 UTC (rev 155)
@@ -0,0 +1,48 @@
+bookmarksHomePage=
+bow.action.locale.english=Anglais
+bow.action.locale.french=Fran\u00E7ais
+bow.bookmark.badFileFormat=
+bow.config.alias.url.description=
+bow.config.application.version.description=
+bow.config.bow.addressFrom.description=
+bow.config.bow.admins.description=
+bow.config.bow.smtpServer.description=
+bow.config.bow.url.description=
+bow.config.configFileName.description=
+bow.config.data.dir.description=
+bow.config.search.engine.description=
+bow.config.servlet.bow.description=
+bow.forgotPassword.emailDoesntExist=
+bow.forgotpwd.submit=Envoyer
+bow.forgotpwd.title=Vous avez oubli\u00E9 votre mot de passe ?
+bow.home.title=
+bow.label.locale.english=
+bow.label.locale.french=
+bow.login.authenticationFailure=
+bow.login.email=Email
+bow.login.email.required=Veuillez entrer votre adresse email
+bow.login.email.wrongformat=Votre adresse email est invalide
+bow.login.password=Mot de passe
+bow.login.password.required=Veuillez entrer votre mot de passe
+bow.login.repeatPassword=Retapez votre mot de passe
+bow.login.repeatPassword.required=Veuillez retaper votre mot de passe
+bow.login.submit=Connexion
+bow.login.title=Connexion
+bow.register.emailAldyUsed=Cette adresse email est d\u00E9j\u00E0 utilis\u00E9e
+bow.register.invalidLogin=
+bow.register.mailEmail=
+bow.register.mailHi=
+bow.register.mailPwd=
+bow.register.mailSubject=
+bow.register.pwdDontMatch=Les mots de passe sont diff\u00E9erents
+bow.register.submit=S''enregistrer
+bow.register.title=S''enregistrer
+bow.requiredstring=${getText(fieldKey)} est obligatoire
+colors=
+confirmNewPassword=
+currentPassword=
+email=
+newPassword=
+searchEngineUrlResults=
+searchEngineUrlSuggestions=
+tagsNb=
Property changes on: trunk/src/main/resources/i18n/bow_fr_FR.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/src/main/resources/org/chorem/bow/action/ForgotPasswordAction-validation.xml
===================================================================
--- trunk/src/main/resources/org/chorem/bow/action/ForgotPasswordAction-validation.xml (rev 0)
+++ trunk/src/main/resources/org/chorem/bow/action/ForgotPasswordAction-validation.xml 2010-12-31 15:48:49 UTC (rev 155)
@@ -0,0 +1,14 @@
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+
+<validators>
+ <field name="email">
+ <field-validator type="requiredstring">
+ <message key="bow.login.email.required" />
+ </field-validator>
+ <field-validator type="email">
+ <message key="bow.login.email.wrongformat" />
+ </field-validator>
+ </field>
+</validators>
Property changes on: trunk/src/main/resources/org/chorem/bow/action/ForgotPasswordAction-validation.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: trunk/src/main/resources/org/chorem/bow/action/HomeAction.properties
===================================================================
--- trunk/src/main/resources/org/chorem/bow/action/HomeAction.properties 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/resources/org/chorem/bow/action/HomeAction.properties 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,3 +0,0 @@
-mostUsedBookmarks = The most used bookmarks
-noBookmarks = No bookmarks
-latestBookmarks = The latest added bookmarks
\ No newline at end of file
Deleted: trunk/src/main/resources/org/chorem/bow/action/HomeAction_fr.properties
===================================================================
--- trunk/src/main/resources/org/chorem/bow/action/HomeAction_fr.properties 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/resources/org/chorem/bow/action/HomeAction_fr.properties 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,3 +0,0 @@
-mostUsedBookmarks = Les marque-pages les plus utilisés
-noBookmarks = Aucun marque-pages
-latestBookmarks = Les derniers marque-pages ajoutés
\ No newline at end of file
Modified: trunk/src/main/resources/org/chorem/bow/action/LoginAction-validation.xml
===================================================================
--- trunk/src/main/resources/org/chorem/bow/action/LoginAction-validation.xml 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/resources/org/chorem/bow/action/LoginAction-validation.xml 2010-12-31 15:48:49 UTC (rev 155)
@@ -5,15 +5,15 @@
<validators>
<field name="email">
<field-validator type="requiredstring">
- <message key="requiredstring" />
+ <message key="bow.login.email.required" />
</field-validator>
<field-validator type="email">
- <message key="wrongformat" />
+ <message key="bow.login.email.wrongformat" />
</field-validator>
</field>
<field name="password">
<field-validator type="requiredstring">
- <message key="requiredstring" />
+ <message key="bow.login.password.required" />
</field-validator>
</field>
</validators>
Deleted: trunk/src/main/resources/org/chorem/bow/action/LoginAction.properties
===================================================================
--- trunk/src/main/resources/org/chorem/bow/action/LoginAction.properties 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/resources/org/chorem/bow/action/LoginAction.properties 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,4 +0,0 @@
-login = Login
-register = Register
-forgotpwd = Forgot your password ?
-authenticationFailure = Unknown email or incorrect password
Deleted: trunk/src/main/resources/org/chorem/bow/action/LoginAction_fr.properties
===================================================================
--- trunk/src/main/resources/org/chorem/bow/action/LoginAction_fr.properties 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/resources/org/chorem/bow/action/LoginAction_fr.properties 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,4 +0,0 @@
-login = Connexion
-register = S'enregistrer
-forgotpwd = Vous avez oublie votre mot de passe ?
-authenticationFailure = Email inconnu ou mot de passe incorrect
Modified: trunk/src/main/resources/org/chorem/bow/action/RegisterAction-validation.xml
===================================================================
--- trunk/src/main/resources/org/chorem/bow/action/RegisterAction-validation.xml 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/resources/org/chorem/bow/action/RegisterAction-validation.xml 2010-12-31 15:48:49 UTC (rev 155)
@@ -5,20 +5,25 @@
<validators>
<field name="email">
<field-validator type="requiredstring">
- <message key="requiredstring" />
+ <message key="bow.login.email.required" />
</field-validator>
<field-validator type="email">
- <message key="wrongformat" />
+ <message key="bow.login.email.wrongformat" />
</field-validator>
</field>
<field name="password">
<field-validator type="requiredstring">
- <message key="requiredstring" />
+ <message key="bow.login.password.required" />
</field-validator>
</field>
<field name="repeatPassword">
<field-validator type="requiredstring">
- <message key="requiredstring" />
+ <message key="bow.login.repeatPassword.required" />
</field-validator>
</field>
+
+ <validator type="expression">
+ <param name="expression">password.equals(repeatPassword)</param>
+ <message key="bow.register.pwdDontMatch" />
+ </validator>
</validators>
Deleted: trunk/src/main/resources/org/chorem/bow/action/RegisterAction.properties
===================================================================
--- trunk/src/main/resources/org/chorem/bow/action/RegisterAction.properties 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/resources/org/chorem/bow/action/RegisterAction.properties 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,10 +0,0 @@
-repeatPassword = Retype your password
-pwdDontMatch = Passwords don't match
-emailAldyUsed = This email address is already used
-invalidLogin = Invalid login, please choose another one
-mailSubject = [Bow] New password
-mailHi = Hi,
-mailPwd = Your password :
-mailEmail = Your email :
-register = Register
-loginPage = Login page
\ No newline at end of file
Deleted: trunk/src/main/resources/org/chorem/bow/action/RegisterAction_fr.properties
===================================================================
--- trunk/src/main/resources/org/chorem/bow/action/RegisterAction_fr.properties 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/resources/org/chorem/bow/action/RegisterAction_fr.properties 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,10 +0,0 @@
-repeatPassword = Retapez votre mot de passe
-pwdDontMatch = Les mot de passe ne sont pas identiques
-emailAldyUsed = Cette adresse email est déjà utilisée
-invalidLogin = Login incorrect, merci d'en choisir un nouveau
-mailSubject = [Bow] Nouveau mot de passe
-mailHi = Bonjour,
-mailPwd = Votre mot de passe :
-mailEmail = Votre email :
-register = S'enregistrer
-loginPage = Connexion
Deleted: trunk/src/main/resources/org/chorem/bow/action/package.properties
===================================================================
--- trunk/src/main/resources/org/chorem/bow/action/package.properties 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/resources/org/chorem/bow/action/package.properties 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,5 +0,0 @@
-requiredstring = ${getText(fieldName)} is required
-wrongformat = ${getText(fieldName)} is not in correct format
-password = Password
-email = Email
-logout = Logout
\ No newline at end of file
Deleted: trunk/src/main/resources/org/chorem/bow/action/package_fr.properties
===================================================================
--- trunk/src/main/resources/org/chorem/bow/action/package_fr.properties 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/resources/org/chorem/bow/action/package_fr.properties 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,5 +0,0 @@
-requiredstring = ${getText(fieldName)} doit etre renseigne
-wrongformat = ${getText(fieldName)} a un format incorrect
-password = Mot de passe
-email = Email
-logout = Deconnexion
\ No newline at end of file
Modified: trunk/src/main/resources/struts.properties
===================================================================
--- trunk/src/main/resources/struts.properties 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/resources/struts.properties 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,8 +1,4 @@
-
-
-# struts.configuration=org.apache.struts2.config.DefaultConfiguration
-
-# struts.locale=en_US
+struts.locale=fr_FR
struts.i18n.encoding=UTF-8
struts.objectFactory = spring
@@ -11,9 +7,6 @@
struts.objectFactory.spring.useClassCache = true
-#struts.objectTypeDeterminer = tiger
-#struts.objectTypeDeterminer = notiger
-
# struts.multipart.parser=cos
# struts.multipart.parser=pell
struts.multipart.parser=jakarta
@@ -33,9 +26,9 @@
struts.tag.altSyntax=true
-struts.devMode = false
+struts.devMode=true
-struts.i18n.reload=false
+struts.i18n.reload=true
struts.ui.theme=xhtml
struts.ui.templateDir=template
@@ -44,15 +37,10 @@
struts.configuration.xml.reload=false
-# struts.velocity.configfile = velocity.properties
-
-# struts.velocity.contexts =
-
struts.url.http.port = 80
struts.url.https.port = 443
-# struts.custom.i18n.resources=testmessages,testmessages2
-struts.custom.i18n.resources=globalmessages
+struts.custom.i18n.resources=bow-i18n
struts.dispatcher.parametersWorkaround = false
@@ -61,4 +49,3 @@
struts.freemarker.wrapper.altMap=true
struts.xslt.nocache=false
-
Modified: trunk/src/main/webapp/WEB-INF/decorators.xml
===================================================================
--- trunk/src/main/webapp/WEB-INF/decorators.xml 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/WEB-INF/decorators.xml 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="UTF-8"?>
<decorators defaultdir="/WEB-INF/decorators">
<!-- Any urls that are excluded will never be decorated by Sitemesh -->
@@ -9,6 +9,7 @@
<pattern>/images/*</pattern>
<pattern>/dojo/*</pattern>
<pattern>/struts/*</pattern>
+ <pattern>/jsp/inc/*</pattern>
<pattern>index.jsp</pattern>
</excludes>
Deleted: trunk/src/main/webapp/admin.jsp
===================================================================
--- trunk/src/main/webapp/admin.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/admin.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,65 +0,0 @@
-<!--
- #%L
- bow
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- -->
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<%@page import="org.chorem.bow.Preference" %>
-<%@page import="org.chorem.bow.User" %>
-<%@page import="org.chorem.bow.TokenActions" %>
-<%
-User user = (User) session.getAttribute("user");
-Preference preference = (Preference) session.getAttribute("preference");
-TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
-Boolean admin = (Boolean) session.getAttribute("admin");
-if (user != null && preference != null && tokenActions != null && admin) {
-// String url = (String) request.getAttribute("bowUrl");
-// String version = (String) request.getAttribute("version");
-// String permanentToken = tokenActions.getPermanentToken();
- String check = preference.getColors();
- if (check == null) {
- preference.setColors("");
- }
- check = preference.getSearchEngineUrlResults();
- if (check == null) {
- preference.setSearchEngineUrlResults("");
- }
- check = preference.getSearchEngineUrlSuggestions();
- if (check == null) {
- preference.setSearchEngineUrlSuggestions("");
- }
- %>
- <jsp:include page="header.jsp" flush="true">
- <jsp:param name="cssFile" value="connexion.css" />
- </jsp:include>
- <div id="main">
- <jsp:include page="errorFrame.jsp" flush="true" />
- <div id="content">
- <div id="formFrame">
- <h1>Admin panel</h1>
- <br /><br />
- <a href="bow?action=reIndexation">All data re-indexation</a>
- <a href="bow?action=home" id="homePage">Return to the home page</a>
- </div>
- </div>
- </div>
- <jsp:include page="footer.jsp" flush="true" />
-<% } %>
Deleted: trunk/src/main/webapp/bookmark.jsp
===================================================================
--- trunk/src/main/webapp/bookmark.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/bookmark.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,94 +0,0 @@
-<!--
- #%L
- bow
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- -->
-<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-<%@page import="org.chorem.bow.BowConfig" %>
-<%@page import="org.chorem.bow.Bookmark" %>
-<%@page import="java.text.SimpleDateFormat" %>
-<%@page import="org.chorem.bow.BookmarkActions" %>
-<%@page import="java.util.Set" %>
-<%
-Bookmark bookmark = (Bookmark) request.getAttribute("bookmark");
-BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions");
-SimpleDateFormat sdf = (SimpleDateFormat) request.getAttribute("sdf");
-String url = (String) request.getAttribute("bowUrl");
-String aliasUrl = BowConfig.getInstance().getServletAliasUrl();
-String search = "";
-String searchLine = request.getParameter("searchLine");
-if (searchLine != null) {
- search += "&searchLine=" + searchLine;
-}
-String fullTextLine = request.getParameter("fullTextLine");
-if (fullTextLine != null) {
- search += "&fullTextLine=" + fullTextLine;
-}
-if (url != null && bookmark != null && sdf != null && bookmarkActions != null) {
- String formBookmarkId = (String) request.getAttribute("formBookmarkId");
- String link = bookmark.getLink();
- link = link.replace("'", "\\'");
-%>
-<div class="bookmark">
- <div class="bookmarkhead">
- <a class="alias" href="<%=aliasUrl + bookmark.getAlias()%>" title="<%=bookmark.getLink()%>" onclick="window.open(this.href); return false;">
- <%=bookmark.getAlias()%>
- </a>
- <p class="date"> (<%=sdf.format(bookmark.getDate())%>)</p>
- <a class="edit" href="bow?action=editBookmark&bookmarkId=<%=bookmark.getWikittyId()%><%=search%>" onclick="return modify('<%=bookmark.getDescription()%>', '<%=bookmark.getAlias()%>', '<%=BookmarkActions.getBookmarkTagsString(bookmark)%>', '<%=link%>', 'bow?action=modifyBookmark&bookmarkId=<%=bookmark.getWikittyId()%><%=search%>', '<%=bookmark.getWikittyId()%>');"></a>
- <a class="supprim" href="bow?action=removeBookmark&bookmarkId=<%=bookmark.getWikittyId()%><%=search%>"></a>
- </div>
- <div class="bookmarkcontenu">
- <div class="screenshot"></div>
- <div class="click"><%=bookmark.getClick()%></div>
- <div class="description">
- <h3>Description :</h3>
- <p>
- <a title ="<%=bookmark.getLink()%>" href="bow?action=addClick&bookmarkId=<%=bookmark.getWikittyId()%>" onclick="window.open(this.href); return false;"><%=bookmark.getDescription()%></a>
- </p>
- <p class="tags">
- <strong>Tags :</strong>
- <%
- Set<String> tagList = bookmark.getTags();
- if (tagList != null && !tagList.isEmpty()) {
- for (String tag : tagList) {
- if (formBookmarkId != null && formBookmarkId.equals(bookmark.getWikittyId())) {
- %>
- <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>
-</div>
-<% } %>
Deleted: trunk/src/main/webapp/bookmarkTop.jsp
===================================================================
--- trunk/src/main/webapp/bookmarkTop.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/bookmarkTop.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,105 +0,0 @@
-<!--
- #%L
- bow
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- -->
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<%@page import="org.chorem.bow.BookmarkActions" %>
-<%@page import="java.text.SimpleDateFormat" %>
-<%@page import="java.util.Iterator" %>
-<%@page import="java.util.Set" %>
-<%@page import="java.util.ArrayList" %>
-<%@page import="java.util.List" %>
-<%@page import="org.chorem.bow.TokenActions" %>
-<%@page import="org.nuiton.wikitty.FacetTopic" %>
-<%@page import="org.chorem.bow.Bookmark" %>
-<%@page import="org.chorem.bow.Preference" %>
-<%
-TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
-BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions");
-Boolean admin = (Boolean) session.getAttribute("admin");
-if (admin == null)
-{
- admin = false;
-}
-
-if (tokenActions != null && bookmarkActions != null)
-{
- String temporaryToken = tokenActions.getTemporaryToken();
- String permanentToken = tokenActions.getPermanentToken();
- String url = (String) request.getAttribute("bowUrl");
- int nbTags = 100;
- Preference preference = (Preference) session.getAttribute("preference");
-}
-
-int tags = preference.getTags();
-if (preference != null && tags > 0)
-{
- nbTags = tags;
-}
-
-request.setAttribute("nbTags", nbTags);
-String formLink = (String) request.getAttribute("link");
-String formName = (String) request.getAttribute("name");
-String formTags = (String) request.getAttribute("tagsNb");
-String formAlias = (String) request.getAttribute("alias");
-String formAction = (String) request.getAttribute("action");
-
-if (formLink == null)
-{
- formLink = "URL";
-}
-
-if (formName == null)
-{
- formName = "name";
-}
-
-if (formTags == null)
-{
- formTags = "tag1 tag2...";
-}
-
-if (formAlias == null)
-{
- formAlias = "alias";
-}
-
-if (formAction == null)
-{
- formAction = "bow?action=addUrl";
-}
-
-if (tokenActions != null && bookmarkActions != null)
-{
- if (searchLine != null)
- {
- String searchLine = bookmarkActions.getSearchLine();
- String fullText = bookmarkActions.getFullTextLine();
- }
- else
- {
- if (preference != null && preference.getBookmarks() > 0)
- {
- nbBookmarks = preference.getBookmarks();
- }
- }
-%>
Deleted: trunk/src/main/webapp/error.jsp
===================================================================
--- trunk/src/main/webapp/error.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/error.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,35 +0,0 @@
-<!--
- #%L
- bow
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- -->
-<%@page import="org.chorem.bow.TokenActions" %>
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<%--
- String techError = (String) request.getAttribute("errorMsgTech");
---%>
-<jsp:include page="header.jsp" flush="true">
- <jsp:param name="cssFile" value="connexion.css" />
-</jsp:include>
-<div id="main">
- <jsp:include page="errorFrame.jsp" flush="true" />
-</div>
-<jsp:include page="footer.jsp" flush="true" />
Deleted: trunk/src/main/webapp/errorFrame.jsp
===================================================================
--- trunk/src/main/webapp/errorFrame.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/errorFrame.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,35 +0,0 @@
-<!--
- #%L
- bow
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- -->
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<%
-String userError = (String) request.getAttribute("errorMsgUser");
-String techError = (String) request.getAttribute("errorMsgTech");
-
-if (userError != null) {
-%>
- <div class="menu clearfix">
- <h2>Error</h2>
- </div>
- <pre class="error"><%=userError%><% if (techError != null) { %><br /><br />Detailed error :<br /><%=techError%><% } %></pre>
-<% } %>
Deleted: trunk/src/main/webapp/footer.jsp
===================================================================
--- trunk/src/main/webapp/footer.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/footer.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,43 +0,0 @@
-<!--
- #%L
- bow
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- -->
- <%@page contentType="text/html" pageEncoding="UTF-8"%>
- <%
- String url = (String) request.getAttribute("bowUrl");
- String version = (String) request.getAttribute("version");
- %>
- </div>
- </div>
- <div id="footer">
- <p>
- <a shape="rect" href="<%=url%>">bow</a>
- <a shape="rect" href="http://www.chorem.org/projects/list_files/bow"><%=version%></a> -
- <a shape="rect" href="http://www.gnu.org/licenses/agpl.html">Licence AGPL</a> -
- <span title="Copyright">©2010</span>
- <a shape="rect" href="http://www.codelutin.com">Code Lutin</a> -
- <a shape="rect" href="http://www.chorem.org/projects/bow/issues">Rapport de bug</a> -
- <a shape="rect" href="http://list.chorem.org/cgi-bin/mailman/listinfo/bow-users">Support utilisateur</a>
- </p>
- </div>
- </body>
-</html>
Deleted: trunk/src/main/webapp/forgotPassword.jsp
===================================================================
--- trunk/src/main/webapp/forgotPassword.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/forgotPassword.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,46 +0,0 @@
-<!--
- #%L
- bow
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- -->
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<jsp:include page="header.jsp" flush="true">
- <jsp:param name="cssFile" value="connexion.css" />
-</jsp:include>
-<div id="main">
- <jsp:include page="errorFrame.jsp" flush="true" />
- <div id="content">
- <div id="formFrame">
- <h1>Forgot Your Password?</h1>
- <form method="post" action="bow?action=sendPassword">
- <p>
- <label for="email">Email :</label>
- <br />
- <br />
- <input type="text" name="email" id="email" />
- <input type="submit" value="Submit" />
- </p>
- </form>
- <a href="bow" class="register">Login page</a>
- </div>
- </div>
-</div>
-<jsp:include page="footer.jsp" flush="true" />
Deleted: trunk/src/main/webapp/header.jsp
===================================================================
--- trunk/src/main/webapp/header.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/header.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,87 +0,0 @@
-<!--
- #%L
- bow
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- -->
-<%@page import="org.chorem.bow.TokenActions" %>
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<%
- String url = (String) request.getAttribute("bowUrl");
- TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
- String css = (String) request.getParameter("cssFile");
-%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <meta name="description" content="Bookmarks On the Web" />
- <title>Bow</title>
- <link rel="icon" type="image/png" href="img/favicon.png" />
- <link rel="search" type="application/opensearchdescription+xml" title="bowTemporarySearchEngine" href="<%=url%>?action=temporaryXml" />
- <link rel="search" type="application/opensearchdescription+xml" title="bowPermanentSearchEngine" href="<%=url%>?action=permanentXml" />
- <link rel="stylesheet" type="text/css" href="./css/global.css" />
- <%
- if (css != null) {
- %>
- <link rel="stylesheet" type="text/css" href="./css/<%=css%>" />
- <% } %>
- <script type="text/javascript">
- <!--
- function modify(name, alias, tags, link, action, id) {
- 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';
- }
- return false;
- }
-
- function deleteConfirmation(goTo, bookmarksNb, importDate) {
- var confMsg = "Do you really want to delete ";
-
- if (bookmarksNb > 1) {
- confMsg += "these " + bookmarksNb + " bookmarks";
- } else {
- confMsg += "this bookmark";
- }
-
- if (importDate !== undefined)
- confMsg += " imported the " + importDate + "?";
- else
- confMsg += "?";
- if (confirm(confMsg)) {
- window.location = goTo;
- }
- }
- //-->
- </script>
-</head>
-<body>
-<div id="wrap">
- <div id="page">
- <div id="header">
- <a class="logo" href="<%=url%><% if (tokenActions != null) { %>?action=home&token=<%=tokenActions.getPermanentToken()%><% } %>">bow</a>
- </div>
Deleted: trunk/src/main/webapp/home.jsp
===================================================================
--- trunk/src/main/webapp/home.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/home.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,101 +0,0 @@
-<!--
- #%L
- bow
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- -->
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<%@page import="org.chorem.bow.BookmarkActions" %>
-<%@page import="org.chorem.bow.TokenActions" %>
-<%@page import="org.chorem.bow.Bookmark" %>
-<%@page import="org.chorem.bow.Preference" %>
-<%@page import="java.util.List" %>
-<%@page import="java.text.SimpleDateFormat" %>
-<%
-TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
-BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions");
-Preference preference = (Preference) session.getAttribute("preference");
-
-if (tokenActions != null && bookmarkActions != null) {
- %>
- <jsp:include page="header.jsp" flush="true">
- <jsp:param name="cssFile" value="bookmark.css" />
- </jsp:include>
- <div id="main">
- <jsp:include page="errorFrame.jsp" flush="true" />
- <div class="menu clearfix">
- <h2>The most used bookmarks</h2>
- </div>
- <div class="content">
- <%
- int nbBookmarks = 10;
- if (preference != null) {
- if (preference.getBookmarks() > 0)
- nbBookmarks = preference.getBookmarks();
- }
- SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
- List<Bookmark> bookmarkList = bookmarkActions.getBookmarks();
- if (!bookmarkList.isEmpty()) {
- int count = 0;
- for (Bookmark bookmark : bookmarkList) {
- request.setAttribute("bookmark", bookmark);
- request.setAttribute("sdf", sdf);
- %>
- <jsp:include page="bookmark.jsp" flush="true" />
- <%
- ++count;
- if (count >= nbBookmarks) {
- break;
- }
- }
- }
- else { %>
- <p class="nobookmarks">No Bookmarks</p>
- <% } %>
- </div>
-
- <div class="menu clearfix">
- <h2>The latest added bookmarks</h2>
- </div>
- <div class="content">
- <%
- List<Bookmark> lastBookmarks = bookmarkActions.getLastBookmarks();
- if (!lastBookmarks.isEmpty()) {
- int count = 0;
- for (Bookmark bookmark : lastBookmarks) {
- request.setAttribute("bookmark", bookmark);
- request.setAttribute("sdf", sdf);
- %>
- <jsp:include page="bookmark.jsp" flush="true" />
- <%
- ++count;
- if (count >= nbBookmarks) {
- break;
- }
- }
- }
- else { %>
- <p class="nobookmarks">No Bookmarks</p>
- <% } %>
- </div>
- </div>
- <jsp:include page="rightMenu.jsp" flush="true" />
- <jsp:include page="footer.jsp" flush="true" />
-<% } %>
Added: trunk/src/main/webapp/jsp/admin.jsp
===================================================================
--- trunk/src/main/webapp/jsp/admin.jsp (rev 0)
+++ trunk/src/main/webapp/jsp/admin.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ #%L
+ bow
+
+ $Id: admin.jsp 144 2010-12-23 10:24:48Z bpoussin $
+ $HeadURL: http://svn.chorem.org/svn/bow/trunk/src/main/webapp/admin.jsp $
+ %%
+ Copyright (C) 2010 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@taglib prefix="s" uri="/struts-tags"%>
+<%@page import="org.chorem.bow.Preference" %>
+<%@page import="org.chorem.bow.User" %>
+<%@page import="org.chorem.bow.TokenActions" %>
+<%
+User user = (User) session.getAttribute("user");
+Preference preference = (Preference) session.getAttribute("preference");
+TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
+Boolean admin = (Boolean) session.getAttribute("admin");
+if (user != null && preference != null && tokenActions != null && admin) {
+// String url = (String) request.getAttribute("bowUrl");
+// String version = (String) request.getAttribute("version");
+// String permanentToken = tokenActions.getPermanentToken();
+ String check = preference.getColors();
+ if (check == null) {
+ preference.setColors("");
+ }
+ check = preference.getSearchEngineUrlResults();
+ if (check == null) {
+ preference.setSearchEngineUrlResults("");
+ }
+ check = preference.getSearchEngineUrlSuggestions();
+ if (check == null) {
+ preference.setSearchEngineUrlSuggestions("");
+ }
+ %>
+ <html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <head>
+ <s:url id="css" value="/css/bookmark.css" />
+ <link href="${css}" rel="stylesheet" type="text/css" />
+ <s:head />
+ </head>
+ <body>
+ <div id="content">
+ <div id="formFrame">
+ <h1>Admin panel</h1>
+ <br /><br />
+ <a href="/bow/reIndexation.action">All data re-indexation</a>
+ <a href="/bow/home.action" id="homePage">Return to the home page</a>
+ </div>
+ </div>
+ </body>
+ </html>
+<% } %>
Property changes on: trunk/src/main/webapp/jsp/admin.jsp
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/src/main/webapp/jsp/error.jsp (from rev 154, trunk/src/main/webapp/error.jsp)
===================================================================
--- trunk/src/main/webapp/jsp/error.jsp (rev 0)
+++ trunk/src/main/webapp/jsp/error.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ #%L
+ bow
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@taglib prefix="s" uri="/struts-tags"%>
+<%@page import="org.chorem.bow.TokenActions" %>
+<%--
+ String techError = (String) request.getAttribute("errorMsgTech");
+--%>
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <head>
+ <s:url id="css" value="/css/connexion.css" />
+ <link href="${css}" rel="stylesheet" type="text/css" />
+ <s:head />
+ </head>
+ <body>
+ <div id="main">
+ <jsp:include page="errorFrame.jsp" flush="true" />
+ </div>
+ </body>
+</html>
+
Property changes on: trunk/src/main/webapp/jsp/error.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/src/main/webapp/jsp/forgotPassword.jsp
===================================================================
--- trunk/src/main/webapp/jsp/forgotPassword.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/jsp/forgotPassword.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
#%L
bow
@@ -23,22 +24,27 @@
-->
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<head>
- <link href="<s:url value='/css/connexion.css'/>" rel="stylesheet" type="text/css" />
+ <title><s:text name="bow.forgotpwd.title" /></title>
+ <s:url id="css" value="/css/connexion.css" />
+ <link href="${css}" rel="stylesheet" type="text/css" />
<s:head />
</head>
<body>
<div id="content">
<div id="formFrame">
- <h1><s:property value="%{getText('forgotPwd')}" /></h1>
- <s:form action="/bow/forgotPassword.action">
+ <h1><s:text name="bow.forgotpwd.title" /></h1>
+ <s:form action="forgotPassword">
<p>
- <s:textfield key="email" name="email" label="%{getText('email')}" />
- <s:submit value="%{getText('submit')}" />
+ <s:textfield key="bow.login.email" name="email" />
+ <s:submit key="bow.forgotpwd.submit" />
</p>
</s:form>
- <a href="<%= request.getContextPath() %>" class="register"><s:property value="%{getText('loginPage')}" /></a>
+ <s:a action="login_input"><s:text name="bow.login.title" /></s:a>
</div>
</div>
</body>
Modified: trunk/src/main/webapp/jsp/home.jsp
===================================================================
--- trunk/src/main/webapp/jsp/home.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/jsp/home.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
#%L
bow
@@ -36,9 +37,14 @@
if (tokenActions != null && bookmarkActions != null) {
%>
- <html>
+ <html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<head>
- <link href="<s:url value='/css/bookmark.css'/>" rel="stylesheet" type="text/css" />
+ <title><s:text name="bow.home.title" /></title>
+ <s:url id="css" value="/css/bookmark.css" />
+ <link href="${css}" rel="stylesheet" type="text/css" />
<s:head />
</head>
<body>
Modified: trunk/src/main/webapp/jsp/inc/bookmark.jsp
===================================================================
--- trunk/src/main/webapp/jsp/inc/bookmark.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/jsp/inc/bookmark.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
#%L
bow
Copied: trunk/src/main/webapp/jsp/inc/bookmarkTop.jsp (from rev 154, trunk/src/main/webapp/bookmarkTop.jsp)
===================================================================
--- trunk/src/main/webapp/jsp/inc/bookmarkTop.jsp (rev 0)
+++ trunk/src/main/webapp/jsp/inc/bookmarkTop.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ #%L
+ bow
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@page import="org.chorem.bow.BookmarkActions" %>
+<%@page import="java.text.SimpleDateFormat" %>
+<%@page import="java.util.Iterator" %>
+<%@page import="java.util.Set" %>
+<%@page import="java.util.ArrayList" %>
+<%@page import="java.util.List" %>
+<%@page import="org.chorem.bow.TokenActions" %>
+<%@page import="org.nuiton.wikitty.FacetTopic" %>
+<%@page import="org.chorem.bow.Bookmark" %>
+<%@page import="org.chorem.bow.Preference" %>
+<%
+TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
+BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions");
+Boolean admin = (Boolean) session.getAttribute("admin");
+if (admin == null)
+{
+ admin = false;
+}
+
+if (tokenActions != null && bookmarkActions != null)
+{
+ String temporaryToken = tokenActions.getTemporaryToken();
+ String permanentToken = tokenActions.getPermanentToken();
+ String url = (String) request.getAttribute("bowUrl");
+ int nbTags = 100;
+ Preference preference = (Preference) session.getAttribute("preference");
+}
+
+int tags = preference.getTags();
+if (preference != null && tags > 0)
+{
+ nbTags = tags;
+}
+
+request.setAttribute("nbTags", nbTags);
+String formLink = (String) request.getAttribute("link");
+String formName = (String) request.getAttribute("name");
+String formTags = (String) request.getAttribute("tagsNb");
+String formAlias = (String) request.getAttribute("alias");
+String formAction = (String) request.getAttribute("action");
+
+if (formLink == null)
+{
+ formLink = "URL";
+}
+
+if (formName == null)
+{
+ formName = "name";
+}
+
+if (formTags == null)
+{
+ formTags = "tag1 tag2...";
+}
+
+if (formAlias == null)
+{
+ formAlias = "alias";
+}
+
+if (formAction == null)
+{
+ formAction = "bow?action=addUrl";
+}
+
+if (tokenActions != null && bookmarkActions != null)
+{
+ if (searchLine != null)
+ {
+ String searchLine = bookmarkActions.getSearchLine();
+ String fullText = bookmarkActions.getFullTextLine();
+ }
+ else
+ {
+ if (preference != null && preference.getBookmarks() > 0)
+ {
+ nbBookmarks = preference.getBookmarks();
+ }
+ }
+%>
Property changes on: trunk/src/main/webapp/jsp/inc/bookmarkTop.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/src/main/webapp/jsp/inc/errorFrame.jsp
===================================================================
--- trunk/src/main/webapp/jsp/inc/errorFrame.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/jsp/inc/errorFrame.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<%
String userError = (String) request.getAttribute("errorMsgUser");
String techError = (String) request.getAttribute("errorMsgTech");
Modified: trunk/src/main/webapp/jsp/inc/rightMenu.jsp
===================================================================
--- trunk/src/main/webapp/jsp/inc/rightMenu.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/jsp/inc/rightMenu.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" ?>
<!--
#%L
bow
@@ -76,7 +77,10 @@
if (formAction == null)
formAction = "/bow/addUrl.action";
%>
-<div id="logout">
+<div id="logout" xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<s:form action="/bow/logout.action">
<div class="input">
<s:submit value="%{getText('logout')}" />
Modified: trunk/src/main/webapp/jsp/inc/tagsCloud.jsp
===================================================================
--- trunk/src/main/webapp/jsp/inc/tagsCloud.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/jsp/inc/tagsCloud.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -25,8 +25,8 @@
<%@page import="java.util.List" %>
<%@page import="org.nuiton.wikitty.FacetTopic" %>
<%
-BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions");
-int nbTags = (Integer) request.getAttribute("nbTags");
+BookmarkActions bookmarkActions = (BookmarkActions)request.getAttribute("bookmarkActions");
+int nbTags = (Integer)request.getAttribute("nbTags");
String search = "";
String searchLine = request.getParameter("searchLine");
if (searchLine != null) {
@@ -40,7 +40,7 @@
String tagName = tag.getTopicName();
int font = bookmarkActions.getFont(value);
%>
- <a href="bow?action=search&addTag=<%=tagName%><%=search%>" title="<%=value%> result<%=(value != 1 ? "s" : "")%>" class="tag" style="font-size: <%=font%>px;"><%=tagName%></a>
+ <a href="/bow/search.action&addTag=<%=tagName%><%=search%>" title="<%=value%> result<%=(value != 1 ? "s" : "")%>" class="tag" style="font-size: <%=font%>px;"><%=tagName%></a>
<%
++count;
if (count >= nbTags) {
Deleted: trunk/src/main/webapp/jsp/index.jsp
===================================================================
--- trunk/src/main/webapp/jsp/index.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/jsp/index.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,20 +0,0 @@
-<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.1 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<%@taglib prefix="s" uri="/struts-tags" %>
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title>Index</title>
- <s:head />
- </head>
- <body>
- <s:form action="helloWorld">
- <s:textfield label="What is your name?" name="name" />
- <s:textfield label="What is the date?" name="dateNow" />
- <s:submit />
- </s:form>
- </body>
-</html>
-
Modified: trunk/src/main/webapp/jsp/login.jsp
===================================================================
--- trunk/src/main/webapp/jsp/login.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/jsp/login.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,35 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<head>
- <link href="<s:url value='/css/connexion.css'/>" rel="stylesheet" type="text/css" />
+ <title><s:text name="bow.login.title" /></title>
+ <s:url id="css" value="/css/connexion.css" />
+ <link href="${css}" rel="stylesheet" type="text/css" />
<s:head />
</head>
<body>
<div id="content">
<div id="formFrame">
- <h1><s:property value="%{getText('login')}" /></h1>
- <s:form action="/bow/login.action">
+ <h1><s:text name="bow.login.title" /></h1>
+ <s:form action="login">
<p>
- <s:textfield key="email" name="email" label="%{getText('email')}" />
- <br /><br />
- <s:password key="password" name="password" label="%{getText('password')}" />
- <br /><br />
- <s:submit value="%{getText('login')}" />
+ <s:textfield key="bow.login.email" name="email" /><br /><br />
+ <s:password key="bow.login.password" name="password" /><br /><br />
+ <s:submit key="bow.login.submit" />
</p>
</s:form>
<s:url id="localeEN" action="login_input">
- <s:param name="request_locale" >en</s:param>
+ <s:param name="request_locale" >en_GB</s:param>
</s:url>
<s:url id="localeFR" action="login_input">
- <s:param name="request_locale" >fr</s:param>
+ <s:param name="request_locale" >fr_FR</s:param>
</s:url>
<s:a href="%{localeEN}">English</s:a><br />
<s:a href="%{localeFR}">French</s:a><br />
- <a href="<%= request.getContextPath() %>/register_input.action" id="register"><s:property value="%{getText('register')}" /></a>
- <a href="<%= request.getContextPath() %>/forgotPassword.action" id="forgotPwd"><s:property value="%{getText('forgotpwd')}" /></a>
+
+ <s:a action="register_input"><s:text name="bow.register.title" /></s:a><br />
+ <s:a action="forgotPassword_input"><s:text name="bow.forgotpwd.title" /></s:a>
</div>
</div>
</body>
Copied: trunk/src/main/webapp/jsp/permanentXml.jsp (from rev 154, trunk/src/main/webapp/permanentXml.jsp)
===================================================================
--- trunk/src/main/webapp/jsp/permanentXml.jsp (rev 0)
+++ trunk/src/main/webapp/jsp/permanentXml.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -0,0 +1,47 @@
+<!--
+ #%L
+ bow
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+<%@page contentType="text/xml" pageEncoding="UTF-8"%>
+<%@page import="org.chorem.bow.TokenActions" %>
+
+<%
+ TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
+ String token = "";
+ if (tokenActions != null) {
+ token = tokenActions.getPermanentToken();
+ }
+ String url = request.getRequestURL().toString();
+ int index = url.indexOf("permanentXml.jsp");
+ url = url.substring(0, index);
+%>
+
+<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
+ xmlns:moz="http://www.mozilla.org/2006/browser/search/">
+ <ShortName>bowPermanentSearchEngine</ShortName>
+ <Description>bookmarkSearch</Description>
+ <InputEncoding>inputEncoding</InputEncoding>
+ <Image width="16" height="16" type="image/ico"><%=url%>img/bow.gif</Image>
+ <Url type="text/html" method="GET" template="<%=url%>bow?action=openSearchResult&token=<%=token%>&searchLine={searchTerms}" />
+ <Url type="application/x-suggestions+json" method="GET" template="<%=url%>bow?action=openSearchSuggestion&token=<%=token%>&searchLine={searchTerms}" />
+ <moz:SearchForm><%=url%>bow</moz:SearchForm>
+</OpenSearchDescription>
Property changes on: trunk/src/main/webapp/jsp/permanentXml.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/src/main/webapp/jsp/preferences.jsp
===================================================================
--- trunk/src/main/webapp/jsp/preferences.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/jsp/preferences.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
#%L
bow
@@ -65,9 +66,13 @@
preference.setSearchEngineUrlSuggestions("");
}
%>
- <html>
+ <html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<head>
- <link href="<s:url value='/css/bookmark.css'/>" rel="stylesheet" type="text/css" />
+ <s:url value="/css/bookmark.css" />
+ <link href="${css}" rel="stylesheet" type="text/css" />
<s:head />
</head>
<body>
Modified: trunk/src/main/webapp/jsp/register.jsp
===================================================================
--- trunk/src/main/webapp/jsp/register.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/jsp/register.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
#%L
bow
@@ -23,24 +24,29 @@
-->
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<head>
- <link href="<s:url value='/css/connexion.css'/>" rel="stylesheet" type="text/css" />
+ <title><s:text name="bow.register.title" /></title>
+ <s:url id="css" value="/css/connexion.css" />
+ <link href="${css}" rel="stylesheet" type="text/css" />
<s:head />
</head>
<body>
<div id="content">
<div id="formFrame">
- <h1><s:property value="%{getText('register')}" /></h1>
- <s:form action="/bow/register.action">
+ <h1><s:text name="bow.register.title" /></h1>
+ <s:form action="register">
<p>
- <s:textfield key="email" name="email" label="%{getText('email')}" />
- <s:password key="password" name="password" label="%{getText('password')}" />
- <s:password key="repeatPassword" name="repeatPassword" label="%{getText('repeatPassword')}" />
- <s:submit value="%{getText('register')}" />
+ <s:textfield key="bow.login.email" name="email" />
+ <s:password key="bow.login.password" name="password" />
+ <s:password key="bow.login.repeatPassword" name="repeatPassword" />
+ <s:submit key="bow.register.submit" />
</p>
</s:form>
- <a href="<%= request.getContextPath() %>" id="register"><s:property value="%{getText('loginPage')}" /></a>
+ <s:a action="login_input"><s:text name="bow.login.title" /></s:a>
</div>
</div>
</body>
Added: trunk/src/main/webapp/jsp/search.jsp
===================================================================
--- trunk/src/main/webapp/jsp/search.jsp (rev 0)
+++ trunk/src/main/webapp/jsp/search.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -0,0 +1,92 @@
+<!--
+ #%L
+ bow
+
+ $Id: search.jsp 144 2010-12-23 10:24:48Z bpoussin $
+ $HeadURL: http://svn.chorem.org/svn/bow/trunk/src/main/webapp/search.jsp $
+ %%
+ Copyright (C) 2010 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@page import="org.chorem.bow.BookmarkActions" %>
+<%@page import="org.chorem.bow.TokenActions" %>
+<%@page import="org.chorem.bow.Bookmark" %>
+<%@page import="org.chorem.bow.Preference" %>
+<%@page import="java.text.SimpleDateFormat" %>
+<%@page import="java.util.List" %>
+<%
+TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
+BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions");
+//Preference preference = (Preference) session.getAttribute("preference");
+String searchLine = bookmarkActions.getSearchLine();
+String fullText = bookmarkActions.getFullTextLine();
+
+if (tokenActions != null && bookmarkActions != null) {
+ %>
+ <jsp:include page="header.jsp" flush="true">
+ <jsp:param name="cssFile" value="bookmark.css" />
+ </jsp:include>
+ <div id="main">
+ <jsp:include page="errorFrame.jsp" flush="true" />
+ <div class="menu clearfix">
+ <h2>Search</h2>
+ <form method="post" action="bow?action=order&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">
+ <p>
+ <label for="type">Order By :</label>
+ <select id="type" name="type">
+ <option value="ascName">Asc Name</option>
+ <option value="descName">Desc Name</option>
+ <option value="ascClick">Asc Click</option>
+ <option value="descClick">Desc Click</option>
+ <option value="ascDate">Asc Date</option>
+ <option value="descDate">Desc Date</option>
+ </select>
+ <input type="submit" value="OK" />
+ <%
+ List<Bookmark> bookmarkList = bookmarkActions.getBookmarks();
+ int bookmarksNb = bookmarkList.size();
+
+ if (bookmarksNb > 0) {
+ %>
+ <a id="deleteSearchResultsButton" href="" onclick="deleteConfirmation('bow?action=deleteSearchResults&searchLine=<%= searchLine %>&fullTextLine=<%= fullText %>', <%=bookmarksNb%>); return(false);"></a>
+ <% } %>
+ </p>
+ </form>
+ </div>
+ <div class="content">
+ <%
+ if (!bookmarkList.isEmpty()) {
+ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
+ for (Bookmark bookmark : bookmarkList) {
+ request.setAttribute("bookmark", bookmark);
+ request.setAttribute("sdf", sdf);
+ %>
+ <jsp:include page="bookmark.jsp" flush="true">
+ <jsp:param name="searchLine" value="<%=searchLine%>" />
+ <jsp:param name="fullTextLine" value="<%=fullText%>" />
+ </jsp:include>
+ <%
+ }
+ }
+ else { %>
+ <p class="nobookmarks">No Bookmarks</p>
+ <% } %>
+ </div>
+ </div>
+ <jsp:include page="rightMenu.jsp" flush="true" />
+ <jsp:include page="footer.jsp" flush="true" />
+<% } %>
Property changes on: trunk/src/main/webapp/jsp/search.jsp
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/src/main/webapp/jsp/suggestions.jsp (from rev 154, trunk/src/main/webapp/suggestions.jsp)
===================================================================
--- trunk/src/main/webapp/jsp/suggestions.jsp (rev 0)
+++ trunk/src/main/webapp/jsp/suggestions.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -0,0 +1,44 @@
+<!--
+ #%L
+ bow
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@page import="org.chorem.bow.OpenSearchActions" %>
+<%@page import="java.util.List" %>
+<%@page import="java.util.Iterator" %>
+<%@page import="org.nuiton.wikitty.FacetTopic" %>
+
+
+<%
+ OpenSearchActions osa = (OpenSearchActions) request.getAttribute("openSearchAction");
+ if (osa != null) {
+ String[] word = osa.getSearch();
+ if (word != null) {
+ List<FacetTopic> suggestions = osa.getSuggestionList();
+ if (suggestions != null) {
+%>
+<%=osa.getJsonResult()%>
+<%
+ }
+ }
+ }
+%>
Property changes on: trunk/src/main/webapp/jsp/suggestions.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Copied: trunk/src/main/webapp/jsp/temporaryXml.jsp (from rev 154, trunk/src/main/webapp/temporaryXml.jsp)
===================================================================
--- trunk/src/main/webapp/jsp/temporaryXml.jsp (rev 0)
+++ trunk/src/main/webapp/jsp/temporaryXml.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -0,0 +1,47 @@
+<!--
+ #%L
+ bow
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+<%@page contentType="text/xml" pageEncoding="UTF-8"%>
+<%@page import="org.chorem.bow.TokenActions" %>
+
+<%
+ TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
+ String token = "";
+ if (tokenActions != null) {
+ token = tokenActions.getTemporaryToken();
+ }
+ String url = request.getRequestURL().toString();
+ int index = url.indexOf("temporaryXml.jsp");
+ url = url.substring(0, index);
+%>
+
+<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
+ xmlns:moz="http://www.mozilla.org/2006/browser/search/">
+ <ShortName>bowTemporarySearchEngine</ShortName>
+ <Description>bookmarkSearch</Description>
+ <InputEncoding>inputEncoding</InputEncoding>
+ <Image width="16" height="16" type="image/ico"><%=url%>img/bow.gif</Image>
+ <Url type="text/html" method="GET" template="<%=url%>bow?action=openSearchResult&token=<%=token%>&searchLine={searchTerms}" />
+ <Url type="application/x-suggestions+json" method="GET" template="<%=url%>bow?action=openSearchSuggestion&token=<%=token%>&search={searchTerms}" />
+ <moz:SearchForm><%=url%>bow</moz:SearchForm>
+</OpenSearchDescription>
Property changes on: trunk/src/main/webapp/jsp/temporaryXml.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Deleted: trunk/src/main/webapp/login.jsp
===================================================================
--- trunk/src/main/webapp/login.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/login.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,51 +0,0 @@
-<!--
- #%L
- bow
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- -->
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<jsp:include page="header.jsp" flush="true">
- <jsp:param name="cssFile" value="connexion.css" />
-</jsp:include>
-<div id="main">
- <jsp:include page="errorFrame.jsp" flush="true" />
- <div id="content">
- <div id="formFrame">
- <h1>Login</h1>
- <form method="post" action="bow?action=login">
- <div>
- <label for="email">Email :</label>
- <input type="text" name="email" id="email" />
- </div>
- <div>
- <label for="password">Password :</label>
- <input type="password" name="password" id="password" />
- </div>
- <div>
- <input type="submit" value="Login" />
- </div>
- </form>
- <a href="bow?action=registration" id="register">Register</a>
- <a href="bow?action=forgotPassword" id="forgotPwd">Forgot Your Password?</a>
- </div>
- </div>
-</div>
-<jsp:include page="footer.jsp" flush="true" />
Deleted: trunk/src/main/webapp/permanentXml.jsp
===================================================================
--- trunk/src/main/webapp/permanentXml.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/permanentXml.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,47 +0,0 @@
-<!--
- #%L
- bow
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- -->
-<%@page contentType="text/xml" pageEncoding="UTF-8"%>
-<%@page import="org.chorem.bow.TokenActions" %>
-
-<%
- TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
- String token = "";
- if (tokenActions != null) {
- token = tokenActions.getPermanentToken();
- }
- String url = request.getRequestURL().toString();
- int index = url.indexOf("permanentXml.jsp");
- url = url.substring(0, index);
-%>
-
-<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
- xmlns:moz="http://www.mozilla.org/2006/browser/search/">
- <ShortName>bowPermanentSearchEngine</ShortName>
- <Description>bookmarkSearch</Description>
- <InputEncoding>inputEncoding</InputEncoding>
- <Image width="16" height="16" type="image/ico"><%=url%>img/bow.gif</Image>
- <Url type="text/html" method="GET" template="<%=url%>bow?action=openSearchResult&token=<%=token%>&searchLine={searchTerms}" />
- <Url type="application/x-suggestions+json" method="GET" template="<%=url%>bow?action=openSearchSuggestion&token=<%=token%>&searchLine={searchTerms}" />
- <moz:SearchForm><%=url%>bow</moz:SearchForm>
-</OpenSearchDescription>
Deleted: trunk/src/main/webapp/preferences.jsp
===================================================================
--- trunk/src/main/webapp/preferences.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/preferences.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,148 +0,0 @@
-<!--
- #%L
- bow
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- -->
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<%@page import="org.chorem.bow.Preference"%>
-<%@page import="org.chorem.bow.User"%>
-<%@page import="org.chorem.bow.TokenActions"%>
-<%@page import="org.chorem.bow.BookmarkActions"%>
-<%@page import="org.chorem.bow.Bookmark" %>
-<%@page import="org.chorem.bow.Import" %>
-<%@page import="org.nuiton.wikitty.FacetTopic" %>
-<%@page import="java.util.List" %>
-<%@page import="java.util.Date" %>
-<%
-User user = (User) session.getAttribute("user");
-Preference preference = (Preference) session.getAttribute("preference");
-TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
-//Boolean admin = (Boolean) session.getAttribute("admin");
-//if (admin == null) {
-// admin = false;
-//}
-int nbTags = 100;
-
-if (user != null && preference != null && tokenActions != null){
- int tags = preference.getTags();
- if (tags > 0) {
- nbTags = tags;
- }
- request.setAttribute("nbTags", nbTags);
-// String url = (String) request.getAttribute("bowUrl");
-// String version = (String) request.getAttribute("version");
-// String temporaryToken = tokenActions.getTemporaryToken();
-// String permanentToken = tokenActions.getPermanentToken();
- String check = preference.getColors();
- if (check == null) {
- preference.setColors("");
- }
- check = preference.getSearchEngineUrlResults();
- if (check == null) {
- preference.setSearchEngineUrlResults("");
- }
- check = preference.getSearchEngineUrlSuggestions();
- if (check == null) {
- preference.setSearchEngineUrlSuggestions("");
- }
- %>
- <jsp:include page="header.jsp" flush="true">
- <jsp:param name="cssFile" value="bookmark.css" />
- </jsp:include>
- <div id="main">
- <jsp:include page="errorFrame.jsp" flush="true" />
- <div id="content">
- <div class="menu clearfix">
- <h2>Preferences</h2>
- </div>
- <form method="post" action="bow?action=changePreferences">
- <div class="formFrame">
- <h3>User information</h3>
- <p>
- <label for="email">Email :</label><br />
- <input type="text" name="email" id="email" value="<%=user.getEmail()%>" /><br /><br />
- <label for="password">Current password :</label><br />
- <input type="password" id="password" name="currentPassword" /><br /><br />
- <label for="newPassword">New password :</label><br />
- <input type="password" id="newPassword" name="newPassword" /><br /><br />
- <label for="confirmNewPassword">Confirm new password :</label><br />
- <input type="password" id="confirmNewPassword" name="confirmNewPassword" />
- <a href="bow?action=generateToken" id="regenPermToken">Regenerate permanent token</a>
- </p>
- </div>
- <div class="formFrame">
- <h3>Site look</h3>
- <p>
- <label for="colors">Site color</label><br />
- <input type="text" name="colors" id="colors" value="<%=preference.getColors()%>" /><br />
- <label for="tagsNb">Number of tags displayed in the tag cloud</label><br />
- <input type="text" name="tagsNb" id="tagsNb" value="<%=nbTags%>" /><br />
- <label for="bookmarks">Number of bookmarks displayed on the home page</label><br />
- <input type="text" name="bookmarks" id="bookmarks" value="<%=preference.getBookmarks()%>"/><br />
- <label for="searchEngineUrlSuggestions">Search Engine URL Suggestions</label><br />
- <input type="text" name="searchEngineUrlSuggestions" id="searchEngineUrlSuggestions" value="<%=preference.getSearchEngineUrlSuggestions()%>"/><br />
- <label for="searchEngineUrlResults">Search Engine URL Results ({searchTerms} will be replaced by your text)</label><br />
- <input type="text" name="searchEngineUrlResults" id="searchEngineUrlResults" value="<%=preference.getSearchEngineUrlResults()%>"/><br />
- <input type="submit" value="Change" />
- <br /><br />
- <a href="bow?action=home" id="homePage">Return to the home page</a>
- </p>
- </div>
- </form>
- <div class="menu clearfix">
- <h2>Imported bookmarks</h2>
- </div>
- <%
- List<FacetTopic> bookmarkImportList = (List<FacetTopic>)request.getAttribute("bookmarksImportDate");
- if (bookmarkImportList != null) {
- if (bookmarkImportList.size() > 0) {
- String bgColors[] = {"Pink", "White"};
- int i = 0;
- int colorsNb = bgColors.length;
-
- for (FacetTopic bookmarkImport : bookmarkImportList) {
- String date = bookmarkImport.getTopicName();
- String dateSave = date;
-
- date = date.replaceAll("[^0-9:-]+", " ").trim();
- date = date.substring(0, date.lastIndexOf(' '));
- %>
- <div class="deleteImport deleteImport<%=bgColors[i % colorsNb]%>">
- <span><%= date + " (" + bookmarkImport.getCount() + " bookmarks)" %></span>
- <a class="deleteImportButton" href="" onclick="deleteConfirmation('bow?action=deleteImport&date=<%=dateSave%>',<%=bookmarkImport.getCount()%>,'<%=date%>'); return(false);"></a>
- </div>
- <%
- i++;
- }
- } else {
- %>
- <div class="deleteImport deleteImportWhite">
- <span>No imported bookmarks</span>
- </div>
- <%
- }
- }
- %>
- </div>
- </div>
- <jsp:include page="rightMenu.jsp" flush="true" />
- <jsp:include page="footer.jsp" flush="true" />
-<% } %>
Deleted: trunk/src/main/webapp/register.jsp
===================================================================
--- trunk/src/main/webapp/register.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/register.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,54 +0,0 @@
-<!--
- #%L
- bow
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- -->
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<jsp:include page="header.jsp" flush="true">
- <jsp:param name="cssFile" value="connexion.css" />
-</jsp:include>
-<div id="main">
- <jsp:include page="errorFrame.jsp" flush="true" />
- <div id="content">
- <div id="formFrame">
- <h1>Register</h1>
- <form method="post" action="bow?action=register">
- <div>
- <label for="email">Email :</label>
- <input type="text" name="email" id="email" />
- </div>
- <div>
- <label for="password">Password :</label>
- <input type="password" name="password" id="password" />
- </div>
- <div>
- <label for="repeatPassword">Repeat the password :</label>
- <input type="password" name="repeatPassword" id="repeatPassword" />
- </div>
- <div>
- <input type="submit" value="Register" />
- </div>
- </form>
- <a href="bow" id="register">Login page</a>
- </div>
- </div>
-</div>
-<jsp:include page="footer.jsp" flush="true" />
Deleted: trunk/src/main/webapp/search.jsp
===================================================================
--- trunk/src/main/webapp/search.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/search.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,92 +0,0 @@
-<!--
- #%L
- bow
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- -->
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<%@page import="org.chorem.bow.BookmarkActions" %>
-<%@page import="org.chorem.bow.TokenActions" %>
-<%@page import="org.chorem.bow.Bookmark" %>
-<%@page import="org.chorem.bow.Preference" %>
-<%@page import="java.text.SimpleDateFormat" %>
-<%@page import="java.util.List" %>
-<%
-TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
-BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions");
-//Preference preference = (Preference) session.getAttribute("preference");
-String searchLine = bookmarkActions.getSearchLine();
-String fullText = bookmarkActions.getFullTextLine();
-
-if (tokenActions != null && bookmarkActions != null) {
- %>
- <jsp:include page="header.jsp" flush="true">
- <jsp:param name="cssFile" value="bookmark.css" />
- </jsp:include>
- <div id="main">
- <jsp:include page="errorFrame.jsp" flush="true" />
- <div class="menu clearfix">
- <h2>Search</h2>
- <form method="post" action="bow?action=order&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">
- <p>
- <label for="type">Order By :</label>
- <select id="type" name="type">
- <option value="ascName">Asc Name</option>
- <option value="descName">Desc Name</option>
- <option value="ascClick">Asc Click</option>
- <option value="descClick">Desc Click</option>
- <option value="ascDate">Asc Date</option>
- <option value="descDate">Desc Date</option>
- </select>
- <input type="submit" value="OK" />
- <%
- List<Bookmark> bookmarkList = bookmarkActions.getBookmarks();
- int bookmarksNb = bookmarkList.size();
-
- if (bookmarksNb > 0) {
- %>
- <a id="deleteSearchResultsButton" href="" onclick="deleteConfirmation('bow?action=deleteSearchResults&searchLine=<%= searchLine %>&fullTextLine=<%= fullText %>', <%=bookmarksNb%>); return(false);"></a>
- <% } %>
- </p>
- </form>
- </div>
- <div class="content">
- <%
- if (!bookmarkList.isEmpty()) {
- SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
- for (Bookmark bookmark : bookmarkList) {
- request.setAttribute("bookmark", bookmark);
- request.setAttribute("sdf", sdf);
- %>
- <jsp:include page="bookmark.jsp" flush="true">
- <jsp:param name="searchLine" value="<%=searchLine%>" />
- <jsp:param name="fullTextLine" value="<%=fullText%>" />
- </jsp:include>
- <%
- }
- }
- else { %>
- <p class="nobookmarks">No Bookmarks</p>
- <% } %>
- </div>
- </div>
- <jsp:include page="rightMenu.jsp" flush="true" />
- <jsp:include page="footer.jsp" flush="true" />
-<% } %>
Deleted: trunk/src/main/webapp/suggestions.jsp
===================================================================
--- trunk/src/main/webapp/suggestions.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/suggestions.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,44 +0,0 @@
-<!--
- #%L
- bow
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- -->
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<%@page import="org.chorem.bow.OpenSearchActions" %>
-<%@page import="java.util.List" %>
-<%@page import="java.util.Iterator" %>
-<%@page import="org.nuiton.wikitty.FacetTopic" %>
-
-
-<%
- OpenSearchActions osa = (OpenSearchActions) request.getAttribute("openSearchAction");
- if (osa != null) {
- String[] word = osa.getSearch();
- if (word != null) {
- List<FacetTopic> suggestions = osa.getSuggestionList();
- if (suggestions != null) {
-%>
-<%=osa.getJsonResult()%>
-<%
- }
- }
- }
-%>
Deleted: trunk/src/main/webapp/temporaryXml.jsp
===================================================================
--- trunk/src/main/webapp/temporaryXml.jsp 2010-12-30 17:57:29 UTC (rev 154)
+++ trunk/src/main/webapp/temporaryXml.jsp 2010-12-31 15:48:49 UTC (rev 155)
@@ -1,47 +0,0 @@
-<!--
- #%L
- bow
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- -->
-<%@page contentType="text/xml" pageEncoding="UTF-8"%>
-<%@page import="org.chorem.bow.TokenActions" %>
-
-<%
- TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
- String token = "";
- if (tokenActions != null) {
- token = tokenActions.getTemporaryToken();
- }
- String url = request.getRequestURL().toString();
- int index = url.indexOf("temporaryXml.jsp");
- url = url.substring(0, index);
-%>
-
-<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
- xmlns:moz="http://www.mozilla.org/2006/browser/search/">
- <ShortName>bowTemporarySearchEngine</ShortName>
- <Description>bookmarkSearch</Description>
- <InputEncoding>inputEncoding</InputEncoding>
- <Image width="16" height="16" type="image/ico"><%=url%>img/bow.gif</Image>
- <Url type="text/html" method="GET" template="<%=url%>bow?action=openSearchResult&token=<%=token%>&searchLine={searchTerms}" />
- <Url type="application/x-suggestions+json" method="GET" template="<%=url%>bow?action=openSearchSuggestion&token=<%=token%>&search={searchTerms}" />
- <moz:SearchForm><%=url%>bow</moz:SearchForm>
-</OpenSearchDescription>
1
0
r154 - in trunk/src/main: resources resources/org/chorem/bow/action webapp webapp/jsp webapp/jsp/inc
by vbriand@users.chorem.org 30 Dec '10
by vbriand@users.chorem.org 30 Dec '10
30 Dec '10
Author: vbriand
Date: 2010-12-30 18:57:29 +0100 (Thu, 30 Dec 2010)
New Revision: 154
Url: http://chorem.org/repositories/revision/bow/154
Log:
L'ajout manuel de bookmark commence ?\195?\160 marchouiller mais pas encore l'affichage
Added:
trunk/src/main/webapp/jsp/inc/bookmark.jsp
trunk/src/main/webapp/jsp/inc/rightMenu.jsp
trunk/src/main/webapp/jsp/inc/tagsCloud.jsp
trunk/src/main/webapp/jsp/preferences.jsp
Removed:
trunk/src/main/resources/org/chorem/bow/action/RightMenuAction.properties
trunk/src/main/resources/org/chorem/bow/action/RightMenuAction_fr.properties
trunk/src/main/webapp/rightMenu.jsp
trunk/src/main/webapp/tagsCloud.jsp
Modified:
trunk/src/main/resources/struts.xml
trunk/src/main/webapp/jsp/home.jsp
trunk/src/main/webapp/jsp/login.jsp
Deleted: trunk/src/main/resources/org/chorem/bow/action/RightMenuAction.properties
===================================================================
--- trunk/src/main/resources/org/chorem/bow/action/RightMenuAction.properties 2010-12-30 14:45:38 UTC (rev 153)
+++ trunk/src/main/resources/org/chorem/bow/action/RightMenuAction.properties 2010-12-30 17:57:29 UTC (rev 154)
@@ -1,5 +0,0 @@
-url = URL
-alias = ALIAS
-name = DESC
-tags = TAGS
-save = Save
\ No newline at end of file
Deleted: trunk/src/main/resources/org/chorem/bow/action/RightMenuAction_fr.properties
===================================================================
--- trunk/src/main/resources/org/chorem/bow/action/RightMenuAction_fr.properties 2010-12-30 14:45:38 UTC (rev 153)
+++ trunk/src/main/resources/org/chorem/bow/action/RightMenuAction_fr.properties 2010-12-30 17:57:29 UTC (rev 154)
@@ -1,5 +0,0 @@
-url = URL
-alias = ALIAS
-name = DESC
-tags = TAGS
-save = Sauvegarder
\ No newline at end of file
Modified: trunk/src/main/resources/struts.xml
===================================================================
--- trunk/src/main/resources/struts.xml 2010-12-30 14:45:38 UTC (rev 153)
+++ trunk/src/main/resources/struts.xml 2010-12-30 17:57:29 UTC (rev 154)
@@ -30,6 +30,7 @@
<result>/jsp/home.jsp</result>
</action>
<action name="addUrl" class="org.chorem.bow.action.AddUrlAction">
+ <result type="redirect">/home.action</result>
<!-- La redirection change selon le type de page sur laquelle on est, donc je ne vois pas trop comment faire ça pour le moment-->
</action>
</package>
Modified: trunk/src/main/webapp/jsp/home.jsp
===================================================================
--- trunk/src/main/webapp/jsp/home.jsp 2010-12-30 14:45:38 UTC (rev 153)
+++ trunk/src/main/webapp/jsp/home.jsp 2010-12-30 17:57:29 UTC (rev 154)
@@ -60,7 +60,7 @@
request.setAttribute("bookmark", bookmark);
request.setAttribute("sdf", sdf);
%>
- <jsp:include page="/bookmark.jsp" flush="true" />
+ <jsp:include page="/jsp/inc/bookmark.jsp" flush="true" />
<%
++count;
if (count >= nbBookmarks) {
@@ -69,7 +69,7 @@
}
}
else { %>
- <p class="nobookmarks"><s:property value="%{getText('noBookmarks')}" /></p>
+ <p class="nobookmarks"><s:property value="%{getText('noBookmarks')}" /></p><s:set var="formAction" value="%{formAction}" />
<% } %>
</div>
@@ -86,7 +86,7 @@
request.setAttribute("bookmark", bookmark);
request.setAttribute("sdf", sdf);
%>
- <jsp:include page="/bookmark.jsp" flush="true" />
+ <jsp:include page="/jsp/inc/bookmark.jsp" flush="true" />
<%
++count;
if (count >= nbBookmarks) {
@@ -97,8 +97,8 @@
else { %>
<p class="nobookmarks"><s:property value="%{getText('noBookmarks')}" /></p>
<% } %>
- </div>
- <jsp:include page="/rightMenu.jsp" />
- </body>
-</html>
+ </div>
+ <jsp:include page="/jsp/inc/rightMenu.jsp" />
+ </body>
+ </html>
<% } %>
Added: trunk/src/main/webapp/jsp/inc/bookmark.jsp
===================================================================
--- trunk/src/main/webapp/jsp/inc/bookmark.jsp (rev 0)
+++ trunk/src/main/webapp/jsp/inc/bookmark.jsp 2010-12-30 17:57:29 UTC (rev 154)
@@ -0,0 +1,94 @@
+<!--
+ #%L
+ bow
+
+ $Id: bookmark.jsp 150 2010-12-23 14:19:56Z vbriand $
+ $HeadURL: http://svn.chorem.org/svn/bow/trunk/src/main/webapp/bookmark.jsp $
+ %%
+ Copyright (C) 2010 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@page import="org.chorem.bow.BowConfig" %>
+<%@page import="org.chorem.bow.Bookmark" %>
+<%@page import="java.text.SimpleDateFormat" %>
+<%@page import="org.chorem.bow.BookmarkActions" %>
+<%@page import="java.util.Set" %>
+<%
+Bookmark bookmark = (Bookmark) request.getAttribute("bookmark");
+BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions");
+SimpleDateFormat sdf = (SimpleDateFormat) request.getAttribute("sdf");
+String url = (String) request.getAttribute("bowUrl");
+String aliasUrl = BowConfig.getInstance().getServletAliasUrl();
+String search = "";
+String searchLine = request.getParameter("searchLine");
+if (searchLine != null) {
+ search += "&searchLine=" + searchLine;
+}
+String fullTextLine = request.getParameter("fullTextLine");
+if (fullTextLine != null) {
+ search += "&fullTextLine=" + fullTextLine;
+}
+if (url != null && bookmark != null && sdf != null && bookmarkActions != null) {
+ String formBookmarkId = (String) request.getAttribute("formBookmarkId");
+ String link = bookmark.getLink();
+ link = link.replace("'", "\\'");
+%>
+<div class="bookmark">
+ <div class="bookmarkhead">
+ <a class="alias" href="<%=aliasUrl + bookmark.getAlias()%>" title="<%=bookmark.getLink()%>" onclick="window.open(this.href); return false;">
+ <%=bookmark.getAlias()%>
+ </a>
+ <p class="date"> (<%=sdf.format(bookmark.getDate())%>)</p>
+ <a class="edit" href="/bow/editBookmark.action&bookmarkId=<%=bookmark.getWikittyId()%><%=search%>" onclick="return modify('<%=bookmark.getDescription()%>', '<%=bookmark.getAlias()%>', '<%=BookmarkActions.getBookmarkTagsString(bookmark)%>', '<%=link%>', 'bow/modifyBookmark.action&bookmarkId=<%=bookmark.getWikittyId()%><%=search%>', '<%=bookmark.getWikittyId()%>');"></a>
+ <a class="supprim" href="/bow/removeBookmark.action&bookmarkId=<%=bookmark.getWikittyId()%><%=search%>"></a>
+ </div>
+ <div class="bookmarkcontenu">
+ <div class="screenshot"></div>
+ <div class="click"><%=bookmark.getClick()%></div>
+ <div class="description">
+ <h3>Description :</h3>
+ <p>
+ <a title ="<%=bookmark.getLink()%>" href="/bow/addClick.action&bookmarkId=<%=bookmark.getWikittyId()%>" onclick="window.open(this.href); return false;"><%=bookmark.getDescription()%></a>
+ </p>
+ <p class="tags">
+ <strong>Tags :</strong>
+ <%
+ Set<String> tagList = bookmark.getTags();
+ if (tagList != null && !tagList.isEmpty()) {
+ for (String tag : tagList) {
+ if (formBookmarkId != null && formBookmarkId.equals(bookmark.getWikittyId())) {
+ %>
+ <a style="text-decoration: none;" href="/bow/deleteTag.action&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/deleteTag.action&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%><%=search%>">
+ <img style="border:none;" src="img/delete.png" alt="Delete tag" title="Delete" />
+ </a>
+ <% } %>
+ <a href="/bow/search.action&searchLine=<%=tag%>" style="text-decoration: none"><%=tag%></a>
+ <%
+ }
+ }
+ %>
+ </p>
+ </div>
+ </div>
+</div>
+<% } %>
Property changes on: trunk/src/main/webapp/jsp/inc/bookmark.jsp
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/src/main/webapp/jsp/inc/rightMenu.jsp (from rev 152, trunk/src/main/webapp/rightMenu.jsp)
===================================================================
--- trunk/src/main/webapp/jsp/inc/rightMenu.jsp (rev 0)
+++ trunk/src/main/webapp/jsp/inc/rightMenu.jsp 2010-12-30 17:57:29 UTC (rev 154)
@@ -0,0 +1,160 @@
+<!--
+ #%L
+ bow
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
+<%@taglib prefix="s" uri="/struts-tags" %>
+<%@page import="org.chorem.bow.BookmarkActions" %>
+<%@page import="java.text.SimpleDateFormat" %>
+<%@page import="java.util.Iterator" %>
+<%@page import="java.util.Set" %>
+<%@page import="java.util.ArrayList" %>
+<%@page import="java.util.List" %>
+<%@page import="org.chorem.bow.TokenActions" %>
+<%@page import="org.nuiton.wikitty.FacetTopic" %>
+<%@page import="org.chorem.bow.Bookmark" %>
+<%@page import="org.chorem.bow.Preference" %>
+<%
+TokenActions tokenActions = (TokenActions)session.getAttribute("tokenActions");
+BookmarkActions bookmarkActions = (BookmarkActions)request.getAttribute("bookmarkActions");
+Boolean admin = (Boolean)session.getAttribute("admin");
+if (admin == null) {
+ admin = false;
+}
+
+String temporaryToken = tokenActions.getTemporaryToken();
+String permanentToken = tokenActions.getPermanentToken();
+String url = (String) request.getAttribute("bowUrl");
+int nbTags = 100;
+Preference preference = (Preference)session.getAttribute("preference");
+if (preference != null) {
+ int tags = preference.getTags();
+ if (tags > 0)
+ nbTags = tags;
+}
+request.setAttribute("nbTags", nbTags);
+String searchLine = null;
+String fullText = null;
+if (bookmarkActions != null){
+ searchLine = bookmarkActions.getSearchLine();
+ fullText = bookmarkActions.getFullTextLine();
+}
+
+String formLink = (String)request.getAttribute("link");
+String formName = (String)request.getAttribute("name");
+String formTags = (String)request.getAttribute("tags");
+String formAlias = (String)request.getAttribute("alias");
+String formAction = (String)request.getAttribute("formAction"); //TODO : modifier le nom action en formAction parce que sinon ça fait tout péter
+
+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/addUrl.action";
+%>
+<div id="logout">
+ <s:form action="/bow/logout.action">
+ <div class="input">
+ <s:submit value="%{getText('logout')}" />
+ </div>
+ </s:form>
+ <a href="http://maven-site.chorem.org/bow/" class="help" target="_blank"><s:property value="%{getText('help')}" /></a>
+</div>
+<div id="side">
+ <div id="colonneD">
+ <ul class="droite">
+ <% if (admin) { %>
+ <li><a href="/bow/admin.action"><s:property value="%{getText('admin')}" /></a></li>
+ <% } %>
+ <li><a href="/bow/preferences.action"><s:property value="%{getText('preferences')}" /></a></li>
+ <li><a title="%{getText('temporaryLinkDescription')}" 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%>/addUrl.action&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);"><s:property value="%{getText('temporaryLink')}" /></a></li>
+ <li><a title="%{getText('permanentLinkDescription')}" 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%>/addUrl.action&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);"><s:property value="%{getText('permanentLink')}" /></a></li>
+ </ul>
+ <div id="extensions">
+ <h2><s:property value="%{getText('extensions')}" /></h2>
+ <ul class="droite">
+ <li><a href="extensions/bow4chromium.crx"><img src="img/chromium.png" class="extensionIcon" /><div class="extensionName">Extension pour Chromium</div></a></li>
+ <li><strong><s:property value="%{getText('permanentTokenId')}" /></strong> <%= permanentToken %></li>
+ <li><strong><s:property value="%{getText('sessionTokenId')}" /></strong> <%= temporaryToken %></li>
+ </ul>
+ </div>
+ <div id="add" class="clearfix">
+ <h2><s:property value="%{getText('addModify')}" /></h2>
+ <s:form id="bookmarkForm" action="/bow/addUrl.action">
+ <div class="input"><s:textfield key="link" name="link" label="%{getText('link')}" /></div><!-- <%=formLink%> -->
+ <div class="input"><s:textfield key="alias" name="alias" label="%{getText('alias')}" value="" /></div><!-- <%=formAlias%> -->
+ <div class="input"><s:textfield key="name" name="name" label="%{getText('name')}" value="" /></div><!-- <%=formName%> -->
+ <div class="input"><s:textfield key="tags" name="tags" label="%{getText('tags')}" value="" /></div><!-- <%=formTags%> -->
+ <div class="input"><s:submit value="%{getText('save')}" /></div>
+ </s:form>
+ </div>
+ <div id="nuage">
+ <% if (searchLine != null) { %>
+ <jsp:include page="tagsCloud.jsp" flush="true">
+ <jsp:param name="searchLine" value="<%=searchLine%>" />
+ </jsp:include>
+ <% } else { %>
+ <jsp:include page="tagsCloud.jsp" flush="true" />
+ <% } %>
+ </div>
+ <div class="recherche">
+ <h2><label for="searchLine"><s:property value="%{getText('search')}" /></label></h2>
+ <s:form action="/bow/search.action">
+ <div class="input">
+ <s:textfield key="searchLine" name="searchLine" />
+ <s:submit value="%{getText('find')}" />
+ </div>
+ </s:form>
+ </div>
+ <div class="recherche">
+ <h2><label for="fullTextLine"><s:property value="%{getText('fullTextSearch')}" /></label></h2>
+ <s:form action="/bow/fullText.action">
+ <div class="input">
+ <% if (fullText != null) { %>
+ <s:textfield key="fullTextLine" name="fullTextLine" value="" /> <!-- <%=fullText%> -->
+ <% } else { %>
+ <s:textfield key="fullTextLine" name="fullTextLine" />
+ <% } %>
+ <s:submit value="%{getText('find')}" />
+ </div>
+ </s:form>
+ </div>
+ <div id="import">
+ <h2><s:property value="%{getText('importBookmarks')}" /></h2>
+ <s:form action="/bow/importBookmarks.action" enctype="multipart/form-data">
+ <div class="input">
+ <s:file name="upfile" size="15%" label="%{getText('file')}" /><br />
+ <s:submit value="%{getText('import')}" />
+ </div>
+ </s:form>
+ <a href="/bow/exportBookmarks.action"><s:property value="%{getText('exportBookmarks')}" /></a>
+ </div>
+ <div class="colonnebas">
+ <img src="img/piedmenu.jpg" width="401" height="77" alt="Pied de menu" />
+ </div>
+ </div>
+</div>
Property changes on: trunk/src/main/webapp/jsp/inc/rightMenu.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Copied: trunk/src/main/webapp/jsp/inc/tagsCloud.jsp (from rev 152, trunk/src/main/webapp/tagsCloud.jsp)
===================================================================
--- trunk/src/main/webapp/jsp/inc/tagsCloud.jsp (rev 0)
+++ trunk/src/main/webapp/jsp/inc/tagsCloud.jsp 2010-12-30 17:57:29 UTC (rev 154)
@@ -0,0 +1,51 @@
+<!--
+ #%L
+ bow
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+<%@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%> result<%=(value != 1 ? "s" : "")%>" class="tag" style="font-size: <%=font%>px;"><%=tagName%></a>
+ <%
+ ++count;
+ if (count >= nbTags) {
+ break;
+ }
+ }
+}
+%>
Property changes on: trunk/src/main/webapp/jsp/inc/tagsCloud.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/src/main/webapp/jsp/login.jsp
===================================================================
--- trunk/src/main/webapp/jsp/login.jsp 2010-12-30 14:45:38 UTC (rev 153)
+++ trunk/src/main/webapp/jsp/login.jsp 2010-12-30 17:57:29 UTC (rev 154)
@@ -19,10 +19,10 @@
<s:submit value="%{getText('login')}" />
</p>
</s:form>
- <s:url id="localeEN" action="login">
+ <s:url id="localeEN" action="login_input">
<s:param name="request_locale" >en</s:param>
</s:url>
- <s:url id="localeFR" action="login">
+ <s:url id="localeFR" action="login_input">
<s:param name="request_locale" >fr</s:param>
</s:url>
Added: trunk/src/main/webapp/jsp/preferences.jsp
===================================================================
--- trunk/src/main/webapp/jsp/preferences.jsp (rev 0)
+++ trunk/src/main/webapp/jsp/preferences.jsp 2010-12-30 17:57:29 UTC (rev 154)
@@ -0,0 +1,141 @@
+<!--
+ #%L
+ bow
+
+ $Id: preferences.jsp 144 2010-12-23 10:24:48Z bpoussin $
+ $HeadURL: http://svn.chorem.org/svn/bow/trunk/src/main/webapp/preferences.jsp $
+ %%
+ Copyright (C) 2010 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@taglib prefix="s" uri="/struts-tags"%>
+<%@page import="org.chorem.bow.Preference"%>
+<%@page import="org.chorem.bow.User"%>
+<%@page import="org.chorem.bow.TokenActions"%>
+<%@page import="org.chorem.bow.BookmarkActions"%>
+<%@page import="org.chorem.bow.Bookmark" %>
+<%@page import="org.chorem.bow.Import" %>
+<%@page import="org.nuiton.wikitty.FacetTopic" %>
+<%@page import="java.util.List" %>
+<%@page import="java.util.Date" %>
+<%
+User user = (User) session.getAttribute("user");
+Preference preference = (Preference) session.getAttribute("preference");
+TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
+//Boolean admin = (Boolean) session.getAttribute("admin");
+//if (admin == null) {
+// admin = false;
+//}
+int nbTags = 100;
+
+if (user != null && preference != null && tokenActions != null){
+ int tags = preference.getTags();
+ if (tags > 0) {
+ nbTags = tags;
+ }
+ request.setAttribute("nbTags", nbTags);
+// String url = (String) request.getAttribute("bowUrl");
+// String version = (String) request.getAttribute("version");
+// String temporaryToken = tokenActions.getTemporaryToken();
+// String permanentToken = tokenActions.getPermanentToken();
+ String check = preference.getColors();
+ if (check == null) {
+ preference.setColors("");
+ }
+ check = preference.getSearchEngineUrlResults();
+ if (check == null) {
+ preference.setSearchEngineUrlResults("");
+ }
+ check = preference.getSearchEngineUrlSuggestions();
+ if (check == null) {
+ preference.setSearchEngineUrlSuggestions("");
+ }
+ %>
+ <html>
+ <head>
+ <link href="<s:url value='/css/bookmark.css'/>" rel="stylesheet" type="text/css" />
+ <s:head />
+ </head>
+ <body>
+ <div id="content">
+ <div class="menu clearfix">
+ <h2><s:property value="%{getText('preferences')}" /></h2>
+ </div>
+ <s:form action="/bow/changePreferences.action">
+ <div class="formFrame">
+ <h3><s:property value="%{getText('userInfo')}" /></h3>
+ <p>
+ <s:textfield key="email" name="email" label="%{getText('email')}" /><br /><br /><!-- value="<%=user.getEmail()%>" -->
+ <s:password key="currentPassword" name="currentPassword" label="%{getText('currentPassword')}" />
+ <s:password key="newPassword" name="newPassword" label="%{getText('newPassword')}" />
+ <s:password key="confirmNewPassword" name="confirmNewPassword" label="%{getText('confirmNewPassword')}" />
+ <a href="/bow/generateToken.action" id="regenPermToken"><s:property value="%{getText('regenPermToken')}" /></a>
+ </p>
+ </div>
+ <div class="formFrame">
+ <h3><s:property value="%{getText('siteLook')}" /></h3>
+ <p>
+ <s:textfield key="colors" name="colors" label="%{getText('siteColor')}" /><br /> <!-- value="<%=preference.getColors()%>" -->
+ <s:textfield key="tagsNb" name="tagsNb" label="%{getText('tagsNb')}" /><br />
+ <s:textfield key="bookmarksHomePage" name="bookmarksHomePage" label="%{getText('bookmarksHomePage')}" /><br />
+ <s:textfield key="searchEngineUrlSuggestions" name="searchEngineUrlSuggestions" label="%{getText('searchEngineUrlSuggestions')}" /><br />
+ <s:textfield key="searchEngineUrlResults" name="searchEngineUrlResults" label="%{getText('searchEngineUrlResults')}" />
+ <s:submit value="%{getText('changePreferences')}" />
+ <br /><br />
+ <a href="/bow/home.action" id="homePage"><s:property value="%{getText('homePage')}" /></a>
+ </p>
+ </div>
+ </s:form>
+ <div class="menu clearfix">
+ <h2><s:property value="%{getText('importedBookmarks')}" /></h2>
+ </div>
+ <%
+ List<FacetTopic> bookmarkImportList = (List<FacetTopic>)request.getAttribute("bookmarksImportDate");
+ if (bookmarkImportList != null) {
+ if (bookmarkImportList.size() > 0) {
+ String bgColors[] = {"Pink", "White"};
+ int i = 0;
+ int colorsNb = bgColors.length;
+
+ for (FacetTopic bookmarkImport : bookmarkImportList) {
+ String date = bookmarkImport.getTopicName();
+ String dateSave = date;
+
+ date = date.replaceAll("[^0-9:-]+", " ").trim();
+ date = date.substring(0, date.lastIndexOf(' '));
+ %>
+ <div class="deleteImport deleteImport<%=bgColors[i % colorsNb]%>">
+ <span><%= date + " (" + bookmarkImport.getCount() + " bookmarks)" %></span>
+ <a class="deleteImportButton" href="" onclick="deleteConfirmation('/bow/deleteImport.action&date=<%=dateSave%>',<%=bookmarkImport.getCount()%>,'<%=date%>'); return(false);"></a>
+ </div>
+ <%
+ i++;
+ }
+ } else {
+ %>
+ <div class="deleteImport deleteImportWhite">
+ <span><s:property value="%{getText('noImportedBookmarks')}" /></span>
+ </div>
+ <%
+ }
+ }
+ %>
+ </div>
+ <jsp:include page="/jsp/inc/rightMenu.jsp" flush="true" />
+ </body>
+ </html>
+<% } %>
\ No newline at end of file
Property changes on: trunk/src/main/webapp/jsp/preferences.jsp
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: trunk/src/main/webapp/rightMenu.jsp
===================================================================
--- trunk/src/main/webapp/rightMenu.jsp 2010-12-30 14:45:38 UTC (rev 153)
+++ trunk/src/main/webapp/rightMenu.jsp 2010-12-30 17:57:29 UTC (rev 154)
@@ -1,159 +0,0 @@
-<!--
- #%L
- bow
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- -->
-<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
-<%@taglib prefix="s" uri="/struts-tags" %>
-<%@page import="org.chorem.bow.BookmarkActions" %>
-<%@page import="java.text.SimpleDateFormat" %>
-<%@page import="java.util.Iterator" %>
-<%@page import="java.util.Set" %>
-<%@page import="java.util.ArrayList" %>
-<%@page import="java.util.List" %>
-<%@page import="org.chorem.bow.TokenActions" %>
-<%@page import="org.nuiton.wikitty.FacetTopic" %>
-<%@page import="org.chorem.bow.Bookmark" %>
-<%@page import="org.chorem.bow.Preference" %>
-<%
-TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions");
-BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions");
-Boolean admin = (Boolean) session.getAttribute("admin");
-if (admin == null) {
- admin = false;
-}
-
-String temporaryToken = tokenActions.getTemporaryToken();
-String permanentToken = tokenActions.getPermanentToken();
-String url = (String) request.getAttribute("bowUrl");
-int nbTags = 100;
-Preference preference = (Preference) session.getAttribute("preference");
-if (preference != null) {
- int tags = preference.getTags();
- if (tags > 0)
- nbTags = tags;
-}
-request.setAttribute("nbTags", nbTags);
-String searchLine = null;
-String fullText = null;
-if (bookmarkActions != null){
- searchLine = bookmarkActions.getSearchLine();
- fullText = bookmarkActions.getFullTextLine();
-}
-
-String formLink = (String)request.getAttribute("link");
-String formName = (String)request.getAttribute("name");
-String formTags = (String)request.getAttribute("tags");
-String formAlias = (String)request.getAttribute("alias");
-String formAction = (String)request.getAttribute("formAction"); //TODO : modifier le nom action en formAction parce que sinon ça fait tout péter
-if (formLink == null)
- formLink = "URL";
-if (formName == null)
- formName = "name";
-if (formTags == null)
- formTags = "tag1 tag2...";
-if (formAlias == null)
- formAlias = "alias";
-if (formAction == null)
- formAction = "bow?action=addUrl";
-%>
-<div id="logout">
- <s:form action="/bow/logout.action">
- <div class="input">
- <s:submit value="%{getText('logout')}" />
- </div>
- </s:form>
- <a href="http://maven-site.chorem.org/bow/" class="help" target="_blank">Aide</a>
-</div>
-<div id="side">
- <div id="colonneD">
- <ul class="droite">
- <% if (admin) { %>
- <li><a href="bow?action=admin">Admin</a></li>
- <% } %>
- <li><a href="bow?action=preferences">Preferences</a></li>
- <li><a title="Add this link to your favourites to bookmark others in the future. This link is just available while you are connected on the site!" href="javascript:var%20url=location.href;var%20nameAndTags=prompt('Entrez%20le%20nom%20du%20lien%20et%20la%20liste%20des%20tags%20sous%20la%20forme:%20name|tag1%20tag2%20tag3',%20document.title+'|');if%20(nameAndTags!=(document.title+'|')){var%20link='<%=url%>?action=addUrl&token=<%=temporaryToken%>&url='+encodeURIComponent(url)+'&nameAndTags='+encodeURIComponent(nameAndTags);var%20script=document.createElement('script');script.src=link;script.type='text/javascript';document.body.appendChild(script);}void(0);">Bookmark add link (session)</a></li>
- <li><a title="Add this link to your favourites to bookmark others in the future. This link is always available!" href="javascript:var%20url=location.href;var%20nameAndTags=prompt('Entrez%20le%20nom%20du%20lien%20et%20la%20liste%20des%20tags%20sous%20la%20forme:%20name|tag1%20tag2%20tag3',%20document.title+'|');if%20(nameAndTags!=(document.title+'|')){var%20link='<%=url%>?action=addUrl&token=<%=permanentToken%>&url='+encodeURIComponent(url)+'&nameAndTags='+encodeURIComponent(nameAndTags);var%20script=document.createElement('script');script.src=link;script.type='text/javascript';document.body.appendChild(script);}void(0);">Bookmark add link (permanent)</a></li>
- </ul>
- <div id="extensions">
- <h2>Extensions</h2>
- <ul class="droite">
- <li><a href="extensions/bow4chromium.crx"><img src="img/chromium.png" class="extensionIcon" /><div class="extensionName">Extension pour Chromium</div></a></li>
- <li><strong>Permanent token id:</strong> <%= permanentToken %></li>
- <li><strong>Session token id:</strong> <%= temporaryToken %></li>
- </ul>
- </div>
- <div id="add" class="clearfix">
- <h2>Add / Modify</h2>
- <s:form id="bookmarkForm" action=""> <!-- <%=formAction%> -->
- <div class="input"><s:textfield key="url" name="url" label="%{getText('url')}" value="" /></div><!-- <%=formLink%> -->
- <div class="input"><s:textfield key="alias" name="alias" label="%{getText('alias')}" value="" /></div><!-- <%=formAlias%> -->
- <div class="input"><s:textfield key="name" name="name" label="%{getText('name')}" value="" /></div><!-- <%=formName%> -->
- <div class="input"><s:textfield key="tags" name="tags" label="%{getText('tags')}" value="" /></div><!-- <%=formTags%> -->
- <div class="input"><s:submit value="%{getText('save')}" /></div>
- </s:form>
- </div>
- <div id="nuage">
- <% if (searchLine != null) { %>
- <jsp:include page="tagsCloud.jsp" flush="true">
- <jsp:param name="searchLine" value="<%=searchLine%>" />
- </jsp:include>
- <% } else { %>
- <jsp:include page="tagsCloud.jsp" flush="true" />
- <% } %>
- </div>
- <div class="recherche">
- <h2><label for="searchLine"><s:property value="%{getText('search')}" /></label></h2>
- <s:form action="/bow/search.action">
- <div class="input">
- <s:textfield key="searchLine" name="searchLine" />
- <s:submit value="%{getText('find')}" />
- </div>
- </s:form>
- </div>
- <div class="recherche">
- <h2><label for="fullTextLine"><s:property value="%{getText('fullTextSearch')}" /></label></h2>
- <s:form action="/bow/fullText.action">
- <div class="input">
- <% if (fullText != null) { %>
- <s:textfield key="fullTextLine" name="fullTextLine" value="" /> <!-- <%=fullText%> -->
- <% } else { %>
- <s:textfield key="fullTextLine" name="fullTextLine" />
- <% } %>
- <s:submit value="%{getText('find')}" />
- </div>
- </s:form>
- </div>
- <div id="import">
- <h2><s:property value="%{getText('importBookmarks')}" /></h2>
- <s:form action="/bow/importBookmarks.action" enctype="multipart/form-data">
- <div class="input">
- <s:file name="upfile" size="15%" label="%{getText('file')}" /><br />
- <s:submit value="%{'import'}" />
- </div>
- </s:form>
- <a href="/bow/exportBookmarks.action"><s:property value="%{getText('exportBookmarks')}" /></a>
- </div>
- <div class="colonnebas">
- <img src="img/piedmenu.jpg" width="401" height="77" alt="Pied de menu" />
- </div>
- </div>
-</div>
Deleted: trunk/src/main/webapp/tagsCloud.jsp
===================================================================
--- trunk/src/main/webapp/tagsCloud.jsp 2010-12-30 14:45:38 UTC (rev 153)
+++ trunk/src/main/webapp/tagsCloud.jsp 2010-12-30 17:57:29 UTC (rev 154)
@@ -1,51 +0,0 @@
-<!--
- #%L
- bow
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2010 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- -->
-<%@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%> result<%=(value != 1 ? "s" : "")%>" class="tag" style="font-size: <%=font%>px;"><%=tagName%></a>
- <%
- ++count;
- if (count >= nbTags) {
- break;
- }
- }
-}
-%>
1
0