Correction de divers bug.

Changement de listConference, ça affiche les roles maintenant
This commit is contained in:
Frederic Debuire
2008-02-16 15:36:20 +00:00
parent de2991b335
commit 3b0c845902
16 changed files with 174 additions and 156 deletions

View File

@@ -1,7 +0,0 @@
#Sat Jan 19 01:10:39 CET 2008
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.5

View File

@@ -1,6 +1,6 @@
#Fri Feb 15 22:57:49 CET 2008
#Sat Feb 16 13:07:24 CET 2008
DELEGATES_PREFERENCE=delegateValidatorListorg.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator\=org.eclipse.wst.xsd.core.internal.validation.eclipse.Validator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator\=org.eclipse.wst.wsdl.validation.internal.eclipse.Validator;
USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.jst.jsf.validation.internal.appconfig.AppConfigValidator;org.eclipse.jst.jsp.core.internal.validation.JSPBatchValidator;org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.common.componentcore.internal.ModuleCoreValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPContentValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.jst.jsf.validation.internal.JSPSemanticsValidator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;
USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.jst.jsf.validation.internal.appconfig.AppConfigValidator;org.eclipse.jst.jsp.core.internal.validation.JSPBatchValidator;org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.common.componentcore.internal.ModuleCoreValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPContentValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.jst.jsf.validation.internal.JSPSemanticsValidator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;
USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.jst.jsf.validation.internal.appconfig.AppConfigValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.jst.jsf.validation.internal.JSPSemanticsValidator;org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;org.eclipse.jst.jsp.core.internal.validation.JSPBatchValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.eclipse.jst.jsp.core.internal.validation.JSPContentValidator;org.eclipse.wst.common.componentcore.internal.ModuleCoreValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;
USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.jst.jsf.validation.internal.appconfig.AppConfigValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.jst.jsf.validation.internal.JSPSemanticsValidator;org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;org.eclipse.jst.jsp.core.internal.validation.JSPBatchValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.eclipse.jst.jsp.core.internal.validation.JSPContentValidator;org.eclipse.wst.common.componentcore.internal.ModuleCoreValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;
USER_PREFERENCE=overrideGlobalPreferencesfalse
eclipse.preferences.version=1

View File

@@ -161,6 +161,7 @@ conference.errors.dateStartSuperiorEnd=The start date must be earlier than the e
conference.errors.dateStartSuperiorArticle=The article's deadline date must be earlier than the start date
conference.errors.dateStartSuperiorEvaluation=The evaluation's deadline date must be earlier than the start date
conference.errors.dateArticleSuperiorEvaluation=The article's deadline date must be earlier than the evaluation's deadline date
conference.errors.pageNumberNotValid=It should be a number
conference2.title=Calendar
conference2.date=Conference's date

View File

@@ -23,7 +23,10 @@ var LoginManager = Class.create({
KeyPressHandler: function(event){
switch(event.keyCode){
case Event.KEY_RETURN:
if (event.element().parentNode.id == 'mainformlogin')
$('mainformlogin').submit();
else
$('mainformlogin2').submit();
}
}
});

View File

