Vradi-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
July 2011
- 3 participants
- 15 discussions
r127 - in trunk/vradi-web/src/main: java/org/chorem/vradi/interceptors resources webapp/WEB-INF/jsp webapp/WEB-INF/jsp/inc
by sletellier@users.chorem.org 21 Jul '11
by sletellier@users.chorem.org 21 Jul '11
21 Jul '11
Author: sletellier
Date: 2011-07-21 17:36:20 +0200 (Thu, 21 Jul 2011)
New Revision: 127
Url: http://chorem.org/repositories/revision/vradi/127
Log:
- Fix tomcat compatibility
--Cette ligne, et les suivantes ci-dessous, seront ignor?\195?\169es--
M vradi-web/src/main/java/org/chorem/vradi/interceptors/LoginInterceptor.java
M vradi-web/src/main/resources/struts.xml
M vradi-web/src/main/webapp/WEB-INF/jsp/attachmentList.jsp
M vradi-web/src/main/webapp/WEB-INF/jsp/register.jsp
M vradi-web/src/main/webapp/WEB-INF/jsp/resultGrid.jsp
M vradi-web/src/main/webapp/WEB-INF/jsp/showInvitation.jsp
M vradi-web/src/main/webapp/WEB-INF/jsp/searchPanel.jsp
M vradi-web/src/main/webapp/WEB-INF/jsp/formNoteList.jsp
M vradi-web/src/main/webapp/WEB-INF/jsp/thesaurusFilter.jsp
M vradi-web/src/main/webapp/WEB-INF/jsp/formNote.jsp
M vradi-web/src/main/webapp/WEB-INF/jsp/options.jsp
M vradi-web/src/main/webapp/WEB-INF/jsp/savedQueries.jsp
M vradi-web/src/main/webapp/WEB-INF/jsp/invitationResultConfirm.jsp
M vradi-web/src/main/webapp/WEB-INF/jsp/search.jsp
M vradi-web/src/main/webapp/WEB-INF/jsp/seekPartners.jsp
M vradi-web/src/main/webapp/WEB-INF/jsp/login.jsp
M vradi-web/src/main/webapp/WEB-INF/jsp/userPreference.jsp
M vradi-web/src/main/webapp/WEB-INF/jsp/inc/header.jsp
M vradi-web/src/main/webapp/WEB-INF/jsp/invitationResult.jsp
M vradi-web/src/main/webapp/WEB-INF/jsp/forgotPassword.jsp
Modified:
trunk/vradi-web/src/main/java/org/chorem/vradi/interceptors/LoginInterceptor.java
trunk/vradi-web/src/main/resources/struts.xml
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/attachmentList.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/forgotPassword.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNote.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNoteList.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/inc/header.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResult.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResultConfirm.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/login.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/options.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/register.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/resultGrid.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/savedQueries.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/search.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/searchPanel.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/seekPartners.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitation.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/thesaurusFilter.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/userPreference.jsp
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/interceptors/LoginInterceptor.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/interceptors/LoginInterceptor.java 2011-07-21 15:35:40 UTC (rev 126)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/interceptors/LoginInterceptor.java 2011-07-21 15:36:20 UTC (rev 127)
@@ -64,11 +64,10 @@
session.put(LoginAction.REDIRECT_AFTER_LOGIN, redirect);
log.debug(String.format("User not loggued redirect to '%s' and '%s'",
loginRedirect, redirect));
- ServletActionContext.getResponse().sendRedirect(loginRedirect);
+// ServletActionContext.getResponse().sendRedirect(loginRedirect);
+ return loginRedirect;
} else {
- result = invocation.invoke();
+ return invocation.invoke();
}
-
- return result;
}
}
Modified: trunk/vradi-web/src/main/resources/struts.xml
===================================================================
--- trunk/vradi-web/src/main/resources/struts.xml 2011-07-21 15:35:40 UTC (rev 126)
+++ trunk/vradi-web/src/main/resources/struts.xml 2011-07-21 15:36:20 UTC (rev 127)
@@ -78,7 +78,7 @@
<package name="restrictedArea" extends="publicArea">
<interceptors>
<interceptor name="login" class="org.chorem.vradi.interceptors.LoginInterceptor">
- <param name="loginRedirect">/login.action</param>
+ <param name="loginRedirect">login</param>
</interceptor>
<interceptor-stack name="restrictedAreaStack">
<interceptor-ref name="login"/>
@@ -86,6 +86,11 @@
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="restrictedAreaStack"/>
+
+ <!-- To use struts url with namespace -->
+ <global-results>
+ <result name="login" type="redirect">login.action</result>
+ </global-results>
</package>
<package name="login" extends="loginArea">
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/attachmentList.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/attachmentList.jsp 2011-07-21 15:35:40 UTC (rev 126)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/attachmentList.jsp 2011-07-21 15:36:20 UTC (rev 127)
@@ -28,11 +28,10 @@
ActionContext.getContext().put("localAttachmentId", attachmentId);
%>
- <li><%=VradiWebHelper.formatDate(a.getDate())%> <a href="/ajax/raw/<%=attachmentId%>/Attachment.content.action"><%=a.getName()%></a>
+ <li><%=VradiWebHelper.formatDate(a.getDate())%> <s:a action="raw/%{localAttachmentId}/Attachment.content" namespace="/ajax"><%=a.getName()%></s:a>
- <%--<s:a action="/ajax/raw/%{localAttachmentId}/Attachment.content" key="vradi.attachment.update"></s:a>--%>
- <%--<s:a action="" key="vradi.attachment.history"></s:a>--%>
- <sj:a href="/ajax/delete/%{localAttachmentId}.action"
+ <s:url id="deleteUrl" action="delete/%{localAttachmentId}" namespace="/ajax"/>
+ <sj:a href="%{deleteUrl}"
targets="actionResult"
button="true"
indicator="indicator-deleteAttachment"
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/forgotPassword.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/forgotPassword.jsp 2011-07-21 15:35:40 UTC (rev 126)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/forgotPassword.jsp 2011-07-21 15:36:20 UTC (rev 127)
@@ -11,13 +11,14 @@
<div id="content">
<div id="formFrame fond">
<h1><s:text name="vradi.forgotpwd.title" /></h1>
- <s:form action="forgotPassword">
+ <s:form action="forgotPassword"
+ namespace="/">
<p>
<s:textfield key="vradi.login.email" name="email" labelposition="top" labelSeparator=" :" />
<s:submit key="vradi.forgotpwd.submit" name="submit" />
</p>
</s:form>
- <s:a action="login_input" id="loginLink"><s:text name="vradi.login.title" /></s:a>
+ <s:a id="loginLink" action="login_input" namespace="/"><s:text name="vradi.login.title" /></s:a>
</div>
</div>
</body>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNote.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNote.jsp 2011-07-21 15:35:40 UTC (rev 126)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNote.jsp 2011-07-21 15:36:20 UTC (rev 127)
@@ -19,7 +19,6 @@
FormNote formNote = action.getFormNote();
ActionContext.getContext().put("localNoteId", formNote.getWikittyId());
-ActionContext.getContext().put("localFieldSeekingPartner", FormNote.FQ_FIELD_FORMNOTE_SEEKINGPARTNER);
ActionContext.getContext().put("localFieldSummary", FormNote.FQ_FIELD_FORMNOTE_SUMMARY);
ActionContext.getContext().put("localFieldContent", FormNote.FQ_FIELD_FORMNOTE_CONTENT);
ActionContext.getContext().put("localNote", formNote);
@@ -35,6 +34,15 @@
<title><s:text name="vradi.formNote.title" /></title>
<s:head/>
<sj:head jquerytheme="sunny"/>
+ <script type="text/javascript">
+ function seekingPartnersChange(checkbox) {
+ var url="<s:url action='edit/%{localNoteId}' namespace='/ajax'/>";
+ url = url + "?<%=FormNote.FQ_FIELD_FORMNOTE_SEEKINGPARTNER%>=" + checkbox.checked;
+ var xhr=new XMLHttpRequest();
+ xhr.open('GET', url, true);
+ xhr.send(null);
+ }
+ </script>
</head>
<body>
<h1><s:text name="vradi.formNote.title" /></h1>
@@ -42,13 +50,21 @@
<img id="indicator-result" src="/img/indicator.gif" alt="Loading..." style="display:none"/>
</div>
<div>
- <sj:a id="closeButton" href="/ajax/edit/%{localNoteId}.action?state=<%=FormNoteState.CLOSE.getValue()%>>"
+ <s:url id="closeButtonUrl"
+ action="edit/%{localNoteId}"
+ namespace="/ajax">
+ <s:param name="state">
+ <%=FormNoteState.CLOSE.getValue()%>
+ </s:param>
+ </s:url>
+ <sj:a id="closeButton" href="%{closeButtonUrl}"
targets="result" indicator="indicator-result"
button="true" buttonIcon="ui-icon-gear">
<s:text name="vradi.formNote.close"/>
</sj:a>
- <sj:a href="/ajax/delete/%{localNoteId}.action"
+ <s:url id="deleteUrl" action="delete/%{localNoteId}" namespace="/ajax"/>
+ <sj:a href="%{deleteUrl}"
targets="result" indicator="indicator-result"
button="true" buttonIcon="ui-icon-gear"><s:text name="vradi.delete"/></sj:a>
</div>
@@ -60,28 +76,31 @@
</div>
<div>
- <form id="partnersForm" action="/fragment/userInfo.action">
+ <s:form id="partnersForm" action="userInfo" namespace="/fragment">
<s:select size="5" name="userId" list="partners" listKey="wikittyId" listValue="login"/>
<s:set id="showText">
<s:text name="vradi.show"/>
</s:set>
<sj:submit id="partnersSubmit"
value="%{showText}"
- targets="partnersInfo" indicator="indicator-partnersInfo"
- button="true" buttonIcon="ui-icon-gear"/>
- </form>
+ targets="partnersInfo"
+ indicator="indicator-partnersInfo"
+ button="true"
+ buttonIcon="ui-icon-gear"/>
+ </s:form>
<div id="partnersInfo">
<img id="indicator-partnersInfo" src="/img/indicator.gif" alt="Loading..." style="display:none"/>
</div>
- <s:a action="seekPartners/%{localNoteId}"><s:text name="vradi.formNote.seekPartners" /></s:a>
+ <s:a action="seekPartners/%{localNoteId}"
+ namespace="/"><s:text name="vradi.formNote.seekPartners" /></s:a>
<s:set id="seekingPartnerText">
<s:text name="vradi.formNote.seekingPartner"/>
</s:set>
<s:checkbox label="%{seekingPartnerText}"
name="formNote.seekingPartners" value="%{localSeekingPartner}"
- onchange="var url='/ajax/edit/%{localNoteId}.action?%{localFieldSeekingPartner}='+this.checked; var xhr=new XMLHttpRequest(); xhr.open('GET', url, true);xhr.send(null);"/>
+ onchange="seekingPartnersChange(this);"/>
</div>
<s:set id="saveText">
@@ -101,13 +120,17 @@
collapsible="true" useSelectedTabCookie="true">
<sj:tab id="tabHtmlSummary" target="htmlSummary" label="%{summaryText}"/>
<sj:tab id="tabHtmlSummaryEdit" target="htmlSummaryEdit" label="%{editText}"/>
+
+ <s:url id="htmlSummaryUrl" action="rst" namespace="/ajax"/>
+
+ <%-- We cant use s:param here because struts JQuery convert & to & --%>
<sj:div id="htmlSummary"
- href="/ajax/rst.action?id=%{localNoteId}&field=%{localFieldSummary}"
+ href="%{htmlSummaryUrl}?id=%{localNoteId}&field=%{localFieldSummary}"
listenTopics="updateHtmlSummary">
<img id="indicator-htmlSummary" src="/img/indicator.gif" alt="Loading..." style="display:none"/>
</sj:div>
<div id="htmlSummaryEdit">
- <form id="htmlSummaryEditForm" action="/ajax/rst.action">
+ <s:form id="htmlSummaryEditForm" action="rst" namespace="/ajax">
<s:hidden name="id" value="%{localNoteId}"/>
<s:hidden name="field" value="%{localFieldSummary}"/>
<s:textarea name="rst" value="%{localSummary}"/>
@@ -117,7 +140,7 @@
onSuccessTopics="updateHtmlSummary"
indicator="indicator-htmlSummary"
button="true" buttonIcon="ui-icon-gear"/>
- </form>
+ </s:form>
</div>
</sj:tabbedpanel>
</div>
@@ -127,16 +150,17 @@
collapsible="true" useSelectedTabCookie="true">
<sj:tab id="tabHtmlContent" target="htmlContent" label="%{summaryText}"/>
<sj:tab id="tabHtmlContentEdit" target="htmlContentEdit" label="%{editText}"/>
+
+ <s:url id="htmlContentUrl" action="rst" namespace="/ajax"/>
+
+ <%-- We cant use s:param here because struts JQuery convert & to & --%>
<sj:div id="htmlContent"
- href="/ajax/rst.action?id=%{localNoteId}&field=%{localFieldContent}"
+ href="%{htmlContentUrl}?id=%{localNoteId}&field=%{localFieldContent}"
listenTopics="updateHtmlContent">
<img id="indicator-htmlContent" src="/img/indicator.gif" alt="Loading..." style="display:none"/>
</sj:div>
- <%--<div id="htmlContent">--%>
- <%--<img id="indicator-htmlContent" src="/img/indicator.gif" alt="Loading..." style="display:none"/>--%>
- <%--</div>--%>
<div id="htmlContentEdit" >
- <form id="htmlContentEditForm" action="/ajax/rst.action">
+ <s:form id="htmlContentEditForm" action="rst" namespace="/ajax">
<s:hidden name="id" value="%{localNoteId}"/>
<s:hidden name="field" value="%{localFieldContent}"/>
<s:textarea name="rst" value="%{localContent}"/>
@@ -146,7 +170,7 @@
onSuccessTopics="updateHtmlContent"
indicator="indicator-htmlContent"
button="true" buttonIcon="ui-icon-gear"/>
- </form>
+ </s:form>
</div>
</sj:tabbedpanel>
</div>
@@ -164,25 +188,25 @@
<sj:tab id="tabFiles" target="updateFilesPanel" label="%{filesText}"/>
<sj:tab id="tabAddFiles" target="addFiles" label="%{addText}"/>
+ <s:url id="updateFileUrl" action="attachmentList/%{localNoteId}" namespace="/fragment"/>
<sj:div id="updateFilesPanel"
- href="/fragment/attachmentList/%{localNoteId}.action"
+ href="%{updateFileUrl}"
indicator="indicator-files"
listenTopics="updateFiles">
<img id="indicator-files" src="/img/indicator.gif" alt="Loading..." style="display:none"/>
</sj:div>
<div id="addFiles">
- <s:form id="addFilesForm" namespace="/fragment" action="attachmentAdd" method="POST" enctype="multipart/form-data">
- <%--<s:form id="addFilesForm" action="attachmentAdd" method="POST" enctype="multipart/form-data">--%>
+ <s:form id="addFilesForm" action="attachmentAdd" namespace="/fragment" method="POST" enctype="multipart/form-data">
<s:hidden name="targetId" value="%{localNoteId}"/>
<s:textfield name="name" key="vradi.addfiles.name"/>
<s:textarea name="description" key="vradi.addfiles.description"/>
<s:file name="content" key="vradi.addfiles.content" required="true"/>
<sj:submit id="addFilesSubmit"
- value="%{saveText}"
- targets="result"
- indicator="indicator-result"
- onSuccessTopics="updateFiles"
- button="true" buttonIcon="ui-icon-gear"/>
+ value="%{saveText}"
+ targets="result"
+ indicator="indicator-result"
+ onSuccessTopics="updateFiles"
+ button="true" buttonIcon="ui-icon-gear"/>
</s:form>
</div>
</sj:tabbedpanel>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNoteList.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNoteList.jsp 2011-07-21 15:35:40 UTC (rev 126)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNoteList.jsp 2011-07-21 15:36:20 UTC (rev 127)
@@ -28,9 +28,9 @@
<% for (FormNote note : action.getFormNotes()) {
ActionContext.getContext().put("localNoteId", note.getWikittyId());
%>
- <li><s:a action="formNote/%{localNoteId}"><%=VradiWebHelper.formatDate(note.getCreationDate())%> <%=note.getSummary()%></s:a></li>
+ <li><s:a action="formNote/%{localNoteId}" namespace="/"><%=VradiWebHelper.formatDate(note.getCreationDate())%> <%=note.getSummary()%></s:a></li>
<% } %>
- <li><s:a action="formNote/new?formId=%{formId}"><s:text name="vradi.new.formNote"/></s:a></li>
+ <li><s:a action="formNote/new?formId=%{formId}" namespace="/"><s:text name="vradi.new.formNote"/></s:a></li>
</ul>
</body>
</html>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/inc/header.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/inc/header.jsp 2011-07-21 15:35:40 UTC (rev 126)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/inc/header.jsp 2011-07-21 15:36:20 UTC (rev 127)
@@ -30,26 +30,26 @@
<s:if test="logged">
<div id="linkPanel">
<s:if test="isNotOptionPage">
- <s:a id="options"
- action="options">
+ <s:a action="options"
+ namespace="/">
<s:text name="vradi.options"/>
</s:a>
</s:if>
<s:if test="isNotUserPreferencePage">
- <s:a id="options"
- href="/userPreference/%{userId}.action">
+ <s:a action="userPreference/%{userId}"
+ namespace="/">
<s:text name="vradi.userPreference"/>
</s:a>
</s:if>
<s:if test="isNotSearchViewPage">
- <s:a id="searchLink"
- action="searchView">
+ <s:a action="searchView"
+ namespace="/">
<s:text name="vradi.search.link"/>
</s:a>
</s:if>
<s:a id="logout"
- action="logout">
-
+ action="logout"
+ namespace="/">
<s:text name="vradi.logout.submit" />
</s:a>
</div>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResult.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResult.jsp 2011-07-21 15:35:40 UTC (rev 126)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResult.jsp 2011-07-21 15:36:20 UTC (rev 127)
@@ -18,7 +18,7 @@
<p><%=action.getContent()%></p>
</div>
-<s:form action="sendInvitationResult" theme="simple">
+<s:form action="sendInvitationResult" namespace="/" theme="simple">
<s:hidden name="noteId" value="%{localNoteId}"/>
<s:hidden name="senderId" value="%{localSenderId}"/>
<s:hidden name="invitationResult" value="%{invitationResult}"/>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResultConfirm.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResultConfirm.jsp 2011-07-21 15:35:40 UTC (rev 126)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResultConfirm.jsp 2011-07-21 15:36:20 UTC (rev 127)
@@ -19,7 +19,7 @@
<p><%=action.getContent()%></p>
</div>
-<s:form action="sendInvitationResultConfirm" theme="simple">
+<s:form action="sendInvitationResultConfirm" namespace="/" theme="simple">
<s:hidden name="noteId" value="%{localNoteId}"/>
<s:hidden name="senderId" value="%{localSenderId}"/>
<s:hidden name="invitationResult" value="%{invitationResult}"/>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/login.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/login.jsp 2011-07-21 15:35:40 UTC (rev 126)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/login.jsp 2011-07-21 15:36:20 UTC (rev 127)
@@ -13,15 +13,15 @@
<h1><s:text name="vradi.login.title" /></h1>
<br/>
<s:actionerror />
- <s:form action="login" theme="simple">
+ <s:form action="login" namespace="/" theme="simple">
<s:text name="vradi.login.email"/><br/>
<s:textfield name="email" labelposition="top" labelSeparator=" :" /><br/>
<s:text name="vradi.login.password"/><br/>
<s:password name="password" labelposition="top" labelSeparator=" :" /><br/>
<s:submit key="vradi.login.submit" name="submit" />
</s:form>
- <s:a action="register_input" id="registerLink"><s:text name="vradi.register.title" /></s:a><br/>
- <s:a action="forgotPassword_input" id="forgotPwd"><s:text name="vradi.forgotpwd.title" /></s:a>
+ <s:a action="register_input" namespace="/" id="registerLink"><s:text name="vradi.register.title" /></s:a><br/>
+ <s:a action="forgotPassword_input" namespace="/" id="forgotPwd"><s:text name="vradi.forgotpwd.title" /></s:a>
</div>
</div>
</body>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/options.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/options.jsp 2011-07-21 15:35:40 UTC (rev 126)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/options.jsp 2011-07-21 15:36:20 UTC (rev 127)
@@ -42,7 +42,8 @@
<body>
<div>
<div id="thesaurusPanel" class="left">
- <sj:div id="thesaurusDiv" href="/fragment/thesaurusFilter.action" indicator="indicator-thesaurus">
+ <s:url id="thesaurusFilterUrl" action="thesaurusFilter" namespace="fragment"/>
+ <sj:div id="thesaurusDiv" href="%{thesaurusFilterUrl}" indicator="indicator-thesaurus">
<img id="indicator-thesaurus" src="/img/indicator.gif" alt="Loading..." style="display:none"/>
</sj:div>
</div>
@@ -50,6 +51,7 @@
<div id="contentPanel"
class="contentPanel">
<s:form action="options"
+ namespace="/"
theme="simple"
method="post"
enctype="multipart/form-data">
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/register.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/register.jsp 2011-07-21 15:35:40 UTC (rev 126)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/register.jsp 2011-07-21 15:36:20 UTC (rev 127)
@@ -11,7 +11,7 @@
<div id="content">
<div id="formFrame" class="fond">
<h1><s:text name="vradi.register.title" /></h1>
- <s:form action="register">
+ <s:form action="register" namespace="/">
<s:actionerror />
<p>
<s:textfield key="vradi.login.email" name="email" labelposition="top" labelSeparator=" :" />
@@ -20,7 +20,6 @@
<s:submit key="vradi.register.submit" name="submit" />
</p>
</s:form>
- <s:a action="login_input" id="loginLink"><s:text name="vradi.login.title" /></s:a>
</div>
</div>
</body>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/resultGrid.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/resultGrid.jsp 2011-07-21 15:35:40 UTC (rev 126)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/resultGrid.jsp 2011-07-21 15:36:20 UTC (rev 127)
@@ -9,8 +9,10 @@
* Format a Column as Link
*/
function formatLink(cellvalue, options, row) {
- return "<a href='/formNoteList/" + cellvalue + ".action'><%=_("vradi.form.editAction")%></a>";
+ var url = "<s:url action='formNoteList/" + cellvalue + "' namespace='/'/>";
+ return "<a href='" + url + "'><%=_("vradi.form.editAction")%></a>";
}
+
</script>
<s:set id="creationDateText">
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/savedQueries.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/savedQueries.jsp 2011-07-21 15:35:40 UTC (rev 126)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/savedQueries.jsp 2011-07-21 15:36:20 UTC (rev 127)
@@ -11,9 +11,9 @@
ActionContext.getContext().put("lastQueries", lastQueries);
%>
-<form id="queryForm" action="/fragment/searchPanel.action">
+<s:form id="queryForm" action="searchPanel" namespace="/fragment">
- <s:url id="savedQueries" namespace="/ajax" action="savedQueries"/>
+ <s:url id="savedQueries" action="savedQueries" namespace="/ajax"/>
<sj:select id="lastQueriesSelect"
href="%{savedQueries}"
@@ -30,4 +30,4 @@
onSuccessTopics="updateGrid"
targets="searchPanel"
button="true"/>
-</form>
\ No newline at end of file
+</s:form>
\ No newline at end of file
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/search.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/search.jsp 2011-07-21 15:35:40 UTC (rev 126)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/search.jsp 2011-07-21 15:36:20 UTC (rev 127)
@@ -18,7 +18,8 @@
$.subscribe('rowselect', function(event, data) {
var id = event.originalEvent.id;
var wikittyId = id.substring(10, id.length);
- window.open("/formView/" + wikittyId + ".action");
+ var url = "<s:url action='formView/" + wikittyId + "' namespace='/'/>";
+ window.open(url);
});
<%-- Thesaurus --%>
@@ -46,8 +47,9 @@
<body>
<div>
<div id="thesaurusPanel" class="left">
- <form id="thesaurusForm"
- action="/fragment/thesaurusFilter.action">
+ <s:form id="thesaurusForm"
+ action="thesaurusFilter"
+ namespace="/fragment">
<s:textfield id="thesaurusNameRequestField"
cssClass="left"
@@ -63,30 +65,36 @@
targets="thesaurusDiv"
button="true"/>
</div>
- </form>
- <sj:div id="thesaurusDiv" href="/fragment/thesaurusFilter.action" indicator="indicator-thesaurus">
+ </s:form>
+ <s:url id="thesaurusUrl"
+ action="thesaurusFilter"
+ namespace="/fragment"/>
+ <sj:div id="thesaurusDiv" href="%{thesaurusUrl}" indicator="indicator-thesaurus">
<img id="indicator-thesaurus" src="/img/indicator.gif" alt="Loading..." style="display:none"/>
</sj:div>
</div>
<div id="contentPanel"
class="contentPanel">
+ <s:url id="savedQueryUrl" action="savedQuery" namespace="/fragment"/>
<sj:div id="savedQueriesPanel"
- href="/fragment/savedQuery.action"
+ href="%{savedQueryUrl}"
listenTopics="updateQueries"
indicator="indicator-savedQuery">
<img id="indicator-savedQuery" src="/img/indicator.gif" alt="Loading..." style="display:none"/>
</sj:div>
+ <s:url id="searchPanelUrl" action="searchPanel" namespace="/fragment"/>
<sj:div id="searchPanel"
- href="/fragment/searchPanel.action"
+ href="%{searchPanelUrl}"
listenTopics="updateForm"
onSuccessTopics="updateGrid"
indicator="indicator-searchPanel">
<img id="indicator-searchPanel" src="/img/indicator.gif" alt="Loading..." style="display:none"/>
</sj:div>
+ <s:url id="searchUrl" action="search" namespace="/fragment"/>
<sj:div id="resultPanel"
- href="/fragment/search.action"
+ href="%{searchUrl}"
indicator="indicator-grid">
<img id="indicator-grid" src="/img/indicator.gif" alt="Loading..." style="display:none"/>
</sj:div>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/searchPanel.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/searchPanel.jsp 2011-07-21 15:35:40 UTC (rev 126)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/searchPanel.jsp 2011-07-21 15:36:20 UTC (rev 127)
@@ -2,7 +2,7 @@
<%@taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="sj" uri="/struts-jquery-tags" %>
-<s:form id="searchForm" action="search">
+<s:form id="searchForm" action="search" namespace="/">
<div id="empty">
</div>
@@ -22,7 +22,7 @@
</div>
<div id="searchActionPanel">
- <s:url id="saveQueryUrl" value="/fragment/saveQuery.action"/>
+ <s:url id="saveQueryUrl" value="fragment/saveQuery.action"/>
<s:set id="saveQueryText">
<s:text name="vradi.search.saveQuery"/>
@@ -34,7 +34,7 @@
onSuccessTopics="updateQueries,updateGrid"
button="true"/>
- <s:url id="switchQueryUrl" value="/fragment/switchQueryActivation.action"/>
+ <s:url id="switchQueryUrl" action="switchQueryActivation" namespace="/fragment"/>
<s:set id="queryActiveText">
<s:if test="queryActive">
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/seekPartners.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/seekPartners.jsp 2011-07-21 15:35:40 UTC (rev 126)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/seekPartners.jsp 2011-07-21 15:36:20 UTC (rev 127)
@@ -30,7 +30,7 @@
<body>
<h1><s:text name="vradi.seekingPartners.title" /></h1>
- <s:form id="seekingPartnersForm" action="sendInvitation" method="POST">
+ <s:form id="seekingPartnersForm" action="sendInvitation" namespace="/" method="POST">
<s:hidden name="noteId" value="%{localNoteId}"/>
<s:checkbox name="formReceiver" key="vradi.seekingPartners.formReceiver"/>
<s:checkbox name="seeker" key="vradi.seekingPartners.seeker"/>
@@ -40,14 +40,14 @@
<s:set id="showText">
<s:text name="vradi.show"/>
</s:set>
- <sj:submit
- id="partnersShowSubmit"
- href="/fragment/userInfo.action"
- targets="partnersShowResult"
- value="%{showText}"
- indicator="indicator-partnersShowResult"
- button="true"
- />
+
+ <s:url id="partnersShowUrl" action="userInfo" namespace="/fragment"/>
+ <sj:submit id="partnersShowSubmit"
+ href="%{partnersShowUrl}"
+ targets="partnersShowResult"
+ value="%{showText}"
+ indicator="indicator-partnersShowResult"
+ button="true"/>
<div id="partnersShowResult">
<img id="indicator-partnersShowResult" src="/img/indicator.gif" alt="wait..." style="display:none"/>
</div>
@@ -55,7 +55,7 @@
<s:textfield name="inviteEmail" key="vradi.seekingPartners.inviteEmail"/>
<s:textarea name="message"
- value="%{localNoteSummary}" key="vradi.userPreference.info"/>
+ value="%{localNoteSummary}" key="vradi.userPreference.info"/>
<s:set id="sendText">
<s:text name="vradi.send"/>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitation.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitation.jsp 2011-07-21 15:35:40 UTC (rev 126)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitation.jsp 2011-07-21 15:36:20 UTC (rev 127)
@@ -39,7 +39,7 @@
<div>
<s:text name="vradi.showInvitation.otherPartners"/>
- <form id="partnersForm" action="/fragment/userInfo.action">
+ <form id="partnersForm" action="fragment/userInfo.action" namespace="/">
<s:select size="5" name="userId" list="partners" listKey="wikittyId" listValue="login"/>
<s:set id="showText">
<s:text name="vradi.show"/>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/thesaurusFilter.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/thesaurusFilter.jsp 2011-07-21 15:35:40 UTC (rev 126)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/thesaurusFilter.jsp 2011-07-21 15:36:20 UTC (rev 127)
@@ -3,7 +3,7 @@
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sjt" uri="/struts-jquery-tree-tags" %>
-<s:url id="thesaurusDataUrl" namespace="/ajax" action="thesaurus">
+<s:url id="thesaurusDataUrl" action="thesaurus" namespace="/ajax">
<s:param name="thesaurusNameRequest">
<s:property value="thesaurusNameRequest"/>
</s:param>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/userPreference.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/userPreference.jsp 2011-07-21 15:35:40 UTC (rev 126)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/userPreference.jsp 2011-07-21 15:36:20 UTC (rev 127)
@@ -45,14 +45,16 @@
* Format a Column as Link
*/
function formatLink(cellvalue, options, row) {
- return "<a href='/formNoteList/" + cellvalue + ".action'><%=_("vradi.form.editAction")%></a>";
+ var url = "<s:url action='formNoteList/" + cellvalue + "' namespace='/'/>";
+ return "<a href='" + url + "'><%=_("vradi.form.editAction")%></a>";
}
<%-- Table --%>
$.subscribe('rowselect', function(event, data) {
var id = event.originalEvent.id;
var wikittyId = id.substring(10, id.length);
- window.open("/formView/" + wikittyId + ".action");
+ var url = "<s:url action='formView/" + wikittyId + "' namespace='/'/>";
+ window.open(url);
});
</script>
@@ -66,7 +68,7 @@
| Information
+-->
<div>
- <s:form id="infoForm" action="/ajax/edit/%{localUserId}.action" method="POST">
+ <s:form id="infoForm" action="edit/%{localUserId}" namespace="/ajax" method="POST">
<sj:textarea name="%{localVradiUserFieldInfo}"
value="%{localUserInfo}"
key="vradi.userPreference.info"/>
@@ -99,9 +101,9 @@
<div>
<h2><s:text name="vradi.userPreference.nosend" /></h2>
<%--<ws:form wikitty="<%=WikittyUtil.getWikitty(action.getProxy().getWikittyService(), null, action.getUser())%>"--%>
- <%--proxy="<%=action.getProxy()%>" action="/ajax/edit/%{localUserId}.action">--%>
+ <%--proxy="<%=action.getProxy()%>" action="ajax/edit/%{localUserId}.action">--%>
<%--</ws:form>--%>
- <s:form id="noSendForm" action="/ajax/edit/%{localUserId}.action" method="POST">
+ <s:form id="noSendForm" action="edit/%{localUserId}" namespace="/ajax" method="POST">
<ws:selectAssociation proxy="<%=action.getProxy()%>"
name="userId"
@@ -112,7 +114,8 @@
<sj:submit
id="noSendFormShowSubmit"
- href="/fragment/userInfo.action"
+ action="userInfo"
+ namespace="/fragment"
targets="noSendResult"
value="%{showText}"
indicator="indicator-noSendFormSubmit"
@@ -120,7 +123,6 @@
/>
<sj:submit
id="noSendFormDeleteSubmit"
- href="%{simpleecho}"
targets="noSendResult"
value="%{deleteText}"
indicator="indicator-noSendFormSubmit"
@@ -139,7 +141,7 @@
+-->
<div>
<h2><s:text name="vradi.userPreference.noreceived" /></h2>
- <s:form id="noReceivedForm" action="/ajax/edit/%{localUserId}.action" method="POST">
+ <s:form id="noReceivedForm" action="edit/%{localUserId}" namespace="/ajax" method="POST">
<ws:selectAssociation proxy="<%=action.getProxy()%>"
name="userId"
@@ -150,7 +152,8 @@
<sj:submit
id="noReceivedFormShowSubmit"
- href="/fragment/userInfo.action"
+ action="userInfo"
+ namespace="/fragment"
targets="noReceivedResult"
value="%{showText}"
indicator="indicator-noReceivedSubmit"
@@ -158,7 +161,6 @@
/>
<sj:submit
id="noReceivedFormDeleteSubmit"
- href="%{simpleecho}"
targets="noReceivedResult"
value="%{deleteText}"
indicator="indicator-noReceivedSubmit"
@@ -177,7 +179,7 @@
+-->
<div>
<h2><s:text name="vradi.userPreference.partners" /></h2>
- <s:form id="partnersForm" action="/fragment/partners/%{localUserId}.action" method="POST">
+ <s:form id="partnersForm" action="partners/%{localUserId}" namespace="/fragment" method="POST">
<ws:select name="userId"
size="5"
@@ -187,7 +189,8 @@
<%--<s:select size="5" name="userId" list="%{localPartners}" listKey="wikittyId" listValue="login"/>--%>
<sj:submit
id="partnersFormShowSubmit"
- href="/fragment/userInfo.action"
+ action="userInfo"
+ namespace="/fragment"
targets="partnersFormResult"
value="%{showText}"
indicator="indicator-partnersForm"
1
0
r126 - trunk/vradi-swing/src/main/java/org/chorem/vradi/ui/admin/content
by sletellier@users.chorem.org 21 Jul '11
by sletellier@users.chorem.org 21 Jul '11
21 Jul '11
Author: sletellier
Date: 2011-07-21 17:35:40 +0200 (Thu, 21 Jul 2011)
New Revision: 126
Url: http://chorem.org/repositories/revision/vradi/126
Log:
Remove accents
Modified:
trunk/vradi-swing/src/main/java/org/chorem/vradi/ui/admin/content/AdminXmlStreamUI.jaxx
trunk/vradi-swing/src/main/java/org/chorem/vradi/ui/admin/content/XmlStreamConfigUI.jaxx
Modified: trunk/vradi-swing/src/main/java/org/chorem/vradi/ui/admin/content/AdminXmlStreamUI.jaxx
===================================================================
--- trunk/vradi-swing/src/main/java/org/chorem/vradi/ui/admin/content/AdminXmlStreamUI.jaxx 2011-07-18 15:52:57 UTC (rev 125)
+++ trunk/vradi-swing/src/main/java/org/chorem/vradi/ui/admin/content/AdminXmlStreamUI.jaxx 2011-07-21 15:35:40 UTC (rev 126)
@@ -185,7 +185,7 @@
xmlStreamTag.setLastModifier(login);
XmlStream stream = getHandler().saveStream(this, getHelper(), getBean(), fieldsModel.getBindings());
- // echatellier juste pour que la date de mise à jour se rafraichisse
+ // echatellier juste pour que la date de mise a jour se rafraichisse
setBean(null);
setBean(stream);
}
@@ -206,7 +206,7 @@
}
protected void stopEditing() {
- //FIXME-TC20091116 il faut pouvoir annuler l'édition si on sort du tableau
+ //FIXME-TC20091116 il faut pouvoir annuler l'edition si on sort du tableau
if (fieldsTable.getCellEditor() != null) {
fieldsTable.getCellEditor().stopCellEditing();
}
Modified: trunk/vradi-swing/src/main/java/org/chorem/vradi/ui/admin/content/XmlStreamConfigUI.jaxx
===================================================================
--- trunk/vradi-swing/src/main/java/org/chorem/vradi/ui/admin/content/XmlStreamConfigUI.jaxx 2011-07-18 15:52:57 UTC (rev 125)
+++ trunk/vradi-swing/src/main/java/org/chorem/vradi/ui/admin/content/XmlStreamConfigUI.jaxx 2011-07-21 15:35:40 UTC (rev 126)
@@ -63,7 +63,7 @@
// initialise correctement les differents panel.
//
// Dans le cas ou le pattern ne match pas, la valeur par defaut
- // est celle des services (à savoir, tous les 1 jour, à minuit).
+ // est celle des services (a savoir, tous les 1 jour, a minuit).
//
String xmlStringImportTime = bean.getImportTime();
1
0
r125 - in trunk/vradi-web/src/main: resources resources/i18n webapp/WEB-INF/jsp
by sletellier@users.chorem.org 18 Jul '11
by sletellier@users.chorem.org 18 Jul '11
18 Jul '11
Author: sletellier
Date: 2011-07-18 17:52:57 +0200 (Mon, 18 Jul 2011)
New Revision: 125
Url: http://chorem.org/repositories/revision/vradi/125
Log:
Move ajax actions to namespace ajax
Modified:
trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties
trunk/vradi-web/src/main/resources/struts.xml
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/resultGrid.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/savedQueries.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitation.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitationResult.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/thesaurusFilter.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/userPreference.jsp
Modified: trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties
===================================================================
--- trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties 2011-07-18 08:48:04 UTC (rev 124)
+++ trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties 2011-07-18 15:52:57 UTC (rev 125)
@@ -55,9 +55,9 @@
vradi.invitation.reject.content=Text explicatif \:
vradi.invitation.reject.content.title=Rejeter l'invitation
vradi.invitation.reject.title=[Vradi web] Une demande de partenaria à été rejeté
-vradi.invitation.result.accept=L'utilisateur %1$s à accepté votre partenaria sur le projet %4$s avec le message \n\n %2$s \n\n vous aviez répondu : \n\n : %3$s \n\n parce que \: %4$s\n"\n\nCordialement.
+vradi.invitation.result.accept=L'utilisateur %1$s à accepté votre partenaria sur le projet %4$s avec le message \n\n %2$s \n\n vous aviez répondu \: \n\n \: %3$s \n\n parce que \: %4$s\n"\n\nCordialement.
vradi.invitation.result.accept.title=[Vradi web] Une demande de partenaria à été accèpté
-vradi.invitation.result.reject=L'utilisateur %1$s à rejeté votre partenaria sur le projet %4$s avec le message \n\n %2$s \n\n vous aviez répondu : \n\n : %3$s \n\n parce que \: %4$s\n"\n\nCordialement.
+vradi.invitation.result.reject=L'utilisateur %1$s à rejeté votre partenaria sur le projet %4$s avec le message \n\n %2$s \n\n vous aviez répondu \: \n\n \: %3$s \n\n parce que \: %4$s\n"\n\nCordialement.
vradi.invitation.result.reject.title=[Vradi web] Une demande de partenaria à été rejeté
vradi.invitationResult.from=L'invitation provient de \:
vradi.login.email=Email
Modified: trunk/vradi-web/src/main/resources/struts.xml
===================================================================
--- trunk/vradi-web/src/main/resources/struts.xml 2011-07-18 08:48:04 UTC (rev 124)
+++ trunk/vradi-web/src/main/resources/struts.xml 2011-07-18 15:52:57 UTC (rev 125)
@@ -132,55 +132,7 @@
<result>/WEB-INF/jsp/options.jsp</result>
</action>
-
<!--
- | Thesaurus
- +-->
- <action name="thesaurus" class="org.chorem.vradi.actions.ThesaurusAction">
- <param name="thesaurusNameRequest"/>
- <result name="success" type="json">
- <param name="root">nodes</param>
- </result>
- </action>
-
- <!--
- | Form grid
- +-->
- <action name="formGrid" class="org.chorem.vradi.actions.FormGridAction">
- <param name="query"/>
- <result name="success" type="tableModel-json"/>
- </action>
-
- <!--
- | Form note grid
- +-->
- <action name="formNoteGrid" class="org.chorem.vradi.actions.FormNoteGridAction">
- <param name="opened"/>
- <result name="success" type="tableModel-json"/>
- </action>
-
- <!--
- | Saved queries panel
- +-->
- <action name="savedQueries" class="org.chorem.vradi.actions.SavedQueriesAction">
- <result name="success" type="json"/>
- </action>
-
- <!--
- | Saved queries panel
- +-->
- <action name="invitationResultButtons" class="org.chorem.vradi.actions.ShowInvitationAction">
- <result name="success" type="json"/>
- </action>
-
- <!--
- | Saved queries panel
- +-->
- <action name="invitationResultConfirmButtons" class="org.chorem.vradi.actions.ShowInvitationResultAction">
- <result name="success" type="json"/>
- </action>
-
- <!--
| Affiche le détail du formulaire
+-->
<action name="formView/*" class="org.chorem.vradi.actions.FormViewAction">
@@ -385,6 +337,55 @@
<result>/WEB-INF/jsp/empty.jsp</result>
<result name="error">/WEB-INF/jsp/empty.jsp</result>
</action>
+
+
+ <!--
+ | Thesaurus
+ +-->
+ <action name="thesaurus" class="org.chorem.vradi.actions.ThesaurusAction">
+ <param name="thesaurusNameRequest"/>
+ <result name="success" type="json">
+ <param name="root">nodes</param>
+ </result>
+ </action>
+
+ <!--
+ | Form grid
+ +-->
+ <action name="formGrid" class="org.chorem.vradi.actions.FormGridAction">
+ <param name="query"/>
+ <result name="success" type="tableModel-json"/>
+ </action>
+
+ <!--
+ | Form note grid
+ +-->
+ <action name="formNoteGrid" class="org.chorem.vradi.actions.FormNoteGridAction">
+ <param name="opened"/>
+ <result name="success" type="tableModel-json"/>
+ </action>
+
+ <!--
+ | Saved queries panel
+ +-->
+ <action name="savedQueries" class="org.chorem.vradi.actions.SavedQueriesAction">
+ <result name="success" type="json"/>
+ </action>
+
+ <!--
+ | Saved queries panel
+ +-->
+ <action name="invitationResultButtons" class="org.chorem.vradi.actions.ShowInvitationAction">
+ <result name="success" type="json"/>
+ </action>
+
+ <!--
+ | Saved queries panel
+ +-->
+ <action name="invitationResultConfirmButtons" class="org.chorem.vradi.actions.ShowInvitationResultAction">
+ <result name="success" type="json"/>
+ </action>
+
</package>
</struts>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/resultGrid.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/resultGrid.jsp 2011-07-18 08:48:04 UTC (rev 124)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/resultGrid.jsp 2011-07-18 15:52:57 UTC (rev 125)
@@ -29,7 +29,7 @@
<%=Infogene.FQ_FIELD_INFOGENE_OBJET%>
</s:set>
-<s:url id="formResultUrl" action="formGrid">
+<s:url id="formResultUrl" namespace="/ajax" action="formGrid">
<s:param name="query">
<s:property value="query"/>
</s:param>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/savedQueries.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/savedQueries.jsp 2011-07-18 08:48:04 UTC (rev 124)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/savedQueries.jsp 2011-07-18 15:52:57 UTC (rev 125)
@@ -13,7 +13,7 @@
<form id="queryForm" action="/fragment/searchPanel.action">
- <s:url id="savedQueries" action="savedQueries"/>
+ <s:url id="savedQueries" namespace="/ajax" action="savedQueries"/>
<sj:select id="lastQueriesSelect"
href="%{savedQueries}"
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitation.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitation.jsp 2011-07-18 08:48:04 UTC (rev 124)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitation.jsp 2011-07-18 15:52:57 UTC (rev 125)
@@ -65,7 +65,7 @@
<s:hidden name="noteId" value="%{localNoteId}"/>
<s:hidden name="senderId" value="%{localSenderId}"/>
<s:hidden name="message" value="%{message}"/>
- <s:url id="invitationResultUrl" action="invitationResultButtons"/>
+ <s:url id="invitationResultUrl" namespace="/ajax" action="invitationResultButtons"/>
<sj:radio
href="%{invitationResultUrl}"
id="invitationResultSet"
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitationResult.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitationResult.jsp 2011-07-18 08:48:04 UTC (rev 124)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitationResult.jsp 2011-07-18 15:52:57 UTC (rev 125)
@@ -55,7 +55,7 @@
<s:hidden name="senderId" value="%{localSenderId}"/>
<s:hidden name="message" value="%{message}"/>
<s:hidden name="messageResult" value="%{messageResult}"/>
- <s:url id="invitationResultConfirmUrl" action="invitationResultConfirmButtons"/>
+ <s:url id="invitationResultConfirmUrl" namespace="/ajax" action="invitationResultConfirmButtons"/>
<sj:radio
href="%{invitationResultConfirmUrl}"
id="invitationResultSet"
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/thesaurusFilter.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/thesaurusFilter.jsp 2011-07-18 08:48:04 UTC (rev 124)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/thesaurusFilter.jsp 2011-07-18 15:52:57 UTC (rev 125)
@@ -3,7 +3,7 @@
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sjt" uri="/struts-jquery-tree-tags" %>
-<s:url id="thesaurusDataUrl" action="thesaurus">
+<s:url id="thesaurusDataUrl" namespace="/ajax" action="thesaurus">
<s:param name="thesaurusNameRequest">
<s:property value="thesaurusNameRequest"/>
</s:param>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/userPreference.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/userPreference.jsp 2011-07-18 08:48:04 UTC (rev 124)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/userPreference.jsp 2011-07-18 15:52:57 UTC (rev 125)
@@ -218,7 +218,7 @@
<div>
<h2><s:text name="vradi.userPreference.note.open" /></h2>
- <s:url id="resultOpenedUrl" action="formNoteGrid">
+ <s:url id="resultOpenedUrl" namespace="/ajax" action="formNoteGrid">
<s:param name="opened" value="true"/>
</s:url>
<s:set id="creationDateText">
@@ -275,7 +275,7 @@
<div>
<h2><s:text name="vradi.userPreference.note.close" /></h2>
- <s:url id="resultClosedUrl" action="formNoteGrid">
+ <s:url id="resultClosedUrl" namespace="/ajax" action="formNoteGrid">
<s:param name="opened" value="false"/>
</s:url>
<s:set id="creationDateText">
1
0
Author: kcardineaud
Date: 2011-07-18 10:48:04 +0200 (Mon, 18 Jul 2011)
New Revision: 124
Url: http://chorem.org/repositories/revision/vradi/124
Log:
text and checkbox are now on the same line
Modified:
trunk/vradi-web/src/main/webapp/css/style.css
Modified: trunk/vradi-web/src/main/webapp/css/style.css
===================================================================
--- trunk/vradi-web/src/main/webapp/css/style.css 2011-07-15 12:06:48 UTC (rev 123)
+++ trunk/vradi-web/src/main/webapp/css/style.css 2011-07-18 08:48:04 UTC (rev 124)
@@ -36,6 +36,10 @@
padding:2px;
}
+.wwlbl , .wwctrl {
+ display:inline;
+}
+
#thesaurusPanel {
margin : 0;
float :left;
@@ -59,6 +63,7 @@
#footer {
clear:both;
}
+
#resultPanel {
width:100%;
}
@@ -67,6 +72,8 @@
display:none;
}
+
+
#queryNamePanel {
text-align: right;
width: 62%;
1
0
r123 - in trunk/vradi-web/src/main/java/org/chorem/vradi: . actions
by sletellier@users.chorem.org 15 Jul '11
by sletellier@users.chorem.org 15 Jul '11
15 Jul '11
Author: sletellier
Date: 2011-07-15 14:06:48 +0200 (Fri, 15 Jul 2011)
New Revision: 123
Url: http://chorem.org/repositories/revision/vradi/123
Log:
- Update user preference on reponses
Modified:
trunk/vradi-web/src/main/java/org/chorem/vradi/InvitationResult.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationResultAction.java
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/InvitationResult.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/InvitationResult.java 2011-07-15 11:54:49 UTC (rev 122)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/InvitationResult.java 2011-07-15 12:06:48 UTC (rev 123)
@@ -7,12 +7,51 @@
import static org.nuiton.i18n.I18n._;
public enum InvitationResult {
- ACCEPT("Accept", EmailType.INVITATION_ACCEPT, EmailType.INVITATION_CONFIRMATION_ACCEPT),
+ ACCEPT("Accept", EmailType.INVITATION_ACCEPT, EmailType.INVITATION_CONFIRMATION_ACCEPT) {
+ @Override
+ public VradiUser updateReceivedUserPreference(VradiUser user, VradiUser from) {
+ // Do nothing
+ return user;
+ }
+
+ @Override
+ public VradiUser updateSendUserPreference(VradiUser user, VradiUser to) {
+ // Do nothing
+ return user;
+ }
+ },
+
// Same mails are send for both
- REJECT("Reject", EmailType.INVITATION_REJECT, EmailType.INVITATION_CONFIRMATION_REJECT),
- NO_MORE("NoMoreReceived", "vradi.invitation.nomore", EmailType.INVITATION_REJECT, EmailType.INVITATION_CONFIRMATION_REJECT);
+ REJECT("Reject", EmailType.INVITATION_REJECT, EmailType.INVITATION_CONFIRMATION_REJECT) {
+ @Override
+ public VradiUser updateReceivedUserPreference(VradiUser user, VradiUser from) {
+ // Do nothing
+ return user;
+ }
+
+ @Override
+ public VradiUser updateSendUserPreference(VradiUser user, VradiUser to) {
+ // Do nothing
+ return user;
+ }
+ },
+ NO_MORE("NoMoreReceived", "vradi.invitation.nomore", EmailType.INVITATION_REJECT, EmailType.INVITATION_CONFIRMATION_REJECT) {
+
+ @Override
+ public VradiUser updateReceivedUserPreference(VradiUser user, VradiUser from) {
+ user.addNoReceived(from.getWikittyId());
+ return user;
+ }
+
+ @Override
+ public VradiUser updateSendUserPreference(VradiUser user, VradiUser to) {
+ user.addNoSend(to.getWikittyId());
+ return user;
+ }
+ };
+
public static final String BUTTON_PREFIX = ".button";
public static final String CONTENT_PREFIX = ".content";
public static final String TITLE_PREFIX = ".content.title";
@@ -70,4 +109,8 @@
public boolean sendConfirmEmail(Collection<String> recipients, VradiUser user, String comment, String... args) {
return confirmationEmailType.sendEmail(recipients, user, comment, args);
}
+
+ public abstract VradiUser updateReceivedUserPreference(VradiUser user, VradiUser from);
+
+ public abstract VradiUser updateSendUserPreference(VradiUser user, VradiUser to);
}
\ No newline at end of file
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationAction.java 2011-07-15 11:54:49 UTC (rev 122)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationAction.java 2011-07-15 12:06:48 UTC (rev 123)
@@ -175,6 +175,10 @@
public String sendInvitationResult() throws Exception {
+ // Update preference
+ VradiUser user = invitationResult.updateReceivedUserPreference(getUser(), getSender());
+ setUser(getProxy().store(user));
+
String url = null;
if (invitationResult.equals(InvitationResult.ACCEPT)) {
url = VradiWebHelper.encodeAndGetUrl(SHOW_RESULT_INVITATION_ACTION, noteId, getUser().getWikittyId(), message, messageResult);
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationResultAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationResultAction.java 2011-07-15 11:54:49 UTC (rev 122)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationResultAction.java 2011-07-15 12:06:48 UTC (rev 123)
@@ -177,6 +177,10 @@
public String sendInvitationResultConfirm() throws Exception {
+ // Update preference
+ VradiUser user = invitationResult.updateSendUserPreference(getUser(), getSender());
+ setUser(getProxy().store(user));
+
if (this.invitationResult.sendConfirmEmail(Collections.singleton(getSender().getLogin()),
getUser(), getMessage(), getMessageResult(), getMessageConfirmResult(), getFormNoteSummary())) {
return SUCCESS;
1
0
r122 - in trunk/vradi-web/src/main: java/org/chorem/vradi java/org/chorem/vradi/actions resources resources/i18n webapp/WEB-INF/jsp
by sletellier@users.chorem.org 15 Jul '11
by sletellier@users.chorem.org 15 Jul '11
15 Jul '11
Author: sletellier
Date: 2011-07-15 13:54:49 +0200 (Fri, 15 Jul 2011)
New Revision: 122
Url: http://chorem.org/repositories/revision/vradi/122
Log:
- Implement invitation responce and invitation responce validation
- Remove displaytag.properties
Added:
trunk/vradi-web/src/main/java/org/chorem/vradi/InvitationResult.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationResultAction.java
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResult.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResultConfirm.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitationResult.jsp
Removed:
trunk/vradi-web/src/main/resources/displaytag.properties
Modified:
trunk/vradi-web/src/main/java/org/chorem/vradi/EmailType.java
trunk/vradi-web/src/main/java/org/chorem/vradi/VradiWebHelper.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/OptionsAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SearchAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SendInvitationAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationAction.java
trunk/vradi-web/src/main/resources/i18n/vradi-web_en_GB.properties
trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties
trunk/vradi-web/src/main/resources/struts.xml
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNote.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/seekPartners.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitation.jsp
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/EmailType.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/EmailType.java 2011-07-13 15:27:59 UTC (rev 121)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/EmailType.java 2011-07-15 11:54:49 UTC (rev 122)
@@ -15,20 +15,28 @@
public enum EmailType {
- THESAURUS_NEW_CHILD(n_("vradi.template.thesaurus.new.child")),
- THESAURUS_RENAMED(n_("vradi.template.thesaurus.renamed")),
- WEBHARVEST(n_("vradi.template.webHarvest")),
- RSS(n_("vradi.template.rss")),
- REQUEST(n_("vradi.template.request"));
+ OPTION_THESAURUS_NEW_CHILD(n_("vradi.template.thesaurus.new.child")),
+ OPTION_THESAURUS_RENAMED(n_("vradi.template.thesaurus.renamed")),
+ OPTION_WEBHARVEST(n_("vradi.template.webHarvest")),
+ OPTION_RSS(n_("vradi.template.rss")),
+ OPTION_REQUEST(n_("vradi.template.request")),
+ INVITATION_ACCEPT(n_("vradi.invitation.accept")),
+ INVITATION_REJECT(n_("vradi.invitation.reject")),
+ INVITATION_CONFIRMATION_ACCEPT(n_("vradi.invitation.result.accept")),
+ INVITATION_CONFIRMATION_REJECT(n_("vradi.invitation.result.reject"));
protected static final Log log = LogFactory.getLog(EmailType.class);
public static final String TITLE_PREFIX = ".title";
- private String key;
+ protected String key;
EmailType(String key) {
this.key = key;
}
+ public String getKey() {
+ return key;
+ }
+
public boolean sendEmailToAdmins(VradiUser user, String comment, String... args) {
List<String> adminEmail = VradiWebConfig.getAdminEmail();
return sendEmail(adminEmail, user, comment, args);
Added: trunk/vradi-web/src/main/java/org/chorem/vradi/InvitationResult.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/InvitationResult.java (rev 0)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/InvitationResult.java 2011-07-15 11:54:49 UTC (rev 122)
@@ -0,0 +1,73 @@
+package org.chorem.vradi;
+
+import org.chorem.vradi.entities.VradiUser;
+
+import java.util.Collection;
+
+import static org.nuiton.i18n.I18n._;
+
+public enum InvitationResult {
+ ACCEPT("Accept", EmailType.INVITATION_ACCEPT, EmailType.INVITATION_CONFIRMATION_ACCEPT),
+
+ // Same mails are send for both
+ REJECT("Reject", EmailType.INVITATION_REJECT, EmailType.INVITATION_CONFIRMATION_REJECT),
+ NO_MORE("NoMoreReceived", "vradi.invitation.nomore", EmailType.INVITATION_REJECT, EmailType.INVITATION_CONFIRMATION_REJECT);
+
+ public static final String BUTTON_PREFIX = ".button";
+ public static final String CONTENT_PREFIX = ".content";
+ public static final String TITLE_PREFIX = ".content.title";
+ public static final String CONFIRMATION_CONTENT_PREFIX = ".confirmation.content";
+ public static final String CONFIRMATION_TITLE_PREFIX = ".confirmation.content.title";
+
+ protected String key;
+ protected String i18nKey;
+ protected EmailType emailType;
+ protected EmailType confirmationEmailType;
+
+ InvitationResult(String key, EmailType emailType, EmailType confirmationEmailType) {
+ this(key, emailType.getKey(), emailType, confirmationEmailType);
+ }
+
+ InvitationResult(String key, String i18nKey, EmailType emailType, EmailType confirmationEmailType) {
+ this.key = key;
+ this.i18nKey = i18nKey;
+ this.emailType = emailType;
+ this.confirmationEmailType = confirmationEmailType;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public String getI18nKey() {
+ return i18nKey;
+ }
+
+ public String getTitle() {
+ return _(getI18nKey() + TITLE_PREFIX);
+ }
+
+ public String getConfirmationTitle() {
+ return _(getI18nKey() + CONFIRMATION_TITLE_PREFIX);
+ }
+
+ public String getContent() {
+ return _(getI18nKey() + CONTENT_PREFIX);
+ }
+
+ public String getConfirmationContent() {
+ return _(getI18nKey() + CONFIRMATION_CONTENT_PREFIX);
+ }
+
+ public String getButtonLabel() {
+ return _(getI18nKey() + BUTTON_PREFIX);
+ }
+
+ public boolean sendEmail(Collection<String> recipients, VradiUser user, String comment, String... args) {
+ return emailType.sendEmail(recipients, user, comment, args);
+ }
+
+ public boolean sendConfirmEmail(Collection<String> recipients, VradiUser user, String comment, String... args) {
+ return confirmationEmailType.sendEmail(recipients, user, comment, args);
+ }
+}
\ No newline at end of file
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/VradiWebHelper.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/VradiWebHelper.java 2011-07-13 15:27:59 UTC (rev 121)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/VradiWebHelper.java 2011-07-15 11:54:49 UTC (rev 122)
@@ -5,9 +5,6 @@
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.Date;
-import java.util.Set;
-
-import freemarker.template.SimpleDate;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
@@ -24,6 +21,7 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(VradiWebHelper.class);
+ public static final String SEPARATOR = "@§@";
public static String escapeSciptBalises(String txt) {
@@ -56,6 +54,20 @@
return result;
}
+ public static String encodeAndGetUrl(String action, String... args) throws IOException {
+
+ String info = StringUtils.join(args, SEPARATOR);
+
+ String param = encode(info);
+ String url = String.format("%s/%s.action?p=%s",
+ VradiWebConfig.getVradiWebServerUrl(), action, param);
+ if (url.length() > 2000) {
+ log.error(String.format("Url forged for invitation is to long for some navigator '%s'", url));
+ }
+
+ return url;
+ }
+
/**
* Methode inverse de {@link #encode(java.lang.String).
*
@@ -77,6 +89,11 @@
return result;
}
+ public static String[] decodeAndGetInfos(String p, int i) throws IOException {
+ String datas = decode(p);
+ return datas.split(SEPARATOR, i);
+ }
+
/**
* Converti le rst dans le format demande
* @param resultType
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/OptionsAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/OptionsAction.java 2011-07-13 15:27:59 UTC (rev 121)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/OptionsAction.java 2011-07-15 11:54:49 UTC (rev 122)
@@ -83,29 +83,28 @@
boolean sent = true;
if (!StringUtils.isEmpty(thesaurusNewChildName)) {
// User propose new thesaurus child
- sent &= EmailType.THESAURUS_NEW_CHILD.sendEmailToAdmins(getUser(), comment, thesaurusPath, thesaurusNewChildName);
+ sent &= EmailType.OPTION_THESAURUS_NEW_CHILD.sendEmailToAdmins(getUser(), comment, thesaurusPath, thesaurusNewChildName);
}
if (!StringUtils.isEmpty(thesaurusRenamed)) {
// User propose to rename thesaurus
- sent &= EmailType.THESAURUS_RENAMED.sendEmailToAdmins(getUser(), comment, thesaurusPath, thesaurusName, thesaurusRenamed);
+ sent &= EmailType.OPTION_THESAURUS_RENAMED.sendEmailToAdmins(getUser(), comment, thesaurusPath, thesaurusName, thesaurusRenamed);
}
if (webHarvestScript != null) {
// Upload file
String uri = getVradiSession().getFileService().uploadWebHarvestScript(webHarvestScript);
// User propose to add a webharvest script
- sent &= EmailType.WEBHARVEST.sendEmailToAdmins(getUser(), comment, uri);
+ sent &= EmailType.OPTION_WEBHARVEST.sendEmailToAdmins(getUser(), comment, uri);
}
if (!StringUtils.isEmpty(rssUrl)) {
// User propose to add an rss
- sent &= EmailType.RSS.sendEmailToAdmins(getUser(), comment, rssUrl);
+ sent &= EmailType.OPTION_RSS.sendEmailToAdmins(getUser(), comment, rssUrl);
}
if (sent) {
return SUCCESS;
- } else {
- return ERROR;
}
+ return ERROR;
}
}
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SearchAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SearchAction.java 2011-07-13 15:27:59 UTC (rev 121)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SearchAction.java 2011-07-15 11:54:49 UTC (rev 122)
@@ -1,20 +1,15 @@
package org.chorem.vradi.actions;
-import com.opensymphony.xwork2.ActionContext;
import org.apache.commons.lang.StringUtils;
-import org.apache.struts2.interceptor.ServletRequestAware;
-import org.chorem.vradi.VradiSession;
import org.chorem.vradi.entities.Query;
import org.chorem.vradi.entities.VradiUser;
-import javax.servlet.http.HttpServletRequest;
-
/**
* Search action
*
* @author sletellier
*/
-public class SearchAction extends VradiBaseAction implements ServletRequestAware {
+public class SearchAction extends VradiBaseAction {
private static final long serialVersionUID = -3735250067223062719L;
@@ -23,7 +18,6 @@
protected int nbForms = DEFAULT_NB_FORMS;
protected String query;
protected String queryName;
- protected HttpServletRequest request;
protected String selectedQuery;
protected boolean queryActive;
protected boolean saveQuery;
@@ -37,12 +31,12 @@
}
public String getSelectedQuery() {
- selectedQuery = VradiSession.getVradiSession(request).getSelectedRequest();
+ selectedQuery = getVradiSession().getSelectedRequest();
return selectedQuery;
}
public void setSelectedQuery(String selectedQuery) {
- VradiSession.getVradiSession(request).setSelectedRequest(selectedQuery);
+ getVradiSession().setSelectedRequest(selectedQuery);
this.selectedQuery = selectedQuery;
}
@@ -74,11 +68,6 @@
return queryActive;
}
- @Override
- public void setServletRequest(HttpServletRequest request) {
- this.request = request;
- }
-
public String refreshForm() {
String selectedQuery = getSelectedQuery();
if (!StringUtils.isEmpty(selectedQuery)) {
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SendInvitationAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SendInvitationAction.java 2011-07-13 15:27:59 UTC (rev 121)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SendInvitationAction.java 2011-07-15 11:54:49 UTC (rev 122)
@@ -30,6 +30,7 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(SendInvitationAction.class);
+ public static final String SHOW_INVITATION_ACTION = "showInvitation";
static public SendInvitationAction getAction() {
return (SendInvitationAction)ActionContext.getContext().get(CONTEXT_ACTION_KEY);
@@ -103,7 +104,6 @@
*/
@Override
public String execute() throws Exception {
- String result = SUCCESS;
WikittyProxy proxy = getProxy();
VradiUser sender = getVradiSession().getUser();
@@ -164,27 +164,14 @@
}
}
- StringBuilder info = new StringBuilder();
- info.append(noteId);
- info.append("\n");
- info.append(sender.getWikittyId());
- info.append("\n");
- info.append(StringUtils.join(note.getPartners(), ","));
- info.append("\n");
- info.append(message);
+ String url = VradiWebHelper.encodeAndGetUrl(SHOW_INVITATION_ACTION, noteId, sender.getWikittyId(), StringUtils.join(note.getPartners(), ","), message);
- String param = VradiWebHelper.encode(info.toString());
- String url = String.format("%s/showInvitation.action?p=%s",
- VradiWebConfig.getVradiWebServerUrl(), param);
- if (url.length() > 2000) {
- log.error(String.format("Url forged for invitation is to long for some navigator '%s'", url));
- }
-
- if (EmailType.REQUEST.sendEmail(recipient, sender, message, url, sender.getInfo())) {
+ if (EmailType.OPTION_REQUEST.sendEmail(recipient, sender, message, url, sender.getInfo())) {
sendCount = recipient.size();
+ return SUCCESS;
}
- return result;
+ return ERROR;
}
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationAction.java 2011-07-13 15:27:59 UTC (rev 121)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationAction.java 2011-07-15 11:54:49 UTC (rev 122)
@@ -2,14 +2,24 @@
import com.opensymphony.xwork2.ActionContext;
import java.util.Arrays;
+import java.util.Collections;
+import java.util.LinkedHashMap;
import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.struts2.interceptor.ServletRequestAware;
+import org.chorem.vradi.InvitationResult;
import org.chorem.vradi.VradiWebHelper;
+import org.chorem.vradi.entities.FormNote;
import org.chorem.vradi.entities.VradiUser;
import org.nuiton.jrst.JRST;
import org.nuiton.wikitty.WikittyProxy;
+import javax.servlet.http.HttpServletRequest;
+
/**
*
* @author poussin
@@ -18,22 +28,34 @@
* Last update: $Date$
* by : $Author$
*/
-public class ShowInvitationAction extends VradiBaseAction {
+public class ShowInvitationAction extends VradiBaseAction implements ServletRequestAware {
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(ShowInvitationAction.class);
+ public static final String SHOW_RESULT_INVITATION_ACTION = "showInvitationResult";
static public ShowInvitationAction getAction() {
return (ShowInvitationAction)ActionContext.getContext().get(CONTEXT_ACTION_KEY);
}
+ protected HttpServletRequest request;
protected String p;
protected String noteId;
protected VradiUser sender;
+ protected String senderId;
protected String senderInfo;
protected List<VradiUser> partners;
protected String message;
+ protected String messageRST;
+ protected String messageResult;
+ protected InvitationResult invitationResult;
+ protected Map<InvitationResult, String> invitationResultMap;
+ @Override
+ public void setServletRequest(HttpServletRequest request) {
+ this.request = request;
+ }
+
public void setP(String p) {
this.p = p;
}
@@ -42,10 +64,29 @@
return noteId;
}
+ public void setNoteId(String noteId) {
+ this.noteId = noteId;
+ }
+
public VradiUser getSender() {
+ if (sender == null) {
+ sender = getProxy().restore(VradiUser.class, senderId);
+ }
return sender;
}
+ public void setSender(VradiUser sender) {
+ this.sender = sender;
+ }
+
+ public String getSenderId() {
+ return senderId;
+ }
+
+ public void setSenderId(String senderId) {
+ this.senderId = senderId;
+ }
+
public String getSenderInfo() {
return senderInfo;
}
@@ -58,22 +99,91 @@
return message;
}
- @Override
- public String execute() throws Exception {
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public String getMessageRST() {
+ return messageRST;
+ }
+
+ public Map<InvitationResult, String> getInvitationResultMap() {
+ if (invitationResultMap == null) {
+ invitationResultMap = new LinkedHashMap<InvitationResult, String>();
+ for (InvitationResult invitationResult : InvitationResult.values()) {
+ invitationResultMap.put(invitationResult, invitationResult.getButtonLabel());
+ }
+ }
+ return invitationResultMap;
+ }
+
+ public String getMessageResult() {
+ return messageResult;
+ }
+
+ public void setMessageResult(String messageResult) {
+ this.messageResult = messageResult;
+ }
+
+ public InvitationResult getInvitationResult() {
+ return invitationResult;
+ }
+
+ public void setInvitationResult(InvitationResult invitationResult) {
+ this.invitationResult = invitationResult;
+ }
+
+ public String getTitle() {
+ if (invitationResult == null) {
+ return StringUtils.EMPTY;
+ }
+ return invitationResult.getTitle();
+ }
+
+ public String getContent() {
+ if (invitationResult == null) {
+ return StringUtils.EMPTY;
+ }
+ return invitationResult.getContent();
+ }
+
+ public String getFormNoteSummary() {
+ FormNote formNote = getProxy().restore(FormNote.class, getNoteId());
+ if (formNote != null) {
+ return formNote.getSummary();
+ }
+ return StringUtils.EMPTY;
+ }
+
+ public String decode() throws Exception {
String result = SUCCESS;
WikittyProxy proxy = getProxy();
- String datas = VradiWebHelper.decode(p);
- String[] info = datas.split("\n", 4);
+ String[] info = VradiWebHelper.decodeAndGetInfos(p, 4);
noteId = info[0];
sender = proxy.restore(VradiUser.class, info[1]);
senderInfo = VradiWebHelper.rstTo(JRST.TYPE_HTML_INNER_BODY, sender.getInfo());
String[] partnersTab = info[2].split(",");
partners = proxy.restore(VradiUser.class, Arrays.asList(partnersTab));
- message = VradiWebHelper.rstTo(JRST.TYPE_HTML_INNER_BODY, info[3]);
+ message = info[3];
+ messageRST = VradiWebHelper.rstTo(JRST.TYPE_HTML_INNER_BODY, message);
return result;
}
+
+ public String sendInvitationResult() throws Exception {
+
+ String url = null;
+ if (invitationResult.equals(InvitationResult.ACCEPT)) {
+ url = VradiWebHelper.encodeAndGetUrl(SHOW_RESULT_INVITATION_ACTION, noteId, getUser().getWikittyId(), message, messageResult);
+ }
+ if (this.invitationResult.sendEmail(Collections.singleton(getSender().getLogin()),
+ getUser(), getMessageResult(), getFormNoteSummary(), url)) {
+ return SUCCESS;
+ }
+ return ERROR;
+ }
+
}
Added: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationResultAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationResultAction.java (rev 0)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationResultAction.java 2011-07-15 11:54:49 UTC (rev 122)
@@ -0,0 +1,187 @@
+package org.chorem.vradi.actions;
+
+import com.opensymphony.xwork2.ActionContext;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.struts2.interceptor.ServletRequestAware;
+import org.chorem.vradi.InvitationResult;
+import org.chorem.vradi.VradiWebHelper;
+import org.chorem.vradi.entities.FormNote;
+import org.chorem.vradi.entities.VradiUser;
+import org.nuiton.jrst.JRST;
+import org.nuiton.wikitty.WikittyProxy;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * @author sletellier
+ */
+public class ShowInvitationResultAction extends VradiBaseAction implements ServletRequestAware {
+
+ /** to use log facility, just put in your code: log.info(\"...\"); */
+ static private Log log = LogFactory.getLog(ShowInvitationAction.class);
+
+ static public ShowInvitationResultAction getAction() {
+ return (ShowInvitationResultAction)ActionContext.getContext().get(CONTEXT_ACTION_KEY);
+ }
+
+ protected HttpServletRequest request;
+ protected String p;
+ protected String noteId;
+ protected VradiUser sender;
+ protected String senderId;
+ protected String senderInfo;
+ protected String message;
+ protected String messageRST;
+ protected String messageResult;
+ protected String messageResultRST;
+ protected String messageConfirmResult;
+ protected InvitationResult invitationResult;
+ protected Map<InvitationResult, String> invitationResultMap;
+
+ @Override
+ public void setServletRequest(HttpServletRequest request) {
+ this.request = request;
+ }
+
+ public void setP(String p) {
+ this.p = p;
+ }
+
+ public String getNoteId() {
+ return noteId;
+ }
+
+ public void setNoteId(String noteId) {
+ this.noteId = noteId;
+ }
+
+ public VradiUser getSender() {
+ if (sender == null) {
+ sender = getProxy().restore(VradiUser.class, senderId);
+ }
+ return sender;
+ }
+
+ public void setSender(VradiUser sender) {
+ this.sender = sender;
+ }
+
+ public String getSenderId() {
+ return senderId;
+ }
+
+ public void setSenderId(String senderId) {
+ this.senderId = senderId;
+ }
+
+ public String getSenderInfo() {
+ return senderInfo;
+ }
+
+ public String getMessageConfirmResult() {
+ return messageConfirmResult;
+ }
+
+ public void setMessageConfirmResult(String messageConfirmResult) {
+ this.messageConfirmResult = messageConfirmResult;
+ }
+
+ public Map<InvitationResult, String> getInvitationResultMap() {
+ if (invitationResultMap == null) {
+ invitationResultMap = new LinkedHashMap<InvitationResult, String>();
+ for (InvitationResult invitationResult : InvitationResult.values()) {
+ invitationResultMap.put(invitationResult, invitationResult.getButtonLabel());
+ }
+ }
+ return invitationResultMap;
+ }
+
+ public InvitationResult getInvitationResult() {
+ return invitationResult;
+ }
+
+ public void setInvitationResult(InvitationResult invitationResult) {
+ this.invitationResult = invitationResult;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public String getMessageRST() {
+ return messageRST;
+ }
+
+ public String getMessageResult() {
+ return messageResult;
+ }
+
+ public void setMessageResult(String messageResult) {
+ this.messageResult = messageResult;
+ }
+
+ public String getMessageResultRST() {
+ return messageResultRST;
+ }
+
+ public String getTitle() {
+ if (invitationResult == null) {
+ return StringUtils.EMPTY;
+ }
+ return invitationResult.getConfirmationTitle();
+ }
+
+ public String getContent() {
+ if (invitationResult == null) {
+ return StringUtils.EMPTY;
+ }
+ return invitationResult.getConfirmationContent();
+ }
+
+ public String getFormNoteSummary() {
+ FormNote formNote = getProxy().restore(FormNote.class, getNoteId());
+ if (formNote != null) {
+ return formNote.getSummary();
+ }
+ return StringUtils.EMPTY;
+ }
+
+ public String decode() throws Exception {
+ String result = SUCCESS;
+
+ WikittyProxy proxy = getProxy();
+
+ String[] info = VradiWebHelper.decodeAndGetInfos(p, 4);
+
+ noteId = info[0];
+ sender = proxy.restore(VradiUser.class, info[1]);
+ senderInfo = VradiWebHelper.rstTo(JRST.TYPE_HTML_INNER_BODY, sender.getInfo());
+
+ message = info[2];
+ messageRST = VradiWebHelper.rstTo(JRST.TYPE_HTML_INNER_BODY, info[2]);
+ messageResult = info[3];
+ messageResultRST = VradiWebHelper.rstTo(JRST.TYPE_HTML_INNER_BODY, info[3]);
+
+ return result;
+ }
+
+ public String sendInvitationResultConfirm() throws Exception {
+
+ if (this.invitationResult.sendConfirmEmail(Collections.singleton(getSender().getLogin()),
+ getUser(), getMessage(), getMessageResult(), getMessageConfirmResult(), getFormNoteSummary())) {
+ return SUCCESS;
+ }
+ return ERROR;
+ }
+
+}
Deleted: trunk/vradi-web/src/main/resources/displaytag.properties
===================================================================
--- trunk/vradi-web/src/main/resources/displaytag.properties 2011-07-13 15:27:59 UTC (rev 121)
+++ trunk/vradi-web/src/main/resources/displaytag.properties 2011-07-15 11:54:49 UTC (rev 122)
@@ -1,20 +0,0 @@
-basic.empty.showtable=true
-basic.msg.empty_list=Vide
-basic.msg.empty_list_row=<tr class="empty"><td colspan="{0}">Vide</td></tr></tr>
-
-sort.amount=list
-
-paging.banner.placement=bottom
-paging.banner.item_name=\u00e9l\u00e9ment
-paging.banner.items_name=\u00e9l\u00e9ments
-paging.banner.no_items_found=<span class="pagebanner">Aucun {0} trouv\u00e9.</span>
-paging.banner.one_item_found=<span class="pagebanner">Un seul {0} trouv\u00e9.</span>
-paging.banner.all_items_found=<span class="pagebanner">{0} {1} trouv\u00e9s, tout afficher {2}.</span>
-paging.banner.some_items_found=<span class="pagebanner">{0} {1} trouv\u00e9s, affich\u00e9 de {2} \u00e0 {3}.</span>
-paging.banner.full=<span class="pagelinks">[<a href="{1}">Premier</a>/<a href="{2}">Pr\u00e9c\u00e9dent</a>]{0} [<a href="{3}">Suivant</a>/<a href="{4}">Dernier</a>]</span>
-paging.banner.first=<span class="pagelinks">[Permier/Pr\u00e9c\u00e9dent] {0} [<a href="{3}">Suivant</a>/<a href="{4}">Dernier</a>]</span>
-paging.banner.last=<span class="pagelinks">[<a href="{1}">Premier</a>/<a href="{2}">Pr\u00e9c\u00e9dent</a>]{0} [Suivant/Dernier]</span>
-paging.banner.page.link=<a href="{1}" title="Aller \u00e0 {0}">{0}</a>
-
-pagination.sort.asc.value=ascending
-pagination.sort.desc.value=descending
Modified: trunk/vradi-web/src/main/resources/i18n/vradi-web_en_GB.properties
===================================================================
--- trunk/vradi-web/src/main/resources/i18n/vradi-web_en_GB.properties 2011-07-13 15:27:59 UTC (rev 121)
+++ trunk/vradi-web/src/main/resources/i18n/vradi-web_en_GB.properties 2011-07-15 11:54:49 UTC (rev 122)
@@ -84,11 +84,12 @@
vradi.sendInvitation.count=Number of sended requests
vradi.showInvitation.title=View request
vradi.showInvitation.from=Request from \:
+vradi.invitationResult.from=Request from \:
vradi.showInvitation.otherPartners=Other partners are \:
vradi.showInvitation.requestMsg=Request message \:
vradi.showInvitation.accept=Accept
vradi.showInvitation.reject=Reject
-vradi.showInvitation.noReceived=Do not receved other request from this person
+vradi.showInvitation.noReceivedMore=Do not receved other request from this person
vradi.noEmail=No email
vradi.userPreference=User preferences
vradi.userPreference.form=Form
Modified: trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties
===================================================================
--- trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties 2011-07-13 15:27:59 UTC (rev 121)
+++ trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties 2011-07-15 11:54:49 UTC (rev 122)
@@ -36,6 +36,30 @@
vradi.formNote.title=Edition de la réponse
vradi.formNoteList.title=Réponses du formulaire
vradi.formView.title=Visualisation d'un formulaire
+vradi.invitation.accept=L'utilisateur %1$s accèpte de travailler avec vous sur %3$s parce que \: %2$s\n\nPour répondre à cette demande veuillez aller sur la page\:'%4$s'\n"\n\nCordialement.
+vradi.invitation.accept.button=Accepter
+vradi.invitation.accept.confirmation.content=Text explicatif \:
+vradi.invitation.accept.confirmation.content.title=Accepter la confirmation de l'invitation
+vradi.invitation.accept.content=Text explicatif \:
+vradi.invitation.accept.content.title=Accepter l'invitation
+vradi.invitation.accept.title=[Vradi web] Une demande de partenaria à été accèpté
+vradi.invitation.nomore.button=Rejeter et ne plus être solicité par cet utilisateur
+vradi.invitation.nomore.confirmation.content=Text explicatif \:
+vradi.invitation.nomore.confirmation.content.title=Rejeter la confirmation de l'invitation et ne plus être solicité par cet utilisateur
+vradi.invitation.nomore.content=Text explicatif \:
+vradi.invitation.nomore.content.title=Rejeter l'invitation et ne plus être solicité par cet utilisateur
+vradi.invitation.reject=L'utilisateur %1$s à rejeté la demande de partenaria sur le projet %4$s avec le message \n\n %2$s \n\n parce que \: %3$s\n"\n\nCordialement.
+vradi.invitation.reject.button=Rejeter
+vradi.invitation.reject.confirmation.content=Text explicatif \:
+vradi.invitation.reject.confirmation.content.title=Rejeter la confirmation de l'invitation
+vradi.invitation.reject.content=Text explicatif \:
+vradi.invitation.reject.content.title=Rejeter l'invitation
+vradi.invitation.reject.title=[Vradi web] Une demande de partenaria à été rejeté
+vradi.invitation.result.accept=L'utilisateur %1$s à accepté votre partenaria sur le projet %4$s avec le message \n\n %2$s \n\n vous aviez répondu : \n\n : %3$s \n\n parce que \: %4$s\n"\n\nCordialement.
+vradi.invitation.result.accept.title=[Vradi web] Une demande de partenaria à été accèpté
+vradi.invitation.result.reject=L'utilisateur %1$s à rejeté votre partenaria sur le projet %4$s avec le message \n\n %2$s \n\n vous aviez répondu : \n\n : %3$s \n\n parce que \: %4$s\n"\n\nCordialement.
+vradi.invitation.result.reject.title=[Vradi web] Une demande de partenaria à été rejeté
+vradi.invitationResult.from=L'invitation provient de \:
vradi.login.email=Email
vradi.login.password=Mot de passe
vradi.login.repeatPassword=Confiramtion
@@ -81,11 +105,15 @@
vradi.show=Afficher
vradi.showInvitation.accept=Accepter
vradi.showInvitation.from=L'invitation provient de \:
-vradi.showInvitation.noReceived=Ne plus recevoir d'invitation de cette personne
+vradi.showInvitation.noReceivedMore=Ne plus recevoir d'invitation de cette personne
vradi.showInvitation.otherPartners=Les autres partenaires sur le projet sont \:
vradi.showInvitation.reject=Rejeter
vradi.showInvitation.requestMsg=Le message de l'invitation est \:
vradi.showInvitation.title=Visualisation de l'invitation
+vradi.showInvitationConfirm.from=La confirmation de votre invitation provient de \:
+vradi.showInvitationConfirm.requestConfirmMsg=Voici le message de confirmation \:
+vradi.showInvitationConfirm.requestMsg=L'invitation avait pour message \:
+vradi.showInvitationConfirm.title=Confirmation suite à l'acceptation de votre demande de partonariat
vradi.summary=Résumé
vradi.template.request=Bonjour,\n\nCeci est une invitation pour participer à la creation commune d'information sur un formulaire Vradi.\n\nCette invitation provient de\:\n%4$s\n\nAvec le message\:\n%2$s\n\nPour répondre à cette demande veuillez aller sur la page\:'%3$s'\n"\n\nCordialement.
vradi.template.request.title=[Vradi web] Vradi invitation
Modified: trunk/vradi-web/src/main/resources/struts.xml
===================================================================
--- trunk/vradi-web/src/main/resources/struts.xml 2011-07-13 15:27:59 UTC (rev 121)
+++ trunk/vradi-web/src/main/resources/struts.xml 2011-07-15 11:54:49 UTC (rev 122)
@@ -167,6 +167,20 @@
</action>
<!--
+ | Saved queries panel
+ +-->
+ <action name="invitationResultButtons" class="org.chorem.vradi.actions.ShowInvitationAction">
+ <result name="success" type="json"/>
+ </action>
+
+ <!--
+ | Saved queries panel
+ +-->
+ <action name="invitationResultConfirmButtons" class="org.chorem.vradi.actions.ShowInvitationResultAction">
+ <result name="success" type="json"/>
+ </action>
+
+ <!--
| Affiche le détail du formulaire
+-->
<action name="formView/*" class="org.chorem.vradi.actions.FormViewAction">
@@ -212,9 +226,27 @@
<!--
| Affiche l'invitation grace au information de l'url (param p)
+-->
- <action name="showInvitation" class="org.chorem.vradi.actions.ShowInvitationAction">
+ <action name="showInvitation" method="decode" class="org.chorem.vradi.actions.ShowInvitationAction">
<result>/WEB-INF/jsp/showInvitation.jsp</result>
</action>
+ <!--
+ | Send invitation result
+ +-->
+ <action name="sendInvitationResult" method="sendInvitationResult" class="org.chorem.vradi.actions.ShowInvitationAction">
+ <result type="redirect">searchView.action</result>
+ </action>
+ <!--
+ | Affiche l'invitation grace au information de l'url (param p)
+ +-->
+ <action name="showInvitationResult" method="decode" class="org.chorem.vradi.actions.ShowInvitationResultAction">
+ <result>/WEB-INF/jsp/showInvitationResult.jsp</result>
+ </action>
+ <!--
+ | Send invitation result confirmation
+ +-->
+ <action name="sendInvitationResultConfirm" method="sendInvitationResultConfirm" class="org.chorem.vradi.actions.ShowInvitationResultAction">
+ <result type="redirect">searchView.action</result>
+ </action>
</package>
<!--
@@ -288,6 +320,22 @@
<result>/WEB-INF/jsp/savedQueries.jsp</result>
</action>
+ <!--
+ | Send invitation result
+ +-->
+ <action name="invitationResult" class="org.chorem.vradi.actions.ShowInvitationAction">
+ <result name="input">/WEB-INF/jsp/invitationResult.jsp</result>
+ <result>/WEB-INF/jsp/invitationResult.jsp</result>
+ </action>
+
+ <!--
+ | Send invitation result confirmation
+ +-->
+ <action name="invitationResultConfirm" class="org.chorem.vradi.actions.ShowInvitationResultAction">
+ <result name="input">/WEB-INF/jsp/invitationResult.jsp</result>
+ <result>/WEB-INF/jsp/invitationResultConfirm.jsp</result>
+ </action>
+
</package>
<!--
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNote.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNote.jsp 2011-07-13 15:27:59 UTC (rev 121)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNote.jsp 2011-07-15 11:54:49 UTC (rev 122)
@@ -162,15 +162,14 @@
<s:text name="vradi.add"/>
</s:set>
- <sj:tab id="tabFiles" target="files" label="%{filesText}"/>
+ <sj:tab id="tabFiles" target="updateFilesPanel" label="%{filesText}"/>
<sj:tab id="tabAddFiles" target="addFiles" label="%{addText}"/>
- <div id="files">
- <sj:div href="/fragment/attachmentList/%{localNoteId}.action"
- indicator="indicator-files"
- listenTopics="updateFiles">
- <img id="indicator-files" src="/img/indicator.gif" alt="Loading..." style="display:none"/>
- </sj:div>
- </div>
+ <sj:div id="updateFilesPanel"
+ href="/fragment/attachmentList/%{localNoteId}.action"
+ indicator="indicator-files"
+ listenTopics="updateFiles">
+ <img id="indicator-files" src="/img/indicator.gif" alt="Loading..." style="display:none"/>
+ </sj:div>
<div id="addFiles">
<s:form id="addFilesForm" namespace="/fragment" action="attachmentAdd" method="POST" enctype="multipart/form-data">
<%--<s:form id="addFilesForm" action="attachmentAdd" method="POST" enctype="multipart/form-data">--%>
@@ -180,11 +179,11 @@
<s:file name="content" key="vradi.addfiles.content" required="true"/>
<sj:submit id="addFilesSubmit"
value="%{saveText}"
- targets="result" onSuccessTopics="updateFiles"
- indicator="indicator-addFiles"
+ targets="result"
+ indicator="indicator-result"
+ onSuccessTopics="updateFiles"
button="true" buttonIcon="ui-icon-gear"/>
</s:form>
- <img id="indicator-addFiles" src="/img/indicator.gif" alt="Loading..." style="display:none"/>
</div>
</sj:tabbedpanel>
</div>
Added: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResult.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResult.jsp (rev 0)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResult.jsp 2011-07-15 11:54:49 UTC (rev 122)
@@ -0,0 +1,28 @@
+<%@page import="com.opensymphony.xwork2.ActionContext"%>
+<%@ page import="org.chorem.vradi.actions.ShowInvitationAction" %>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+
+<%@taglib prefix="s" uri="/struts-tags"%>
+
+<%
+ShowInvitationAction action = ShowInvitationAction.getAction();
+ActionContext.getContext().put("localNoteId", action.getNoteId());
+ActionContext.getContext().put("localSenderId", action.getSenderId());
+ActionContext.getContext().put("invitationResult", action.getInvitationResult());
+ActionContext.getContext().put("message", action.getMessage());
+%>
+
+<h1><%=action.getTitle()%></h1>
+
+<div>
+ <p><%=action.getContent()%></p>
+</div>
+
+<s:form action="sendInvitationResult" theme="simple">
+ <s:hidden name="noteId" value="%{localNoteId}"/>
+ <s:hidden name="senderId" value="%{localSenderId}"/>
+ <s:hidden name="invitationResult" value="%{invitationResult}"/>
+ <s:hidden name="message" value="%{message}"/>
+ <s:textarea name="messageResult"/>
+ <s:submit id="acceptButton" key="vradi.send"/>
+</s:form>
\ No newline at end of file
Added: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResultConfirm.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResultConfirm.jsp (rev 0)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResultConfirm.jsp 2011-07-15 11:54:49 UTC (rev 122)
@@ -0,0 +1,30 @@
+<%@page import="com.opensymphony.xwork2.ActionContext"%>
+<%@ page import="org.chorem.vradi.actions.ShowInvitationResultAction" %>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+
+<%@taglib prefix="s" uri="/struts-tags"%>
+
+<%
+ShowInvitationResultAction action = ShowInvitationResultAction.getAction();
+ActionContext.getContext().put("localNoteId", action.getNoteId());
+ActionContext.getContext().put("localSenderId", action.getSenderId());
+ActionContext.getContext().put("invitationResult", action.getInvitationResult());
+ActionContext.getContext().put("message", action.getMessage());
+ActionContext.getContext().put("messageResult", action.getMessageResult());
+%>
+
+<h1><%=action.getTitle()%></h1>
+
+<div>
+ <p><%=action.getContent()%></p>
+</div>
+
+<s:form action="sendInvitationResultConfirm" theme="simple">
+ <s:hidden name="noteId" value="%{localNoteId}"/>
+ <s:hidden name="senderId" value="%{localSenderId}"/>
+ <s:hidden name="invitationResult" value="%{invitationResult}"/>
+ <s:hidden name="message" value="%{message}"/>
+ <s:hidden name="messageResult" value="%{messageResult}"/>
+ <s:textarea name="messageConfirmResult"/>
+ <s:submit id="acceptButton" key="vradi.send"/>
+</s:form>
\ No newline at end of file
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/seekPartners.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/seekPartners.jsp 2011-07-13 15:27:59 UTC (rev 121)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/seekPartners.jsp 2011-07-15 11:54:49 UTC (rev 122)
@@ -30,7 +30,7 @@
<body>
<h1><s:text name="vradi.seekingPartners.title" /></h1>
- <s:form id="seekingPartnersForm" action="/sendInvitation.action" method="POST">
+ <s:form id="seekingPartnersForm" action="sendInvitation" method="POST">
<s:hidden name="noteId" value="%{localNoteId}"/>
<s:checkbox name="formReceiver" key="vradi.seekingPartners.formReceiver"/>
<s:checkbox name="seeker" key="vradi.seekingPartners.seeker"/>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitation.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitation.jsp 2011-07-13 15:27:59 UTC (rev 121)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitation.jsp 2011-07-15 11:54:49 UTC (rev 122)
@@ -15,6 +15,7 @@
ShowInvitationAction action = ShowInvitationAction.getAction();
ActionContext.getContext().put("localNoteId", action.getNoteId());
ActionContext.getContext().put("localSenderId", action.getSender().getWikittyId());
+ActionContext.getContext().put("message", action.getMessage());
%>
<!DOCTYPE html>
@@ -53,29 +54,39 @@
</div>
</div>
-
<div>
<s:text name="vradi.showInvitation.requestMsg"/>
- <p><%=action.getMessage()%></p>
+ <p><%=action.getMessageRST()%></p>
</div>
<div>
- <sj:a id="acceptButton" href="/acceptInvitation/%{localNoteId}.action"
- button="true" buttonIcon="ui-icon-gear">
- <s:text name="vradi.showInvitation.accept"/>
- </sj:a>
+ <s:form id="form" namespace="/fragment" action="invitationResult">
+ <s:hidden name="noteId" value="%{localNoteId}"/>
+ <s:hidden name="senderId" value="%{localSenderId}"/>
+ <s:hidden name="message" value="%{message}"/>
+ <s:url id="invitationResultUrl" action="invitationResultButtons"/>
+ <sj:radio
+ href="%{invitationResultUrl}"
+ id="invitationResultSet"
+ list="invitationResultMap"
+ name="invitationResult"
+ onChangeTopics="updateInvitationResult"
+ />
+ <sj:submit
+ targets="invitationResultForms"
+ value="Submit"
+ indicator="indicator-invitationResultForms"
+ button="true"
+ listenTopics="updateInvitationResult"
+ cssClass="hidden"
+ />
+ </s:form>
- <sj:a id="rejectButton" href="/rejectInvitation/%{localNoteId}.action"
- button="true" buttonIcon="ui-icon-gear">
- <s:text name="vradi.showInvitation.reject"/>
- </sj:a>
+ </div>
+ <div id="invitationResultForms">
+ <img id="indicator-invitationResultForms" src="/img/indicator.gif" alt="Loading..." style="display:none"/>
+ </div>
- <sj:a id="noReceivedButton" href="/noReceivedInvitation/%{localSenderId}.action"
- button="true" buttonIcon="ui-icon-gear">
- <s:text name="vradi.showInvitation.noReceived"/>
- </sj:a>
-
- </div>
</body>
</html>
Added: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitationResult.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitationResult.jsp (rev 0)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitationResult.jsp 2011-07-15 11:54:49 UTC (rev 122)
@@ -0,0 +1,82 @@
+<%--
+ Document : showInvitation
+ Created on : 1 juin 2011, 01:42:32
+ Author : poussin
+--%>
+
+<%@page import="com.opensymphony.xwork2.ActionContext"%>
+<%@ page import="org.chorem.vradi.actions.ShowInvitationResultAction" %>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+
+<%@taglib prefix="s" uri="/struts-tags"%>
+<%@taglib prefix="sj" uri="/struts-jquery-tags"%>
+
+<%
+ShowInvitationResultAction action = ShowInvitationResultAction.getAction();
+ActionContext.getContext().put("localNoteId", action.getNoteId());
+ActionContext.getContext().put("localSenderId", action.getSender().getWikittyId());
+ActionContext.getContext().put("message", action.getMessage());
+ActionContext.getContext().put("messageResult", action.getMessageResult());
+%>
+
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title><s:text name="vradi.showInvitationConfirm.title" /></title>
+ <s:head/>
+ <sj:head jquerytheme="sunny"/>
+ </head>
+ <body>
+ <h1><s:text name="vradi.showInvitationConfirm.title" /></h1>
+
+ <div>
+ <s:text name="vradi.showInvitationConfirm.from"/><%=action.getSender().getLogin()%>
+ <p>
+ <%=action.getSenderInfo()%>
+ </p>
+ </div>
+
+ <div>
+ <s:text name="vradi.showInvitationConfirm.requestMsg"/>
+
+ <p><%=action.getMessageRST()%></p>
+ </div>
+
+ <div>
+ <s:text name="vradi.showInvitationConfirm.requestConfirmMsg"/>
+
+ <p><%=action.getMessageResultRST()%></p>
+ </div>
+
+ <div>
+ <s:form id="form" namespace="/fragment" action="invitationResultConfirm">
+ <s:hidden name="noteId" value="%{localNoteId}"/>
+ <s:hidden name="senderId" value="%{localSenderId}"/>
+ <s:hidden name="message" value="%{message}"/>
+ <s:hidden name="messageResult" value="%{messageResult}"/>
+ <s:url id="invitationResultConfirmUrl" action="invitationResultConfirmButtons"/>
+ <sj:radio
+ href="%{invitationResultConfirmUrl}"
+ id="invitationResultSet"
+ list="invitationResultMap"
+ name="invitationResult"
+ onChangeTopics="updateInvitationConfirmResult"
+ />
+ <sj:submit
+ targets="invitationResultConfirmForms"
+ value="Submit"
+ indicator="indicator-invitationResultConfirmForms"
+ button="true"
+ listenTopics="updateInvitationConfirmResult"
+ cssClass="hidden"
+ />
+ </s:form>
+
+ </div>
+ <div id="invitationResultConfirmForms">
+ <img id="indicator-invitationResultConfirmForms" src="/img/indicator.gif" alt="Loading..." style="display:none"/>
+ </div>
+
+ </body>
+</html>
1
0
Author: kcardineaud
Date: 2011-07-13 17:27:59 +0200 (Wed, 13 Jul 2011)
New Revision: 121
Url: http://chorem.org/repositories/revision/vradi/121
Log:
Add display:none style to result div
Modified:
trunk/vradi-web/src/main/webapp/css/style.css
Modified: trunk/vradi-web/src/main/webapp/css/style.css
===================================================================
--- trunk/vradi-web/src/main/webapp/css/style.css 2011-07-13 14:35:38 UTC (rev 120)
+++ trunk/vradi-web/src/main/webapp/css/style.css 2011-07-13 15:27:59 UTC (rev 121)
@@ -6,10 +6,6 @@
}
-
-
-
-
#contentPanel th {
text-align: left;
}
@@ -67,6 +63,10 @@
width:100%;
}
+#result {
+display:none;
+}
+
#queryNamePanel {
text-align: right;
width: 62%;
1
0
r120 - in trunk/vradi-web/src/main/webapp: WEB-INF/jsp css
by kcardineaud@users.chorem.org 13 Jul '11
by kcardineaud@users.chorem.org 13 Jul '11
13 Jul '11
Author: kcardineaud
Date: 2011-07-13 16:35:38 +0200 (Wed, 13 Jul 2011)
New Revision: 120
Url: http://chorem.org/repositories/revision/vradi/120
Log:
modify search page style and fix a position problem with footnote
Modified:
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/resultGrid.jsp
trunk/vradi-web/src/main/webapp/css/style.css
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/resultGrid.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/resultGrid.jsp 2011-07-11 15:00:08 UTC (rev 119)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/resultGrid.jsp 2011-07-13 14:35:38 UTC (rev 120)
@@ -52,7 +52,7 @@
formatter="date"
formatoptions="{newformat : 'd/m/Y H:i', srcformat : 'Y-m-d H:i:s'}"
sortable="true"
- width="30"/>
+ width="25"/>
<sjg:gridColumn name="objet"
index="%{fqObjet}"
@@ -62,6 +62,6 @@
<sjg:gridColumn name="wikittyId"
title="%{actionText}"
formatter="formatLink"
- width="10"/>
+ width="15"/>
</sjg:grid>
\ No newline at end of file
Modified: trunk/vradi-web/src/main/webapp/css/style.css
===================================================================
--- trunk/vradi-web/src/main/webapp/css/style.css 2011-07-11 15:00:08 UTC (rev 119)
+++ trunk/vradi-web/src/main/webapp/css/style.css 2011-07-13 14:35:38 UTC (rev 120)
@@ -1,13 +1,19 @@
/* Layout */
+
+#page-home {
+ display:block;
+}
+
+
+
+
+
+
#contentPanel th {
text-align: left;
}
-div.left{
- float:left;
-}
-
#doUpdateFormSubmit {
display: none;
}
@@ -24,10 +30,6 @@
float:right;
}
-.left {
- float:left;
-}
-
.button {
margin-top:20px;
height:31px;
@@ -39,11 +41,18 @@
}
#thesaurusPanel {
- width: 20%;
+ margin : 0;
+ float :left;
+ width: 300px;
}
+#contentPanel {
+ margin : 0 0 0 320px;
+ width:auto;
+}
+
#wrap {
- height: 100%;
+
}
#savedQueriesPanel {
@@ -51,10 +60,12 @@
height: 10px;
}
-.contentPanel {
- width: 80%;
- float:right;
+#footer {
+ clear:both;
}
+#resultPanel {
+ width:100%;
+}
#queryNamePanel {
text-align: right;
@@ -66,12 +77,10 @@
float:left;
}
-#thesaurusForm {
- height: 5%;
-}
#searchActionPanel {
float:right;
+ width:22%;
}
#searchForm {
1
0
r119 - in trunk: vradi-services/src/main/java/org/chorem/vradi/services vradi-web/src/main/java/org/chorem/vradi vradi-web/src/main/java/org/chorem/vradi/actions vradi-web/src/main/resources vradi-web/src/main/resources/i18n vradi-web/src/main/webapp/WEB-INF/jsp
by sletellier@users.chorem.org 11 Jul '11
by sletellier@users.chorem.org 11 Jul '11
11 Jul '11
Author: sletellier
Date: 2011-07-11 17:00:08 +0200 (Mon, 11 Jul 2011)
New Revision: 119
Url: http://chorem.org/repositories/revision/vradi/119
Log:
- Fix formNote upload file
- Fix formNote list attached files
- Fix formNote attachedFile deletion
- Reformat struts.xml
- Format dates
Modified:
trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiStorageServiceImpl.java
trunk/vradi-web/src/main/java/org/chorem/vradi/VradiWebHelper.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/AttachmentAddAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/VradiBaseAction.java
trunk/vradi-web/src/main/resources/i18n/vradi-web_en_GB.properties
trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties
trunk/vradi-web/src/main/resources/struts.xml
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/attachmentList.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNote.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNoteList.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/userPreference.jsp
Modified: trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiStorageServiceImpl.java
===================================================================
--- trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiStorageServiceImpl.java 2011-07-11 08:47:49 UTC (rev 118)
+++ trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiStorageServiceImpl.java 2011-07-11 15:00:08 UTC (rev 119)
@@ -438,7 +438,6 @@
@Override
public String sendMessages(String sessionId) throws VradiException {
-
return mailingManager.sendMessages(sessionId);
}
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/VradiWebHelper.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/VradiWebHelper.java 2011-07-11 08:47:49 UTC (rev 118)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/VradiWebHelper.java 2011-07-11 15:00:08 UTC (rev 119)
@@ -3,8 +3,11 @@
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
+import java.text.SimpleDateFormat;
+import java.util.Date;
import java.util.Set;
+import freemarker.template.SimpleDate;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
@@ -31,6 +34,12 @@
return txt.replaceAll("(?s)<script.*?>.*</script>", "");
}
+ public static String formatDate(Date date) {
+ SimpleDateFormat formater = new SimpleDateFormat("dd/MM/yyyy HH:mm");
+ String format = formater.format(date);
+ return format;
+ }
+
/**
* Compresse en gzip la string passee en parametre, la passe en base64
* et l'encode pour passer comme parametre d'une url
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/AttachmentAddAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/AttachmentAddAction.java 2011-07-11 08:47:49 UTC (rev 118)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/AttachmentAddAction.java 2011-07-11 15:00:08 UTC (rev 119)
@@ -1,8 +1,8 @@
package org.chorem.vradi.actions;
import java.io.File;
-import java.io.FileInputStream;
import java.util.Date;
+
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -27,7 +27,7 @@
protected String attachmentId;
protected String name;
protected String description;
- protected File file;
+ protected File content;
protected String contentType;
protected String filename;
@@ -38,19 +38,27 @@
public String getTargetId() {
return targetId;
}
-
+
public void setName(String name) {
this.name = name;
}
+ public String getName() {
+ return name;
+ }
+
public void setDescription(String description) {
this.description = description;
}
- public void setFile(File file) {
- this.file = file;
+ public String getDescription() {
+ return description;
}
+ public void setContent(File content) {
+ this.content = content;
+ }
+
public void setFilename(String filename) {
this.filename = filename;
}
@@ -72,8 +80,8 @@
attachment = proxy.restore(Attachment.class, attachmentId);
}
if (attachment != null) {
- if (file != null) {
- attachment.setContent(FileUtil.fileToByte(file));
+ if (content != null) {
+ attachment.setContent(FileUtil.fileToByte(content));
attachment.setMimetype(contentType);
attachment.setName(filename);
}
@@ -87,9 +95,8 @@
}
// force la creation de la liste des attachments
- super.execute();
+ result = super.execute();
return result;
}
-
}
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/VradiBaseAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/VradiBaseAction.java 2011-07-11 08:47:49 UTC (rev 118)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/VradiBaseAction.java 2011-07-11 15:00:08 UTC (rev 119)
@@ -45,6 +45,11 @@
protected Map<String, Object> session;
+ @Override
+ public void setSession(Map<String, Object> session) {
+ this.session = session;
+ }
+
public VradiSession getVradiSession() {
VradiSession result = VradiSession.getVradiSession(session);
return result;
@@ -72,11 +77,6 @@
}
@Override
- public void setSession(Map<String, Object> session) {
- this.session = session;
- }
-
- @Override
public String getText(String aTextName) {
String value = super.getText(aTextName);
return getSafeText(aTextName, value);
Modified: trunk/vradi-web/src/main/resources/i18n/vradi-web_en_GB.properties
===================================================================
--- trunk/vradi-web/src/main/resources/i18n/vradi-web_en_GB.properties 2011-07-11 08:47:49 UTC (rev 118)
+++ trunk/vradi-web/src/main/resources/i18n/vradi-web_en_GB.properties 2011-07-11 15:00:08 UTC (rev 119)
@@ -97,4 +97,7 @@
vradi.userPreference.nosend=No send
vradi.userPreference.title=User preferences
vradi.userPreference.note.open=Opened notes
-vradi.userPreference.note.close=Closed notes
\ No newline at end of file
+vradi.userPreference.note.close=Closed notes
+vradi.attachment.update=Update
+vradi.attachment.history=History
+vradi.attachment.delete=Delete
\ No newline at end of file
Modified: trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties
===================================================================
--- trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties 2011-07-11 08:47:49 UTC (rev 118)
+++ trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties 2011-07-11 15:00:08 UTC (rev 119)
@@ -5,6 +5,9 @@
vradi.addfiles.content=Fichier à ajouter
vradi.addfiles.description=Descrition du fichier
vradi.addfiles.name=Nom du fichier
+vradi.attachment.delete=Suppression
+vradi.attachment.history=Historique
+vradi.attachment.update=Mettre à jour
vradi.authentification.error=Erreur lors de l'authentification
vradi.config.configFileName.description=Fichier de configuration de Vradi web
vradi.config.database.version.description=Version de la base de donnée
Modified: trunk/vradi-web/src/main/resources/struts.xml
===================================================================
--- trunk/vradi-web/src/main/resources/struts.xml 2011-07-11 08:47:49 UTC (rev 118)
+++ trunk/vradi-web/src/main/resources/struts.xml 2011-07-11 15:00:08 UTC (rev 119)
@@ -23,8 +23,8 @@
<result-type name="json" class="org.apache.struts2.json.JSONResult"/>
<!-- FIXME sletellier 20110708 : in this case, gridModel is not serialized :(, try to find a better way-->
<!--<result-type name="tableModel-json" class="org.apache.struts2.json.JSONResult">-->
- <!--<param name="ignoreHierarchy">false</param>-->
- <!--<param name="includeProperties">gridModel,rows,page,sord,sidx,searchField,searchString,searchOper,total,records</param>-->
+ <!--<param name="ignoreHierarchy">false</param>-->
+ <!--<param name="includeProperties">gridModel,rows,page,sord,sidx,searchField,searchString,searchOper,total,records</param>-->
<!--</result-type>-->
<result-type name="tableModel-json" class="org.apache.struts2.json.JSONResult">
<param name="ignoreHierarchy">false</param>
@@ -33,8 +33,8 @@
<param name="excludeProperties">formPagedResult,vradiSession,user,proxy,dataService,config,session,text,safeText,actionErrors,actionMessages,errorMessages,errors,fieldErrors,locale,texts,textProvider,container</param>
</result-type>
<result-type name="wikitty-json" class="org.apache.struts2.json.JSONResult">
- <param name="includeProperties">id,extensionNames\[\d+\],fieldValue\..*\..*</param>
- <param name="root">wikitty</param>
+ <param name="includeProperties">id,extensionNames\[\d+\],fieldValue\..*\..*</param>
+ <param name="root">wikitty</param>
</result-type>
</result-types>
<interceptors>
@@ -43,9 +43,9 @@
<!-- display errors in logger -->
<interceptor-ref name="exception">
- <param name="logEnabled">true</param>
- <param name="logCategory">org.chorem.vradi</param>
- <param name="logLevel">ERROR</param>
+ <param name="logEnabled">true</param>
+ <param name="logCategory">org.chorem.vradi</param>
+ <param name="logLevel">ERROR</param>
</interceptor-ref>
<interceptor-ref name="defaultStack"/>
<interceptor-ref name="json">
@@ -170,7 +170,7 @@
| Affiche le détail du formulaire
+-->
<action name="formView/*" class="org.chorem.vradi.actions.FormViewAction">
- <param name="formId">{1}</param>
+ <param name="formId">{1}</param>
<result>/WEB-INF/jsp/formView.jsp</result>
</action>
@@ -179,28 +179,28 @@
| Permet de creer une nouvelle note
+-->
<action name="formNoteList/*" class="org.chorem.vradi.actions.FormNoteListAction">
- <param name="formId">{1}</param>
+ <param name="formId">{1}</param>
<result>/WEB-INF/jsp/formNoteList.jsp</result>
</action>
<!--
| Affiche la note demande, si l'id n'existe pas une nouvelle note est creee
+-->
<action name="formNote/*" class="org.chorem.vradi.actions.FormNoteAction">
- <param name="formNoteId">{1}</param>
+ <param name="formNoteId">{1}</param>
<result>/WEB-INF/jsp/formNote.jsp</result>
</action>
<!--
| Affiche la page de preference de l'utilisateur
+-->
<action name="userPreference/*" class="org.chorem.vradi.actions.RestoreUserAction">
- <param name="userId">{1}</param>
+ <param name="userId">{1}</param>
<result>/WEB-INF/jsp/userPreference.jsp</result>
</action>
<!--
| Affiche la page de recherche de partenaire
+-->
<action name="seekPartners/*" class="org.chorem.vradi.actions.SeekPartnersAction">
- <param name="noteId">{1}</param>
+ <param name="noteId">{1}</param>
<result>/WEB-INF/jsp/seekPartners.jsp</result>
</action>
<!--
@@ -226,38 +226,39 @@
| genere la liste de attachment associe a l'id passer par le parametre targetId
+-->
<action name="attachmentAdd" class="org.chorem.vradi.actions.AttachmentAddAction">
- <result>/WEB-INF/jsp/attachmentList.jsp</result>
+ <result name="input">/WEB-INF/jsp/attachmentList.jsp</result>
+ <result>/WEB-INF/jsp/attachmentList.jsp</result>
</action>
<!--
| genere la liste de attachment associe a l'id passer par le parametre targetId
+-->
<action name="attachmentList/*" class="org.chorem.vradi.actions.AttachmentListAction">
- <param name="targetId">{1}</param>
- <result>/WEB-INF/jsp/attachmentList.jsp</result>
+ <param name="targetId">{1}</param>
+ <result>/WEB-INF/jsp/attachmentList.jsp</result>
</action>
<!--
| genere la liste de attachment associe a l'id passer par le parametre targetId
+-->
<action name="userInfo" class="org.chorem.vradi.actions.RestoreUserAction">
- <result>/WEB-INF/jsp/userInfo.jsp</result>
+ <result>/WEB-INF/jsp/userInfo.jsp</result>
</action>
<!--
| genere un thesaurus filtre
+-->
- <action name="thesaurusFilter" class="org.chorem.vradi.actions.ThesaurusAction" method="filter">
- <result>/WEB-INF/jsp/thesaurusFilter.jsp</result>
+ <action name="thesaurusFilter" method="filter" class="org.chorem.vradi.actions.ThesaurusAction">
+ <result>/WEB-INF/jsp/thesaurusFilter.jsp</result>
</action>
<!--
| genere le formulaire de recherche
+-->
<action name="refreshForm" method="refreshForm" class="org.chorem.vradi.actions.SearchAction">
- <result>/WEB-INF/jsp/empty.jsp</result>
+ <result>/WEB-INF/jsp/empty.jsp</result>
</action>
<!--
| genere le formulaire de recherche
+-->
<action name="searchPanel" method="refreshForm" class="org.chorem.vradi.actions.SearchAction">
- <result>/WEB-INF/jsp/searchPanel.jsp</result>
+ <result>/WEB-INF/jsp/searchPanel.jsp</result>
</action>
<!--
| Search
@@ -277,7 +278,7 @@
| genere la grille des resultats
+-->
<action name="search" class="org.chorem.vradi.actions.SearchAction">
- <result>/WEB-INF/jsp/resultGrid.jsp</result>
+ <result>/WEB-INF/jsp/resultGrid.jsp</result>
</action>
<!--
@@ -298,42 +299,43 @@
| parametre 'rst'
+-->
<action name="raw/*/*" class="org.chorem.vradi.actions.RawAction">
- <param name="id">{1}</param>
- <param name="fqField">{2}</param>
- <param name="includes">Attachment\.content</param>
- <result type="stream">
- <param name="contentDisposition">filename="${filename}"</param>
- <param name="contentType">${mimeType}</param>
- <param name="inputName">content</param>
- </result>
+ <param name="id">{1}</param>
+ <param name="fqField">{2}</param>
+ <param name="includes">Attachment\.content</param>
+ <result type="stream">
+ <param name="contentDisposition">filename="${filename}"</param>
+ <param name="contentType">${mimeType}</param>
+ <param name="inputName">content</param>
+ </result>
</action>
<!--
| Essai de generer du HTML a partir d'un champs d'un objet ou du
| parametre 'rst'
+-->
<action name="rst" class="org.chorem.vradi.actions.RSTAction">
- <param name="includes">FormNote\.summary,FormNote\.content,VradiUser\.info</param>
- <result type="stream">
- <param name="contentType">${mimeType}</param>
- <param name="inputName">rstResult</param>
- </result>
+ <param name="includes">FormNote\.summary,FormNote\.content,VradiUser\.info</param>
+ <result type="stream">
+ <param name="contentType">${mimeType}</param>
+ <param name="inputName">rstResult</param>
+ </result>
</action>
<!--
| Edit n'importe qu'elle objet en modifiant les valeurs des champs retrouve
| en parametre
+-->
<action name="edit/*" class="org.chorem.vradi.actions.EditAction">
- <param name="id">{1}</param>
- <param name="includes">FormNote\..*,VradiUser\..*</param>
- <result type="wikitty-json"/>
+ <param name="id">{1}</param>
+ <param name="includes">FormNote\..*,VradiUser\..*</param>
+ <result type="wikitty-json"/>
</action>
<!--
| Supprime n'importe qu'elle objet ou champs d'un objet (remise a null)
+-->
<action name="delete/*" class="org.chorem.vradi.actions.DeleteAction">
- <param name="id">{1}</param>
- <param name="includes">FormNote</param>
- <result>/WEB-INF/jsp/empty.jsp</result>
+ <param name="id">{1}</param>
+ <param name="includes">FormNote, Attachment</param>
+ <result>/WEB-INF/jsp/empty.jsp</result>
+ <result name="error">/WEB-INF/jsp/empty.jsp</result>
</action>
</package>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/attachmentList.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/attachmentList.jsp 2011-07-11 08:47:49 UTC (rev 118)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/attachmentList.jsp 2011-07-11 15:00:08 UTC (rev 119)
@@ -7,6 +7,7 @@
<%@page import="com.opensymphony.xwork2.ActionContext"%>
<%@page import="org.chorem.vradi.entities.Attachment"%>
<%@page import="org.chorem.vradi.actions.AttachmentListAction"%>
+<%@ page import="org.chorem.vradi.VradiWebHelper" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
@@ -16,23 +17,30 @@
AttachmentListAction action = AttachmentListAction.getAction();
%>
-<div id="actionResult" style="display: none;"></div>
+<div id="actionResult" hidden="true">
+ <img id="indicator-deleteAttachment" src="/img/indicator.gif" alt="deleting..." style="display:none"/>
+</div>
<ul>
- <% for (Attachment a : action.getAttachments()) {
- ActionContext.getContext().put("localAttachmentId", a.getWikittyId());
- %>
+ <% for (Attachment a : action.getAttachments()) {
+ if (a != null) {
+ String attachmentId = a.getWikittyId();
+ ActionContext.getContext().put("localAttachmentId", attachmentId);
+ %>
- <li><%=a.getDate()%><a href="/ajax/raw/<%=a.getWikittyId()%>/Attachment.content.action"><%=a.getName()%></a>
+ <li><%=VradiWebHelper.formatDate(a.getDate())%> <a href="/ajax/raw/<%=attachmentId%>/Attachment.content.action"><%=a.getName()%></a>
- <s:a action="/ajax/raw/%{}/Attachment.content" key="vradi.attachment.update"></s:a>
- <s:a action="" key="vradi.attachment.history"></s:a>
- <sj:a id="deleteAttachment-%{localAttachmentId}" href="/ajax/delete/%{localAttachmentId}"
- targets="actionResult" indicator="indicator-deleteAttachment-%{localAttachmentId}"
- button="true" buttonIcon="ui-icon-gear">
- <s:text name="vradi.attachment.delete"/>
- </sj:a>
- <img id="indicator-deleteAttachment-<%=a.getWikittyId()%>" src="/img/indicator.gif" alt="deleting..." style="display:none"/>
- </li>
- <% } %>
+ <%--<s:a action="/ajax/raw/%{localAttachmentId}/Attachment.content" key="vradi.attachment.update"></s:a>--%>
+ <%--<s:a action="" key="vradi.attachment.history"></s:a>--%>
+ <sj:a href="/ajax/delete/%{localAttachmentId}.action"
+ targets="actionResult"
+ button="true"
+ indicator="indicator-deleteAttachment"
+ onSuccessTopics="updateFiles"
+ buttonIcon="ui-icon-gear">
+ <s:text name="vradi.attachment.delete"/>
+ </sj:a>
+ </li>
+ <% }
+ } %>
</ul>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNote.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNote.jsp 2011-07-11 08:47:49 UTC (rev 118)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNote.jsp 2011-07-11 15:00:08 UTC (rev 119)
@@ -7,6 +7,7 @@
<%@page import="com.opensymphony.xwork2.ActionContext"%>
<%@page import="org.chorem.vradi.entities.FormNote"%>
<%@page import="org.chorem.vradi.actions.FormNoteAction"%>
+<%@ page import="org.chorem.vradi.entities.FormNoteState" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
@@ -37,18 +38,19 @@
</head>
<body>
<h1><s:text name="vradi.formNote.title" /></h1>
- <div id="result">
+ <div id="result" hidden="true">
<img id="indicator-result" src="/img/indicator.gif" alt="Loading..." style="display:none"/>
</div>
<div>
- <sj:a id="closeButton" href="/ajax/edit/%{localNoteId}.action?state=close"
- targets="" indicator="indicator-result"
+ <sj:a id="closeButton" href="/ajax/edit/%{localNoteId}.action?state=<%=FormNoteState.CLOSE.getValue()%>>"
+ targets="result" indicator="indicator-result"
button="true" buttonIcon="ui-icon-gear">
<s:text name="vradi.formNote.close"/>
</sj:a>
- <s:a action="formNoteEdit/%{localNoteId}?state=close"><s:text name="vradi.formNote.close" /></s:a>
- <s:a action="delete/%{localNoteId}"><s:text name="vradi.delete" /></s:a>
+ <sj:a href="/ajax/delete/%{localNoteId}.action"
+ targets="result" indicator="indicator-result"
+ button="true" buttonIcon="ui-icon-gear"><s:text name="vradi.delete"/></sj:a>
</div>
<div>
@@ -125,18 +127,23 @@
collapsible="true" useSelectedTabCookie="true">
<sj:tab id="tabHtmlContent" target="htmlContent" label="%{summaryText}"/>
<sj:tab id="tabHtmlContentEdit" target="htmlContentEdit" label="%{editText}"/>
- <div id="htmlContent">
+ <sj:div id="htmlContent"
+ href="/ajax/rst.action?id=%{localNoteId}&field=%{localFieldContent}"
+ listenTopics="updateHtmlContent">
<img id="indicator-htmlContent" src="/img/indicator.gif" alt="Loading..." style="display:none"/>
- <%=action.getContent()%>
- </div>
+ </sj:div>
+ <%--<div id="htmlContent">--%>
+ <%--<img id="indicator-htmlContent" src="/img/indicator.gif" alt="Loading..." style="display:none"/>--%>
+ <%--</div>--%>
<div id="htmlContentEdit" >
- <form id="htmlContentEditForm" action="/ajax/edit.action">
+ <form id="htmlContentEditForm" action="/ajax/rst.action">
<s:hidden name="id" value="%{localNoteId}"/>
- <s:hidden name="field" value="%{localFieldSummary}"/>
- <s:textarea name="content" value="%{localContent}"/>
- <sj:submit id="htmlContentEditSubmit" formIds="htmlContentEditForm"
+ <s:hidden name="field" value="%{localFieldContent}"/>
+ <s:textarea name="rst" value="%{localContent}"/>
+ <sj:submit id="htmlContentEditSubmit"
value="%{saveText}"
- targets="htmlContent"
+ targets="result"
+ onSuccessTopics="updateHtmlContent"
indicator="indicator-htmlContent"
button="true" buttonIcon="ui-icon-gear"/>
</form>
@@ -159,21 +166,23 @@
<sj:tab id="tabAddFiles" target="addFiles" label="%{addText}"/>
<div id="files">
<sj:div href="/fragment/attachmentList/%{localNoteId}.action"
- indicator="indicator-files">
+ indicator="indicator-files"
+ listenTopics="updateFiles">
<img id="indicator-files" src="/img/indicator.gif" alt="Loading..." style="display:none"/>
</sj:div>
</div>
<div id="addFiles">
- <s:form id="addFilesForm" action="/fragment/attachmentAdd.action" enctype="multipart/form-data">
+ <s:form id="addFilesForm" namespace="/fragment" action="attachmentAdd" method="POST" enctype="multipart/form-data">
+ <%--<s:form id="addFilesForm" action="attachmentAdd" method="POST" enctype="multipart/form-data">--%>
<s:hidden name="targetId" value="%{localNoteId}"/>
<s:textfield name="name" key="vradi.addfiles.name"/>
<s:textarea name="description" key="vradi.addfiles.description"/>
<s:file name="content" key="vradi.addfiles.content" required="true"/>
- <sj:submit id="addFilesSubmit" formIds="addFilesForm"
- value="%{saveText}"
- targets="files" onSuccessTopics=""
- indicator="indicator-addFiles"
- button="true" buttonIcon="ui-icon-gear"/>
+ <sj:submit id="addFilesSubmit"
+ value="%{saveText}"
+ targets="result" onSuccessTopics="updateFiles"
+ indicator="indicator-addFiles"
+ button="true" buttonIcon="ui-icon-gear"/>
</s:form>
<img id="indicator-addFiles" src="/img/indicator.gif" alt="Loading..." style="display:none"/>
</div>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNoteList.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNoteList.jsp 2011-07-11 08:47:49 UTC (rev 118)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNoteList.jsp 2011-07-11 15:00:08 UTC (rev 119)
@@ -7,6 +7,7 @@
<%@page import="com.opensymphony.xwork2.ActionContext"%>
<%@page import="org.chorem.vradi.entities.FormNote"%>
<%@page import="org.chorem.vradi.actions.FormNoteListAction"%>
+<%@ page import="org.chorem.vradi.VradiWebHelper" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
@@ -27,7 +28,7 @@
<% for (FormNote note : action.getFormNotes()) {
ActionContext.getContext().put("localNoteId", note.getWikittyId());
%>
- <li><s:a action="formNote/%{localNoteId}"><%=note.getCreationDate()%> <%=note.getSummary()%></s:a></li>
+ <li><s:a action="formNote/%{localNoteId}"><%=VradiWebHelper.formatDate(note.getCreationDate())%> <%=note.getSummary()%></s:a></li>
<% } %>
<li><s:a action="formNote/new?formId=%{formId}"><s:text name="vradi.new.formNote"/></s:a></li>
</ul>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/userPreference.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/userPreference.jsp 2011-07-11 08:47:49 UTC (rev 118)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/userPreference.jsp 2011-07-11 15:00:08 UTC (rev 119)
@@ -19,7 +19,6 @@
<%
RestoreUserAction action = RestoreUserAction.getAction();
VradiUser user = action.getUser();
-//ActionContext.getContext().put("user", WikittyUtil.getWikitty(action.getProxy().getWikittyService(), null, action.getUser()));
ActionContext.getContext().put("localUserId", user.getWikittyId());
ActionContext.getContext().put("localUserEmail", user.getLogin());
ActionContext.getContext().put("localUserInfo", user.getInfo());
@@ -48,6 +47,7 @@
function formatLink(cellvalue, options, row) {
return "<a href='/formNoteList/" + cellvalue + ".action'><%=_("vradi.form.editAction")%></a>";
}
+
<%-- Table --%>
$.subscribe('rowselect', function(event, data) {
var id = event.originalEvent.id;
1
0
r118 - trunk/vradi-entities/src/main/java/org/chorem/vradi/entities
by sletellier@users.chorem.org 11 Jul '11
by sletellier@users.chorem.org 11 Jul '11
11 Jul '11
Author: sletellier
Date: 2011-07-11 10:47:49 +0200 (Mon, 11 Jul 2011)
New Revision: 118
Url: http://chorem.org/repositories/revision/vradi/118
Log:
Add enum to list states of formNotes
Added:
trunk/vradi-entities/src/main/java/org/chorem/vradi/entities/FormNoteState.java
Added: trunk/vradi-entities/src/main/java/org/chorem/vradi/entities/FormNoteState.java
===================================================================
--- trunk/vradi-entities/src/main/java/org/chorem/vradi/entities/FormNoteState.java (rev 0)
+++ trunk/vradi-entities/src/main/java/org/chorem/vradi/entities/FormNoteState.java 2011-07-11 08:47:49 UTC (rev 118)
@@ -0,0 +1,22 @@
+package org.chorem.vradi.entities;
+
+/**
+ * Enum to list value of {@link FormNote#setState(String)}
+ *
+ * @author sletellier
+ */
+public enum FormNoteState {
+
+ OPEN("Open"),
+ CLOSE("Close");
+
+ private String value;
+
+ FormNoteState(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+}
1
0