- Disabled placeholder text for hints. A hint is shown only if there is a real hint text
- Added an option to the Date widget to show the years in descending order - Some fixes for ccm-sci-assets-publicationspersons, including the rendering in the Mandalay theme git-svn-id: https://svn.libreccm.org/ccm/trunk@2809 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
f9e7bc9c82
commit
0908a339fc
|
|
@ -43,8 +43,7 @@ abstract public class DescriptiveComponent extends SimpleComponent {
|
||||||
|
|
||||||
/** Property to store informational text for the user about the Link, e.g.
|
/** Property to store informational text for the user about the Link, e.g.
|
||||||
* how to use it, or when to use it (or not to use it). */
|
* how to use it, or when to use it (or not to use it). */
|
||||||
private GlobalizedMessage m_hint = GlobalizationUtil
|
private GlobalizedMessage m_hint; //= GlobalizationUtil.globalize("bebop.hint.no_entry_yet");
|
||||||
.globalize("bebop.hint.no_entry_yet");
|
|
||||||
|
|
||||||
/** Property to store a (localized) label (or title) of this widget. A
|
/** Property to store a (localized) label (or title) of this widget. A
|
||||||
* label is the text (name) displayed for the user to identify and
|
* label is the text (name) displayed for the user to identify and
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ public class Date extends Widget implements BebopConstants {
|
||||||
private int m_year_begin;
|
private int m_year_begin;
|
||||||
private int m_year_end;
|
private int m_year_end;
|
||||||
private Locale m_locale;
|
private Locale m_locale;
|
||||||
|
private boolean yearAsc = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inner class for the year fragment
|
* Inner class for the year fragment
|
||||||
|
|
@ -70,8 +71,9 @@ public class Date extends Widget implements BebopConstants {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
*
|
||||||
* @param name
|
* @param name
|
||||||
* @param parent
|
* @param parent
|
||||||
*/
|
*/
|
||||||
public YearFragment(String name, Date parent) {
|
public YearFragment(String name, Date parent) {
|
||||||
super(name);
|
super(name);
|
||||||
|
|
@ -80,9 +82,10 @@ public class Date extends Widget implements BebopConstants {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param ps
|
* @param ps
|
||||||
* @return
|
*
|
||||||
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected ParameterData getParameterData(PageState ps) {
|
protected ParameterData getParameterData(PageState ps) {
|
||||||
|
|
@ -94,17 +97,18 @@ public class Date extends Widget implements BebopConstants {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param autoCurrentYear
|
* @param autoCurrentYear
|
||||||
*/
|
*/
|
||||||
public void setAutoCurrentYear(final boolean autoCurrentYear) {
|
public void setAutoCurrentYear(final boolean autoCurrentYear) {
|
||||||
this.autoCurrentYear = autoCurrentYear;
|
this.autoCurrentYear = autoCurrentYear;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param ps
|
* @param ps
|
||||||
* @return
|
*
|
||||||
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Object getValue(PageState ps) {
|
public Object getValue(PageState ps) {
|
||||||
|
|
@ -126,7 +130,7 @@ public class Date extends Widget implements BebopConstants {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
protected class MonthFragment extends SingleSelect {
|
protected class MonthFragment extends SingleSelect {
|
||||||
|
|
||||||
|
|
@ -160,7 +164,7 @@ public class Date extends Widget implements BebopConstants {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
protected class DayFragment extends TextField {
|
protected class DayFragment extends TextField {
|
||||||
|
|
||||||
|
|
@ -228,7 +232,8 @@ public class Date extends Widget implements BebopConstants {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
* @param name
|
*
|
||||||
|
* @param name
|
||||||
*/
|
*/
|
||||||
public Date(String name) {
|
public Date(String name) {
|
||||||
this(new DateParameter(name));
|
this(new DateParameter(name));
|
||||||
|
|
@ -250,17 +255,32 @@ public class Date extends Widget implements BebopConstants {
|
||||||
// a) skipYearAllowed is true
|
// a) skipYearAllowed is true
|
||||||
// b) skipDayAllowed is true and skipMonthAllowed is true, to unset a date
|
// b) skipDayAllowed is true and skipMonthAllowed is true, to unset a date
|
||||||
if (((IncompleteDateParameter) this.getParameterModel()).isSkipYearAllowed()
|
if (((IncompleteDateParameter) this.getParameterModel()).isSkipYearAllowed()
|
||||||
|| (((IncompleteDateParameter) this.getParameterModel()).isSkipDayAllowed()
|
|| (((IncompleteDateParameter) this.getParameterModel()).isSkipDayAllowed()
|
||||||
&& ((IncompleteDateParameter) this.getParameterModel()).isSkipMonthAllowed())) {
|
&& ((IncompleteDateParameter) this.getParameterModel())
|
||||||
|
.isSkipMonthAllowed())) {
|
||||||
m_year.addOption(new Option("", ""));
|
m_year.addOption(new Option("", ""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int year = m_year_begin; year <= m_year_end; year += 1) {
|
if (yearAsc) {
|
||||||
m_year.addOption(new Option(String.valueOf(year)));
|
for (int year = m_year_begin; year <= m_year_end; year++) {
|
||||||
|
m_year.addOption(new Option(String.valueOf(year)));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for(int year = m_year_end; year >= m_year_begin; year--) {
|
||||||
|
m_year.addOption(new Option(String.valueOf(year)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean getYearAsc() {
|
||||||
|
return yearAsc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setYearAsc(final boolean yearAsc) {
|
||||||
|
this.yearAsc = yearAsc;
|
||||||
|
}
|
||||||
|
|
||||||
public void addYear(java.util.Date date) {
|
public void addYear(java.util.Date date) {
|
||||||
Calendar cal = new GregorianCalendar();
|
Calendar cal = new GregorianCalendar();
|
||||||
cal.setTime(date);
|
cal.setTime(date);
|
||||||
|
|
@ -276,7 +296,8 @@ public class Date extends Widget implements BebopConstants {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a string naming the type of this widget.
|
* Returns a string naming the type of this widget.
|
||||||
* @return
|
*
|
||||||
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getType() {
|
public String getType() {
|
||||||
|
|
@ -286,6 +307,7 @@ public class Date extends Widget implements BebopConstants {
|
||||||
/**
|
/**
|
||||||
* Sets the <tt>MAXLENGTH</tt> attribute for the <tt>INPUT</tt> tag used to render this form
|
* Sets the <tt>MAXLENGTH</tt> attribute for the <tt>INPUT</tt> tag used to render this form
|
||||||
* element.
|
* element.
|
||||||
|
*
|
||||||
* @param length
|
* @param length
|
||||||
*/
|
*/
|
||||||
public void setMaxLength(int length) {
|
public void setMaxLength(int length) {
|
||||||
|
|
@ -299,7 +321,8 @@ public class Date extends Widget implements BebopConstants {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The XML tag for this derived class of Widget.
|
* The XML tag for this derived class of Widget.
|
||||||
* @return
|
*
|
||||||
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected String getElementTag() {
|
protected String getElementTag() {
|
||||||
|
|
@ -307,9 +330,9 @@ public class Date extends Widget implements BebopConstants {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param ps
|
* @param ps
|
||||||
* @param parent
|
* @param parent
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void generateWidget(PageState ps, Element parent) {
|
public void generateWidget(PageState ps, Element parent) {
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ public class SciPublicationsPersonsService {
|
||||||
if (publicationsAsset == null) {
|
if (publicationsAsset == null) {
|
||||||
SciPublicationsPersonsPersonsPublications.create(person);
|
SciPublicationsPersonsPersonsPublications.create(person);
|
||||||
} else {
|
} else {
|
||||||
final SciPublicationsPersonsPublicationsPersons publications = new SciPublicationsPersonsPublicationsPersons(publicationsAsset);
|
final SciPublicationsPersonsPersonsPublications publications = new SciPublicationsPersonsPersonsPublications(publicationsAsset);
|
||||||
publications.update();
|
publications.update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -86,14 +86,16 @@ public class SciPublicationsPersonsPersonForm extends BasicItemForm {
|
||||||
final ParameterModel relationParam = new StringParameter(RELATION);
|
final ParameterModel relationParam = new StringParameter(RELATION);
|
||||||
final SingleSelect relationSelect = new SingleSelect(relationParam);
|
final SingleSelect relationSelect = new SingleSelect(relationParam);
|
||||||
relationSelect.addValidationListener(new NotNullValidationListener());
|
relationSelect.addValidationListener(new NotNullValidationListener());
|
||||||
relationSelect.addOption(new Option("", new Label(ContenttypesGlobalizationUtil.globalize(
|
|
||||||
"cms.ui.select_one"))));
|
|
||||||
try {
|
try {
|
||||||
relationSelect.addPrintListener(new PrintListener() {
|
relationSelect.addPrintListener(new PrintListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void prepare(final PrintEvent event) {
|
public void prepare(final PrintEvent event) {
|
||||||
final SingleSelect target = (SingleSelect) event.getTarget();
|
final SingleSelect target = (SingleSelect) event.getTarget();
|
||||||
|
target.clearOptions();
|
||||||
|
target.addOption(new Option("", new Label(ContenttypesGlobalizationUtil.globalize(
|
||||||
|
"cms.ui.select_one"))));
|
||||||
final RelationAttributeCollection relations = new RelationAttributeCollection(
|
final RelationAttributeCollection relations = new RelationAttributeCollection(
|
||||||
SciPublicationsPersonsService.RELATION_ATTRIBUTE);
|
SciPublicationsPersonsService.RELATION_ATTRIBUTE);
|
||||||
relations.addLanguageFilter(Kernel.getConfig().getDefaultLanguage());
|
relations.addLanguageFilter(Kernel.getConfig().getDefaultLanguage());
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@
|
||||||
<line id="discussingPublications/heading">Wird in folgenden Publikationen behandelt</line>
|
<line id="discussingPublications/heading">Wird in folgenden Publikationen behandelt</line>
|
||||||
<line id="discussedPublications/heading">Behandelt folgende Publikationen</line>
|
<line id="discussedPublications/heading">Behandelt folgende Publikationen</line>
|
||||||
<line id="librarySignatures/heading">Bibliotheken</line>
|
<line id="librarySignatures/heading">Bibliotheken</line>
|
||||||
|
<line id="relatedPersons/heading">Personen in dieser Publikation</line>
|
||||||
|
|
||||||
<line id="assignedTerms">Schlüsselwörter</line>
|
<line id="assignedTerms">Schlüsselwörter</line>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@
|
||||||
<line id="assignedTerms">Keywords</line>
|
<line id="assignedTerms">Keywords</line>
|
||||||
|
|
||||||
<line id="librarySignatures/heading">Libraries</line>
|
<line id="librarySignatures/heading">Libraries</line>
|
||||||
|
<line id="relatedPersons/heading">Persons discussed by this publication</line>
|
||||||
|
|
||||||
<line id="articleInCollectedVolume/abstract">Abstract</line>
|
<line id="articleInCollectedVolume/abstract">Abstract</line>
|
||||||
<line id="articleInCollectedVolume/authors">Authors</line>
|
<line id="articleInCollectedVolume/authors">Authors</line>
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,12 @@ XSL file for displaying the informations from the related persons asset.
|
||||||
<xsl:if test="string-length(./titlepost) > 0">
|
<xsl:if test="string-length(./titlepost) > 0">
|
||||||
<xsl:text>, </xsl:text>
|
<xsl:text>, </xsl:text>
|
||||||
<xsl:value-of select="./titlepost"/>
|
<xsl:value-of select="./titlepost"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
<xsl:if test="string-length(./@relation) > 0">
|
||||||
|
<span>
|
||||||
|
<xsl:value-of select="concat(' (', ./@relation, ')')"/>
|
||||||
|
</span>
|
||||||
|
</xsl:if>
|
||||||
</li>
|
</li>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,7 @@ public class ArticleInJournalPropertyForm
|
||||||
com.arsdigita.bebop.form.Date pubDate =
|
com.arsdigita.bebop.form.Date pubDate =
|
||||||
new com.arsdigita.bebop.form.Date(
|
new com.arsdigita.bebop.form.Date(
|
||||||
pubDateParam);
|
pubDateParam);
|
||||||
|
pubDate.setYearAsc(false);
|
||||||
pubDate.setYearRange(1900, today.get(Calendar.YEAR) + 2);
|
pubDate.setYearRange(1900, today.get(Calendar.YEAR) + 2);
|
||||||
pubDate.setLabel(PublicationGlobalizationUtil.globalize(
|
pubDate.setLabel(PublicationGlobalizationUtil.globalize(
|
||||||
"publications.ui.articleinjournal.publicationDate"));
|
"publications.ui.articleinjournal.publicationDate"));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue