Divers changement:

Ajout d'image pour le download (à changer)
Changement de choose preference
This commit is contained in:
Frederic Debuire
2008-02-15 19:33:51 +00:00
parent 38bd59d2a6
commit 363238ce30
17 changed files with 83 additions and 295 deletions

View File

@@ -109,6 +109,7 @@ function writePerson() {
if (person.max <= person.min) {
dwr.util.setValues({id:person.id, label:person.label, min:null, max:null });
dwr.util.setValues({errorMax:"The max value should'nt be superior to the min value"});
$('errorMax').style.display = "";
}
else {
dwr.engine.beginBatch();
@@ -116,6 +117,7 @@ function writePerson() {
fillTable();
dwr.engine.endBatch();
dwr.util.setValues({ id:-1, label:null, min:1, max:5 });
$('errorMax').style.display = "none";
}
}

View File

@@ -8,9 +8,11 @@
<h4 class="title"><fmt:message key="preference.title" /></h4>
<p class="formHelp">
Choose the preference you have for each article.
</p>
<form:form method="post" commandName="choosePreference">
<spring:message var="message"/>
<c:if test="${not empty articleList}">
<table>
<c:forEach items="${articleList}" var="article" varStatus="i">
@@ -32,6 +34,14 @@
</c:if>
</form:form>
<c:if test="${param['message'] eq 'done'}">
<p class="formOk">
You have successfully updated the preference.<br/>
You can modify your choices immediately or later.<br/>
</p>
</c:if>
<br />
<a href="<c:url value="main.htm"/>">Home</a>

View File

@@ -1,15 +0,0 @@
<%@ include file="/WEB-INF/decorators/include.jsp"%>
<html>
<head></head>
<body>
<h4 class="title"><fmt:message key="preference.title" /></h4>
<fmt:message key="preference.ok"/>
</body>
</html>

View File

@@ -7,18 +7,11 @@
<script type='text/javascript' src='./javascripts/effects.js'></script>
<script type='text/javascript' src='./dwr/engine.js'></script>
<script type='text/javascript' src='./dwr/util.js'></script>
<script type='text/javascript' src='./dwr/interface/ManagerArticleJS.js'></script>
<script type='text/javascript' src='./javascripts/yacos/manageArticle.js'></script>
</head>
<body>
<h4 class="title"><fmt:message key="manageArticle.title" /></h4>
<!-- <div id="authorList" class="dynamicFredList">
<div class="dynamicListHeader" align="center"><fmt:message
key="listarticle.title" /></div>
</div> -->
<br />
<div id="articleList" class="dynamicFredList">
@@ -41,9 +34,9 @@
<li>Topic: <b>${article.topic}</b></li>
</ul>
</td>
<td><a id="articleURL${i.index}" href="${article.URL_article}" />Download the article</a></td>
<td><a id="modifyArticle${i.index}" href="" />Modify the article</a></td>
<td><a id="suppressArticle${i.index}" href="" />Suppress the article</a></td>
<td><a id="articleURL${i.index}" title="Download" href="<c:url value="/download.htm"><c:param name="articleId" value="${article.id}"/></c:url>"><img src="./images/cc-download_manager-128x128.png" alt="Download" /></a></td>
<td><a id="modifyArticle${i.index}" title="Modify" href=""/><img src="./images/cc-button_ok-128x128.png" alt="Modify" /></a></td>
<td><a id="suppressArticle${i.index}" title="Delete" href="" /><img src="./images/cc-button_cancel-128x128.png" alt="Delete" /></a></td>
</tr>
</tbody>
</table>

View File

@@ -1,14 +0,0 @@
<%@ include file="/WEB-INF/decorators/include.jsp"%>
<html>
<head></head>
<body>
<h4 class="title">NO NAME</h4>
Soumission OK
<br />
<a href="<c:url value="main.htm"/>">Home</a>
</body>
</html>

View File

@@ -22,63 +22,25 @@
<property name="mappings">
<props>
<prop key="/main.htm">MainController</prop>
<prop key="/submissionArticleOK.htm">
SArticleControllerOK
</prop>
<prop key="/listArticle.htm">
ListArticleController
</prop>
<prop key="/manageArticle.htm">
ManageArticleController
</prop>
<prop key="/registerUser.htm">
SUserRegistrationController
</prop>
<prop key="/submissionArticle.htm">
SArticleController
</prop>
<prop key="/choosePreference.htm">
ChoosePreferenceController
</prop>
<prop key="/dispatchArticleList.htm">
DispatchArticleListController
</prop>
<prop key="/dispatchArticle.htm">
DispatchArticleController
</prop>
<prop key="/addConference.htm">
AddConferenceController
</prop>
<prop key="/listArticle.htm">ListArticleController</prop>
<prop key="/manageArticle.htm">ManageArticleController</prop>
<prop key="/registerUser.htm">SUserRegistrationController</prop>
<prop key="/submissionArticle.htm">SArticleController</prop>
<prop key="/choosePreference.htm">ChoosePreferenceController</prop>
<prop key="/dispatchArticleList.htm">DispatchArticleListController</prop>
<prop key="/dispatchArticle.htm">DispatchArticleController</prop>
<prop key="/addConference.htm">AddConferenceController</prop>
<prop key="/evaluation.htm">EvaluationController</prop>
<prop key="/createReport.htm">
CreateReportController
</prop>
<prop key="/listConference.htm">
ListConferenceController
</prop>
<prop key="/chooseConference.htm">
ChooseConferenceController
</prop>
<prop key="/validateArticle.htm">
ValidateArticleController
</prop>
<prop key="/valideOrReject.htm">
ValideOrRejectController
</prop>
<prop key="/createReport.htm">CreateReportController</prop>
<prop key="/listConference.htm">ListConferenceController</prop>
<prop key="/chooseConference.htm">ChooseConferenceController</prop>
<prop key="/validateArticle.htm">ValidateArticleController</prop>
<prop key="/valideOrReject.htm">ValideOrRejectController</prop>
<prop key="/login.htm">LogonController</prop>
<prop key="/listEvaluation.htm">
ListEvaluationController
</prop>
<prop key="/download.htm">
ArticleDownloadController
</prop>
<prop key="/listReport.htm">
ListReportController
</prop>
<prop key="/forgotPassword.htm">
ForgotPasswordController
</prop>
<prop key="/listEvaluation.htm">ListEvaluationController</prop>
<prop key="/download.htm">ArticleDownloadController</prop>
<prop key="/listReport.htm">ListReportController</prop>
<prop key="/forgotPassword.htm">ForgotPasswordController</prop>
<prop key="/detailArticle.htm">
DetailArticleController
</prop>
@@ -89,9 +51,6 @@
<bean id="MainController"
class="org.yacos.web.author.controller.MainController" />
<bean id="SArticleControllerOK"
class="org.yacos.web.author.controller.SArticleControllerOK" />
<bean id="ListArticleController"
class="org.yacos.web.PCmember.controller.ListArticleController">
<property name="articleManager" ref="articleManager" />
@@ -99,7 +58,6 @@
<bean id="ManageArticleController"
class="org.yacos.web.author.controller.ManageArticleController">
<dwr:remote javascript="ManagerArticleJS" />
<property name="articleManager" ref="articleManager" />
</bean>
@@ -278,10 +236,6 @@
class="org.yacos.web.chairman.form.FormConference">
</dwr:convert>
<dwr:convert type="bean"
class="org.yacos.web.author.form.ArticleBean">
</dwr:convert>
<dwr:convert type="bean"
class="org.yacos.web.chairman.controller.CriterionBean">
</dwr:convert>

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -467,5 +467,4 @@ textarea {
.yacos_button:hover {
background-image: url(../images/button_background_hover.png);
}
/* @end */

View File

@@ -1,7 +1,5 @@
package org.yacos.web.PCmember.controller;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -47,10 +45,10 @@ public class ChoosePreferenceController extends SimpleFormController {
List<Article> articleList=articleManager.getArticles(currentConferenceId);
getServletContext().setAttribute("articleList", articleList);
request.getSession().setAttribute("articleList", articleList);
User currentUser = SessionService.getInstance().getCurrentUser();
// TODO : mock object, replace with real user management
ArrayList<Preference> preferencesList = new ArrayList<Preference>();
Preference pref;
for(Article article : articleList){
@@ -86,8 +84,9 @@ public class ChoosePreferenceController extends SimpleFormController {
}
Map<String, String> model = new HashMap<String, String>();
model.put("message", "preference.ok");
return new ModelAndView(new RedirectView(getSuccessView()), "model", model);
model.put("message", "done");
return new ModelAndView(new RedirectView(getSuccessView()), model);
}

View File

@@ -1,26 +0,0 @@
package org.yacos.web.PCmember.controller;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.SimpleFormController;
public class ChoosePreferenceControllerOK extends SimpleFormController {
protected final Log logger = LogFactory.getLog(getClass());
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
logger.info("Returning choosePreference OK view");
return new ModelAndView("choosePreferenceOK");
}
}

View File

@@ -2,7 +2,6 @@ package org.yacos.web.PCmember.form;
import java.util.ArrayList;
import java.util.List;
import org.yacos.core.article.Preference;

View File

@@ -1,7 +1,6 @@
package org.yacos.web.author.controller;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.ServletException;
@@ -14,7 +13,6 @@ import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.SimpleFormController;
import org.yacos.core.article.Article;
import org.yacos.core.article.IArticleManager;
import org.yacos.web.author.form.ArticleBean;
import org.yacos.web.system.controller.NoConferenceSelectedException;
import org.yacos.web.system.session.SessionService;
@@ -24,40 +22,14 @@ public class ManageArticleController extends SimpleFormController {
private IArticleManager articleManager;
/*private List<ArticleBean> listArticleBean;
public List<ArticleBean> getListArticle() {
return listArticleBean;
}
public void setListArticle(List<ArticleBean> listArticleBean) {
this.listArticleBean = listArticleBean;
}*/
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException, NoConferenceSelectedException {
logger.info("Returning manageArticle view");
//listArticleBean = new ArrayList<ArticleBean>();
List<Article> listArticle;
listArticle = articleManager.getArticleOfAuthor(SessionService.getInstance().getCurrentConferenceId(), SessionService.getInstance().getCurrentUserLogin());
/*for (Article a : listArticle) {
ArticleBean ab = new ArticleBean();
ab.setId(a.getId());
ab.setMainAuthor(a.getMainAuthor().getFirstName() + " " + a.getMainAuthor().getLastName());
ab.setSecondaryAuthors(a.getSecondaryAuthors());
ab.setTitle(a.getTitle());
ab.setTopic(a.getTopic());
String fullUrl = request.getContextPath()+"/download.htm?articleId="+a.getId();
ab.setURL_article(fullUrl);
ab.setState(a.getState().toString());
listArticleBean.add(ab);
}*/
return new ModelAndView("manageArticle", "listArticle", listArticle);
}

View File

@@ -1,26 +0,0 @@
package org.yacos.web.author.controller;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.SimpleFormController;
public class SArticleControllerOK extends SimpleFormController {
protected final Log logger = LogFactory.getLog(getClass());
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
logger.info("Returning submission OK view");
return new ModelAndView("submissionArticleOK");
}
}

View File

@@ -1,62 +0,0 @@
package org.yacos.web.author.form;
import java.util.ArrayList;
public class ArticleBean {
private int id;
private String title;
private String topic;
private String URL_article;
private String mainAuthor;
private ArrayList<String> secondaryAuthors;
private String state;
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public ArticleBean() {}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getTopic() {
return topic;
}
public void setTopic(String topic) {
this.topic = topic;
}
public String getURL_article() {
return URL_article;
}
public void setURL_article(String url_article) {
URL_article = url_article;
}
public String getMainAuthor() {
return mainAuthor;
}
public void setMainAuthor(String mainAuthor) {
this.mainAuthor = mainAuthor;
}
public ArrayList<String> getSecondaryAuthors() {
return secondaryAuthors;
}
public void setSecondaryAuthors(ArrayList<String> secondaryAuthors) {
this.secondaryAuthors = secondaryAuthors;
}
}

View File

@@ -86,7 +86,8 @@ public class SessionService {
public void setNbUserConferences() {
int nb = conferenceManager.getConferences(getCurrentUser()).size();
this.nbUserConferences = nb;
request.setAttribute("nbUserConferences", getNbUserConferences());
//request.setAttribute("nbUserConferences", getNbUserConferences());
request.setAttribute("nbUserConferences", this.nbUserConferences);
}
public void setConferenceManager(IConferenceManager conferenceManager) {
@@ -176,7 +177,9 @@ public class SessionService {
currentConference = conferenceManager.getConference(id);
}
if (isUserLogged()){setNbUserConferences();};
if (isUserLogged()) {
setNbUserConferences();
}
return currentConference;
}