@@ -2,27 +2,10 @@
<html>
<head>
<script type='text/javascript' src='./javascripts/prototype.js'></script>
<script type='text/javascript'>
function verifNumber() {
var re = /^\d+$/;
if(!re.test($('pageNumber').value))
$('errorNumber').style.display = "";
else
$('errorNumber').style.display = "none";
}
</script>
</head>
<body>
<h4 class="title"><c:choose>
<c:when test="${param['action'] eq 'modify'}">
<fmt:message key="conference.titleModify" />
@@ -48,7 +31,7 @@ function verifNumber() {
<tbody>
<tr>
<td class="formLabel">Page's numbers</td>
<td><form:input id="pageNumber" path="pageNumber" onchange="verifNumber();"/><div class="formError"><span id="errorNumber" style="display: none;">It should be a number</span></div></td>
<td><form:input path="pageNumber"/><div class="formError"><form:errors path="pageNumber" /></div></td>
</tr>
<tr>
<td class="formLabel">Authorized file types</td>
@@ -78,10 +61,6 @@ function verifNumber() {
</table>
</form:form>
<script type="text/javascript">
verifNumber();
</script>
<a href="<c:url value="main.htm"/>">Home</a>
</body>

View File

@@ -123,7 +123,7 @@ function writePerson() {
else
$('errorMax').style.display = "none";
if (person.max <= person.min) {
if (parseInt(person.max) <= parseInt(person.min)) {
dwr.util.setValues({errorMax:"The min value shouldn't be superior to the max value"});
$('errorMax').style.display = "";
}

View File

@@ -1,45 +1,61 @@
<%@ include file="/WEB-INF/decorators/include.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<html>
<head></head>
<body>
<h4 class="title">NO NAME</h4>
<h4 class="title">Conference's list</h4>
<c:if test="${errorMessage != null}">
<span class="formError">
<div class="errorBox">
<c:choose>
<c:when test="${errorMessage == 1}"><fmt:message key="message.error.noconferenceforthisid" /></c:when>
<c:when test="${errorMessage == 2}"><fmt:message key="message.error.noconferenceid" /></c:when>
<c:otherwise><fmt:message key="message.error.conferenceerror" /></c:otherwise>
</c:choose>
</span><br />
</div>
</c:if>
Choix de la conference <br /><br />
<c:if test="${currentConferenceId!=null}">
La conf<6E>rence courante est : ${currentConference.title}.<br /><br />
</c:if>
<c:if test="${currentConferenceId==null}">
Il n'y a pas de conf<6E>rence s<>lectionn<6E>.<br /><br />
</c:if>
<p class="formHelp">
Choose a conference
</p>
<c:choose>
<c:when test="${empty listConference}">
Il n'y a pas de conf<6E>rence pr<70>sente.<br />
<div class="errorBox">
Sorry, there is no conference at the moment.
</div>
</c:when>
<c:otherwise>
<c:forEach items="${listConference}" var="conference">
<div class="conferenceBloc cbb">
<h2>${conference.title}</h2>
ID : ${conference.id}<br />
Title : ${conference.title}<br />
Description : ${conference.description}<br />
Other Informations : ${conference.otherInformations}<br />
<h2>
<c:set var="varName" value="false" />
<c:forEach items="${listRole}" var="role">
<c:if test="${conference.id == role.conference.id and varName == 'false' }">
<c:set var="varName" value="true" />
</c:if>
</c:forEach>
<c:choose>
<c:when test="${varName == 'true'}">
${conference.title} - In this conference you are:
<c:forEach items="${listRole}" var="role">
<c:if test="${conference.id == role.conference.id}">
${role.type}
</c:if>
</c:forEach>
</c:when>
<c:otherwise>
${conference.title} - You haven't any role in this conference
</c:otherwise>
</c:choose>
</h2>
<b>Description:</b> ${conference.description}<br />
<center>
<a href="<c:url value="/chooseConference.htm?idConf=${conference.id}" />">Choisir</a><br />
<a href="<c:url value="/chooseConference.htm?idConf=${conference.id}" />">Choose</a><br />
</center>
</div>
</c:forEach>

View File

@@ -6,19 +6,17 @@
<h4 class="title"><fmt:message key="login.title" /></h4>
<c:if test="${not empty param.login_error}">
<p class="errorBox">
<fmt:message key="login.message.error" /><br /><br />
</p>
<div class="errorBox">
<fmt:message key="login.message.error" />
</div>
</c:if>
<table width="100%">
<tr>
<td class="newuser"><div class="titleLogin"><fmt:message key="login.label.createnewuser" /></div></td>
<td class="existingaccount"><div class="titleLogin"><fmt:message key="login.label.alreadyaccount" /></div></td>
</tr>
<tr>
<td valign="top" width="50%">
@@ -31,7 +29,7 @@
</td>
<td>
<form action="<c:url value='j_acegi_security_check'/>" method="POST" id="formlogin">
<form action="<c:url value='j_acegi_security_check'/>" method="POST" id="mainformlogin2">
<table class="content_table">
<tr>
<td width="100" align="left">
@@ -68,7 +66,7 @@
</form>
<br />
<center><a class="submit_link" href="javascript:document.getElementById('formlogin').submit();">
<center><a class="submit_link" href="javascript:document.getElementById('mainformlogin2').submit();">
<fmt:message key="login.btn.connexion" />
</a></center>
<script type="text/javascript"> new LoginManager('username', 'password');</script>

View File

@@ -34,7 +34,7 @@
</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="<c:url value="/submissionArticle.htm"><c:param name="action" value="modify"/><c:param name="articleID" value="${article.id}"/></c:url>"><img src="./images/cc-button_ok-128x128.png" alt="Modify" /></a></td>
<td><a id="suppressArticle${i.index}" title="Delete" href="<c:url value="/delete.htm"><c:param name="articleId" value="${article.id}"/></c:url>"><img src="./images/cc-button_cancel-128x128.png" alt="Delete"/></a></td>
<td><a id="suppressArticle${i.index}" title="Delete" href="javascript:deleteArticle(${article.id});"><img src="./images/cc-button_cancel-128x128.png" alt="Delete"/></a></td>
</tr>
</tbody>
</table>

View File

@@ -197,6 +197,7 @@
<bean id="ListConferenceController"
class="org.yacos.web.system.controller.ListConferenceController">
<property name="conferenceManager" ref="conferenceManager" />
<property name="userManager" ref="userManager" />
</bean>

View File

@@ -41,3 +41,9 @@ var AuthorManager = Class.create({
Event.observe(window,'load', function() {
new AuthorManager()
});
function deleteArticle(ArticleID) {
if (confirm("Are you sure you want to delete this article?")) {
document.location.href = "delete.htm?articleId=" + ArticleID;
}
}

View File

@@ -2,8 +2,6 @@ package org.yacos.web.author.controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.swing.text.html.FormView;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.ModelAndViewDefiningException;
import org.springframework.web.servlet.mvc.Controller;

View File

@@ -22,12 +22,6 @@ public class ManageArticleController extends SimpleFormController {
private IArticleManager articleManager;
public void deleteArticle(Integer id) {
articleManager.removeArticle(id);
}
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException, NoConferenceSelectedException {

View File

@@ -18,7 +18,8 @@ public class FormConference {
private String dateEnd;
private Date dateEndParsed;
private int pageNumber;
private String pageNumber;
private Integer pageNumberChecked;
private boolean typePDF;
private boolean typeLatec;
private boolean typeWord;
@@ -63,14 +64,6 @@ public class FormConference {
this.otherInformations = otherInformations;
}
public int getPageNumber() {
return pageNumber;
}
public void setPageNumber(int pageNumber) {
this.pageNumber = pageNumber;
}
public String getSendInfo() {
return sendInfo;
}
@@ -214,4 +207,20 @@ public class FormConference {
public void setTypeODT(boolean typeODT) {
this.typeODT = typeODT;
}
public String getPageNumber() {
return pageNumber;
}
public void setPageNumber(String pageNumber) {
this.pageNumber = pageNumber;
}
public Integer getPageNumberChecked() {
return pageNumberChecked;
}
public void setPageNumberChecked(Integer pageNumberChecked) {
this.pageNumberChecked = pageNumberChecked;
}
}

View File

@@ -79,7 +79,17 @@ public class ConferenceValidator implements Validator {
}
public void validateThirdPage(FormConference conference, Errors errors) {
try {
String pageNumber = conference.getPageNumber();
if (! pageNumber.equals("")) {
Integer i = new Integer(pageNumber);
conference.setPageNumberChecked(i);
}
else
conference.setPageNumberChecked(0);
} catch (NumberFormatException e) {
errors.rejectValue("pageNumber", "conference.errors.pageNumberNotValid");
}
}
}

View File

@@ -12,13 +12,22 @@ import org.apache.commons.logging.LogFactory;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;
import org.yacos.core.conferences.IConferenceManager;
import org.yacos.core.users.IUserManager;
import org.yacos.web.system.session.SessionService;
public class ListConferenceController implements Controller{
protected final Log logger = LogFactory.getLog(getClass());
private IConferenceManager conferenceManager;
private IUserManager userManager;
public IUserManager getUserManager() {
return userManager;
}
public void setUserManager(IUserManager userManager) {
this.userManager = userManager;
}
public IConferenceManager getConferenceManager() {
return conferenceManager;
}
@@ -26,20 +35,22 @@ public class ListConferenceController implements Controller{
this.conferenceManager = conferenceManager;
}
/**
* Generate list of conference fo can choose
* Generate list of conference
*/
public ModelAndView handleRequest(HttpServletRequest request,
HttpServletResponse response) throws Exception
{
HttpServletResponse response) throws Exception {
logger.info("Returning listConference view");
// List all conference
Map<String, Object> model = new HashMap<String, Object>();
// add list of conference
model.put("listConference", conferenceManager.getConferences());
// add list of role
model.put("listRole", userManager.getRolesForUser(SessionService.getInstance().getCurrentUserLogin()));
// Error choose conference
String msgCode = request.getParameter("error");
if (msgCode != null)
@@ -50,5 +61,4 @@ public class ListConferenceController implements Controller{
return new ModelAndView("listConference", model);
}
}