Commit des corrections UC Submit Article
Gestionnaire de telechargement Liste des auteurs secondaires Quelques corrections javascripts
This commit is contained in:
1
YACOSWeb/WebContent/WEB-INF/classes/config.properties
Normal file
1
YACOSWeb/WebContent/WEB-INF/classes/config.properties
Normal file
@@ -0,0 +1 @@
|
||||
download.dir.path=../server/default/data/uploadedFiles/
|
||||
@@ -1,4 +1,6 @@
|
||||
title=Yacos
|
||||
button.remove=Remove
|
||||
button.removeSelected=Remove selected
|
||||
|
||||
###################
|
||||
# DISCLAIMER
|
||||
@@ -93,7 +95,7 @@ form.submission.article.theme=Article's theme
|
||||
form.submission.article.abstractText=Abstract
|
||||
form.submission.listauthor=Article's author
|
||||
form.submission.mainauthor=Main author
|
||||
form.submission.secondaryauthor=Secondary author
|
||||
form.submission.secondaryauthor=Secondary authors
|
||||
form.submission.file=File
|
||||
|
||||
|
||||
|
||||
@@ -7,9 +7,19 @@
|
||||
<c:forEach items="${listArticle}" var="article">
|
||||
<ul class="article">
|
||||
<li class="title"><b>${article.title}</b></li>
|
||||
<li class="author">Author: <b>${article.mainAuthor.firstName} ${article.mainAuthor.lastName}</b></li>
|
||||
<li class="author">Author: <b>${article.mainAuthor.firstName} ${article.mainAuthor.lastName}</b></li>
|
||||
<li class="secondaryAuthors">Secondary Authors:
|
||||
<ul>
|
||||
<c:forEach items="${article.secondaryAuthors}" var="sAuthor">
|
||||
<li>${sAuthor}</li>
|
||||
</c:forEach>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="topic">Topic: <b>${article.topic}</b></li>
|
||||
<li class="article_url"><a href="<c:url value="${article.URL_article}"/>">Download the article</a></li>
|
||||
<li class="article_url"><a href="
|
||||
<c:url value="/download.htm">
|
||||
<c:param name="articleId" value="${article.id}"/>
|
||||
</c:url>">Download the article</a></li>
|
||||
</ul>
|
||||
<br />
|
||||
<hr />
|
||||
|
||||
@@ -2,15 +2,80 @@
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<script type='text/javascript' src='./javascripts/prototype.js'></script>
|
||||
<script type='text/javascript' src='./javascripts/scriptaculous.js'></script>
|
||||
<script type='text/javascript' src='./javascripts/effects.js'></script>
|
||||
<style type="text/css">
|
||||
.dynamicList {
|
||||
display: table;
|
||||
border-collapse: collapse;
|
||||
min-width: 200px;
|
||||
max-height: 200px;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.dynamicList > * {
|
||||
display: table-row;
|
||||
border: thin solid #f57627;
|
||||
padding:3px;
|
||||
}
|
||||
|
||||
.dynamicListHeader {
|
||||
background-color: #f57627;
|
||||
}
|
||||
|
||||
.selected {
|
||||
background-color: #fea752;
|
||||
}
|
||||
</style>
|
||||
<script language="JavaScript">
|
||||
function Ajouter(form) {
|
||||
var o=new Option(form.secondaryauthor.value);
|
||||
form.liste.options[form.liste.options.length]=o;
|
||||
}
|
||||
|
||||
var SecondaryAuthorManager = Class.create({
|
||||
lastRef: 0,
|
||||
initialize: function(buttonAdd,buttonRemove,inputField){
|
||||
this.buttonAdd = buttonAdd;
|
||||
this.buttonRemove = buttonRemove;
|
||||
this.inputField = inputField;
|
||||
$(buttonAdd).observe("click",this.AddSecondaryAuthor.bind(this));
|
||||
$(buttonRemove).observe("click",this.RemoveSecondaryAuthor.bind(this));
|
||||
$(inputField).observe("keypress", this.KeyPressHandler.bindAsEventListener(this));
|
||||
},
|
||||
SelectSecondaryAuthor: function(event){
|
||||
var item = event.element();
|
||||
if(item.hasClassName('selected')){
|
||||
item.removeClassName('selected');
|
||||
} else {
|
||||
item.addClassName('selected');
|
||||
}
|
||||
},
|
||||
RemoveSecondaryAuthor: function() {
|
||||
var itemsToRemove = $('secondaryAuthorList').select('div.selected');
|
||||
itemsToRemove.invoke('remove');
|
||||
},
|
||||
KeyPressHandler: function(event){
|
||||
switch(event.keyCode){
|
||||
case Event.KEY_RETURN:
|
||||
this.AddSecondaryAuthor();
|
||||
event.stop();
|
||||
return false;
|
||||
}
|
||||
},
|
||||
AddSecondaryAuthor: function() {
|
||||
var ref = this.lastRef++;
|
||||
var elemName = "liste["+ref+"]";
|
||||
var value = $('newSecondaryAuthorInput').value;
|
||||
var hidden = new Element('input',{'id':elemName,'name':elemName,'type':'hidden','value':value});
|
||||
var elem = new Element('div',
|
||||
{ 'class':'dynamicListItem',
|
||||
'style':'display:none;height:0px;width:0px;',
|
||||
'id':elemName}).update(value).insert(hidden);
|
||||
elem.observe('click', this.SelectSecondaryAuthor.bindAsEventListener());
|
||||
$('secondaryAuthorList').insert(elem);
|
||||
$(this.inputField).clear();
|
||||
Effect.Appear(elemName);
|
||||
}
|
||||
});
|
||||
|
||||
function Supprimer(form) {
|
||||
form.liste.options[form.liste.options.selectedIndex]=null;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -18,7 +83,7 @@ function Supprimer(form) {
|
||||
|
||||
<h4 class="title"><fmt:message key="submission.title" /></h4>
|
||||
<form:form method="post" enctype="multipart/form-data" commandName="submissionArticle">
|
||||
|
||||
<fieldset>
|
||||
|
||||
<form:label path="title"><fmt:message key="form.submission.article.title" /></form:label> <form:input path="title"/> <font color="red"><form:errors path="title"/></font> <br/><br />
|
||||
|
||||
@@ -28,19 +93,31 @@ function Supprimer(form) {
|
||||
|
||||
<hr/> <br/>
|
||||
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
|
||||
<label for="listauthor"><fmt:message key="form.submission.listauthor" /></label> <br /><br />
|
||||
<form:label path="mainauthor"><fmt:message key="form.submission.mainauthor" /></form:label>: <b>${currentUser.firstName} ${currentUser.lastName}</b>
|
||||
<br/> <br/>
|
||||
<form:label path="secondaryauthor"><fmt:message key="form.submission.secondaryauthor" /></form:label> <form:input path="secondaryauthor" />
|
||||
<input type="button" name="addSecondary" onClick="Ajouter(this.form)" value=<fmt:message key="button.add" />> <br/><br />
|
||||
<label for="newSecondaryAuthor"><fmt:message key="form.submission.secondaryauthor" /></label>
|
||||
<input id="newSecondaryAuthorInput" type="text" name="newSecondaryAuthor" />
|
||||
<input type="button" id="addSecondaryButton" name="addSecondary" value="<fmt:message key="button.add" />">
|
||||
|
||||
<form:select path="liste" size="5" ondblclick="Supprimer(this.form)" multiple="true">
|
||||
|
||||
</form:select>
|
||||
<div id="secondaryAuthorList" class="dynamicList">
|
||||
<div class="dynamicListHeader">
|
||||
<fmt:message key="form.submission.secondaryauthor" />
|
||||
</div>
|
||||
</div>
|
||||
<input type="button" id="removeSecondaryButton" name="removeSecondary" value="<fmt:message key="button.removeSelected" />"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
new SecondaryAuthorManager('addSecondaryButton','removeSecondaryButton','newSecondaryAuthorInput');
|
||||
</script>
|
||||
|
||||
<br /><br />
|
||||
|
||||
</fieldset>
|
||||
<hr />
|
||||
<fieldset>
|
||||
<br />
|
||||
File <input type="file" name="file"/>
|
||||
|
||||
@@ -48,7 +125,7 @@ function Supprimer(form) {
|
||||
<br /><br />
|
||||
<input type="reset" value="<fmt:message key="button.reset" />"/>
|
||||
<input type="submit" value="<fmt:message key="button.OK" />"/> <br/><br/>
|
||||
|
||||
</fieldset>
|
||||
</form:form>
|
||||
|
||||
|
||||
|
||||
@@ -63,6 +63,10 @@
|
||||
|
||||
<prop key="/listEvaluation.htm">
|
||||
ListEvaluationController
|
||||
</prop>
|
||||
|
||||
<prop key="/download.htm">
|
||||
ArticleDownloadController
|
||||
</prop>
|
||||
<prop key="/listReport.htm">
|
||||
ListReportController
|
||||
@@ -80,6 +84,11 @@
|
||||
<bean id="ListArticleController"
|
||||
class="org.yacos.web.PCmember.controller.ListArticleController">
|
||||
<property name="articleManager" ref="articleManager" />
|
||||
</bean>
|
||||
|
||||
<bean id="ArticleDownloadController" class="org.yacos.web.system.controller.ArticleDownloadController">
|
||||
<property name="articleManager" ref="articleManager" />
|
||||
<property name="downloadDirPath" value="${download.dir.path}"/>
|
||||
</bean>
|
||||
|
||||
<bean id="SUserRegistrationController"
|
||||
@@ -107,7 +116,8 @@
|
||||
<property name="formView" value="submissionArticle" />
|
||||
<property name="successView" value="listArticle.htm" />
|
||||
<property name="articleManager" ref="articleManager" />
|
||||
<property name="validator" ref="submissionCheck" />
|
||||
<property name="validator" ref="submissionCheck" />
|
||||
<property name="downloadDirPath" value="${download.dir.path}"/>
|
||||
</bean>
|
||||
|
||||
<bean id="submissionCheck"
|
||||
@@ -278,5 +288,16 @@
|
||||
<jee:jndi-lookup id="conferenceManager"
|
||||
jndi-name="ConferenceManagerBean/remote" cache="true" />
|
||||
<jee:jndi-lookup id="evaluationManager"
|
||||
jndi-name="EvaluationManagerBean/remote" cache="true" />
|
||||
jndi-name="EvaluationManagerBean/remote" cache="true" />
|
||||
|
||||
<!-- Configuration Properties-->
|
||||
<bean id="configproperties"
|
||||
class="org.springframework.beans.factory.config.PropertiesFactoryBean">
|
||||
<property name="location" value="classpath:config.properties"/>
|
||||
</bean>
|
||||
|
||||
<bean id="propertyConfigurer"
|
||||
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="properties" ref="configproperties"/>
|
||||
</bean>
|
||||
</beans>
|
||||
|
||||
Reference in New Issue
Block a user