Verbesserung und Vervollständigung der multi-language Unterstützung.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2198 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
51756339c1
commit
ed68a29314
|
|
@ -5,22 +5,27 @@ cms.contenttypes.ui.mparticle.an_item_with_name_already_exists=An item with name
|
||||||
cms.contenttypes.ui.mparticle.an_item_with_this_name_already_exists=An item with this name already exists
|
cms.contenttypes.ui.mparticle.an_item_with_this_name_already_exists=An item with this name already exists
|
||||||
cms.contenttypes.ui.mparticle.article_summary=Article Summary
|
cms.contenttypes.ui.mparticle.article_summary=Article Summary
|
||||||
cms.contenttypes.ui.mparticle.article_title=Article Title
|
cms.contenttypes.ui.mparticle.article_title=Article Title
|
||||||
cms.contenttypes.ui.mparticle.body_text=Body text:
|
cms.contenttypes.ui.mparticle.section.text=Section text:
|
||||||
cms.contenttypes.ui.mparticle.caption=Caption:
|
cms.contenttypes.ui.mparticle.section.caption=Caption:
|
||||||
cms.contenttypes.ui.mparticle.current_image=Current image:
|
cms.contenttypes.ui.mparticle.current_image=Current image:
|
||||||
cms.contenttypes.ui.mparticle.delete_section=Delete section
|
cms.contenttypes.ui.mparticle.delete_section=Delete section
|
||||||
cms.contenttypes.ui.mparticle.edit_section=Edit Section
|
cms.contenttypes.ui.mparticle.edit_section=Edit Section
|
||||||
cms.contenttypes.ui.mparticle.image=Image:
|
cms.contenttypes.ui.mparticle.section.image=Image:
|
||||||
cms.contenttypes.ui.mparticle.move_section_name=Move section
|
cms.contenttypes.ui.mparticle.move_section_name=Move section: {0}
|
||||||
cms.contenttypes.ui.mparticle.move_to_beginning=Move to beginning
|
cms.contenttypes.ui.mparticle.move_to_beginning=Move to beginning
|
||||||
cms.contenttypes.ui.mparticle.name=Name:
|
|
||||||
cms.contenttypes.ui.mparticle.no_sections_yet=No sections yet
|
cms.contenttypes.ui.mparticle.no_sections_yet=No sections yet
|
||||||
cms.contenttypes.ui.mparticle.no_text_available=No Text Available
|
cms.contenttypes.ui.mparticle.no_text_available=No Text Available
|
||||||
cms.contenttypes.ui.mparticle.section_text_asset=Section text asset
|
cms.contenttypes.ui.mparticle.section_text_asset=Section text asset
|
||||||
cms.contenttypes.ui.mparticle.section_title=Section Title
|
cms.contenttypes.ui.mparticle.section.title=Section Title :
|
||||||
cms.contenttypes.ui.mparticle.select_image=Select image:
|
cms.contenttypes.ui.mparticle.section.select_image=Select image:
|
||||||
cms.contenttypes.ui.mparticle.submission_cancelled=Submission cancelled
|
cms.contenttypes.ui.mparticle.submission_cancelled=Submission cancelled
|
||||||
cms.contenttypes.ui.mparticle.summary=Description:
|
|
||||||
cms.contenttypes.ui.mparticle.title=Title:
|
|
||||||
cms.contenttypes.ui.mparticle.view_all_sections=View all sections
|
cms.contenttypes.ui.mparticle.view_all_sections=View all sections
|
||||||
cms.contenttypes.ui.mparticle.no_launch_date=launch date is required
|
cms.contenttypes.ui.mparticle.no_launch_date=launch date is required
|
||||||
|
cms.contenttypes.ui.mparticle.section_table.header_section=Section
|
||||||
|
cms.contenttypes.ui.mparticle.section_table.header_delete=Delete
|
||||||
|
cms.contenttypes.ui.mparticle.section_table.header_move=Move
|
||||||
|
cms.contenttypes.ui.mparticle.section_table.header_edit=Edit
|
||||||
|
cms.contenttypes.ui.mparticle.section_table.link_delete=delete
|
||||||
|
cms.contenttypes.ui.mparticle.section_table.link_move=move
|
||||||
|
cms.contenttypes.ui.mparticle.section_table.link_edit=edit
|
||||||
|
cms.contenttypes.ui.mparticle.section.create_break=Create page break
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,31 @@
|
||||||
mparticle.authoring.body_text.description=Edit the body text in sections
|
mparticle.authoring.body_text.description=Edit the body text in sections
|
||||||
cms.contenttypes.ui.mparticle.add_new_section=Neuen Abschnitt hinzuf\u00FCgen
|
cms.contenttypes.ui.mparticle.add_new_section=Neuen Abschnitt hinzuf\u00fcgen
|
||||||
cms.contenttypes.ui.mparticle.add_section=Abschnitt hinzuf\u00FCgen
|
cms.contenttypes.ui.mparticle.add_section=Abschnitt hinzuf\u00fcgen
|
||||||
cms.contenttypes.ui.mparticle.an_item_with_name_already_exists=Ein Element mit dem Namen existiert bereits.
|
cms.contenttypes.ui.mparticle.an_item_with_name_already_exists=Ein Element mit dem Namen existiert bereits.
|
||||||
cms.contenttypes.ui.mparticle.an_item_with_this_name_already_exists=Ein Element mit diesem Namen existiert bereits.
|
cms.contenttypes.ui.mparticle.an_item_with_this_name_already_exists=Ein Element mit diesem Namen existiert bereits.
|
||||||
cms.contenttypes.ui.mparticle.article_summary=Artikel Zusammenfassung
|
cms.contenttypes.ui.mparticle.article_summary=Artikel Zusammenfassung
|
||||||
cms.contenttypes.ui.mparticle.article_title=Articel Titel
|
cms.contenttypes.ui.mparticle.article_title=Articel Titel
|
||||||
cms.contenttypes.ui.mparticle.body_text=Haupttext:
|
cms.contenttypes.ui.mparticle.section.text=Abschnittstext:
|
||||||
cms.contenttypes.ui.mparticle.caption=Bildtext:
|
cms.contenttypes.ui.mparticle.section.caption=Bildtext:
|
||||||
cms.contenttypes.ui.mparticle.current_image=Aktuelles Bild:
|
cms.contenttypes.ui.mparticle.current_image=Aktuelles Bild:
|
||||||
cms.contenttypes.ui.mparticle.delete_section=Abschnitt l\u00F6schen
|
cms.contenttypes.ui.mparticle.delete_section=Abschnitt l\u00f6schen
|
||||||
cms.contenttypes.ui.mparticle.edit_section=Abschnitt bearbeiten
|
cms.contenttypes.ui.mparticle.edit_section=Abschnitt bearbeiten
|
||||||
cms.contenttypes.ui.mparticle.image=Bild:
|
cms.contenttypes.ui.mparticle.section.image=Bild:
|
||||||
cms.contenttypes.ui.mparticle.move_section_name=Abschnitt verschieben
|
cms.contenttypes.ui.mparticle.move_section_name=verschiebe Abschnitt: {0}
|
||||||
cms.contenttypes.ui.mparticle.move_to_beginning=An den Anfang verschieben
|
cms.contenttypes.ui.mparticle.move_to_beginning=An den Anfang verschieben
|
||||||
cms.contenttypes.ui.mparticle.name=Name:
|
|
||||||
cms.contenttypes.ui.mparticle.no_sections_yet=Zur Zeit keine Abschnitte
|
cms.contenttypes.ui.mparticle.no_sections_yet=Zur Zeit keine Abschnitte
|
||||||
cms.contenttypes.ui.mparticle.no_text_available=Kein Text verf\u00FCgbar
|
cms.contenttypes.ui.mparticle.no_text_available=Kein Text verf\u00fcgbar
|
||||||
cms.contenttypes.ui.mparticle.section_text_asset=Section text asset
|
cms.contenttypes.ui.mparticle.section_text_asset=Section text asset
|
||||||
cms.contenttypes.ui.mparticle.section_title=Section Title
|
cms.contenttypes.ui.mparticle.section.title=Titel des Abschnitts:
|
||||||
cms.contenttypes.ui.mparticle.select_image=Select image:
|
cms.contenttypes.ui.mparticle.section.select_image=Select image:
|
||||||
cms.contenttypes.ui.mparticle.submission_cancelled=Vorlage verworfen
|
cms.contenttypes.ui.mparticle.submission_cancelled=Vorlage verworfen
|
||||||
cms.contenttypes.ui.mparticle.summary=Beschreibung:
|
|
||||||
cms.contenttypes.ui.mparticle.title=Titel:
|
|
||||||
cms.contenttypes.ui.mparticle.view_all_sections=Alle Abschnitte anschauen
|
cms.contenttypes.ui.mparticle.view_all_sections=Alle Abschnitte anschauen
|
||||||
cms.contenttypes.ui.mparticle.no_launch_date=Ver\u00F6ffentlichungsdatum fehlt
|
cms.contenttypes.ui.mparticle.no_launch_date=Ver\u00f6ffentlichungsdatum fehlt
|
||||||
|
cms.contenttypes.ui.mparticle.section_table.header_section=Abschnitt
|
||||||
|
cms.contenttypes.ui.mparticle.section_table.header_delete=L\u00f6schen
|
||||||
|
cms.contenttypes.ui.mparticle.section_table.header_move=Verschieben
|
||||||
|
cms.contenttypes.ui.mparticle.section_table.header_edit=Bearbeiten
|
||||||
|
cms.contenttypes.ui.mparticle.section_table.link_delete=l\u00f6schen
|
||||||
|
cms.contenttypes.ui.mparticle.section_table.link_move=verschieben
|
||||||
|
cms.contenttypes.ui.mparticle.section_table.link_edit=bearbeiten
|
||||||
|
cms.contenttypes.ui.mparticle.section.create_break=Seitenumbruch einf\u00fcgen
|
||||||
|
|
|
||||||
|
|
@ -5,22 +5,27 @@ cms.contenttypes.ui.mparticle.an_item_with_name_already_exists=An item with name
|
||||||
cms.contenttypes.ui.mparticle.an_item_with_this_name_already_exists=An item with this name already exists
|
cms.contenttypes.ui.mparticle.an_item_with_this_name_already_exists=An item with this name already exists
|
||||||
cms.contenttypes.ui.mparticle.article_summary=Article Summary
|
cms.contenttypes.ui.mparticle.article_summary=Article Summary
|
||||||
cms.contenttypes.ui.mparticle.article_title=Article Title
|
cms.contenttypes.ui.mparticle.article_title=Article Title
|
||||||
cms.contenttypes.ui.mparticle.body_text=Body text:
|
cms.contenttypes.ui.mparticle.section.text=Section text:
|
||||||
cms.contenttypes.ui.mparticle.caption=Caption:
|
cms.contenttypes.ui.mparticle.section.caption=L\u00e9gende
|
||||||
cms.contenttypes.ui.mparticle.current_image=Current image:
|
cms.contenttypes.ui.mparticle.current_image=Current image:
|
||||||
cms.contenttypes.ui.mparticle.delete_section=Delete section
|
cms.contenttypes.ui.mparticle.delete_section=Delete section
|
||||||
cms.contenttypes.ui.mparticle.edit_section=Edit Section
|
cms.contenttypes.ui.mparticle.edit_section=Edit Section
|
||||||
cms.contenttypes.ui.mparticle.image=Image:
|
cms.contenttypes.ui.mparticle.section.image=Image:
|
||||||
cms.contenttypes.ui.mparticle.move_section_name=Move section
|
cms.contenttypes.ui.mparticle.move_section_name=Move section: {0}
|
||||||
cms.contenttypes.ui.mparticle.move_to_beginning=Move to beginning
|
cms.contenttypes.ui.mparticle.move_to_beginning=Move to beginning
|
||||||
cms.contenttypes.ui.mparticle.name=Name:
|
|
||||||
cms.contenttypes.ui.mparticle.no_sections_yet=No sections yet
|
cms.contenttypes.ui.mparticle.no_sections_yet=No sections yet
|
||||||
cms.contenttypes.ui.mparticle.no_text_available=No Text Available
|
cms.contenttypes.ui.mparticle.no_text_available=No Text Available
|
||||||
cms.contenttypes.ui.mparticle.section_text_asset=Section text asset
|
cms.contenttypes.ui.mparticle.section_text_asset=Section text asset
|
||||||
cms.contenttypes.ui.mparticle.section_title=Section Title
|
cms.contenttypes.ui.mparticle.section.title=Section Title:
|
||||||
cms.contenttypes.ui.mparticle.select_image=Select image:
|
cms.contenttypes.ui.mparticle.section.select_image=Select image:
|
||||||
cms.contenttypes.ui.mparticle.submission_cancelled=Submission cancelled
|
cms.contenttypes.ui.mparticle.submission_cancelled=Submission cancelled
|
||||||
cms.contenttypes.ui.mparticle.summary=Description:
|
|
||||||
cms.contenttypes.ui.mparticle.title=Title:
|
|
||||||
cms.contenttypes.ui.mparticle.view_all_sections=View all sections
|
cms.contenttypes.ui.mparticle.view_all_sections=View all sections
|
||||||
cms.contenttypes.ui.mparticle.no_launch_date=launch date is required
|
cms.contenttypes.ui.mparticle.no_launch_date=launch date is required
|
||||||
|
cms.contenttypes.ui.mparticle.section_table.header_section=Section
|
||||||
|
cms.contenttypes.ui.mparticle.section_table.header_delete=Delete
|
||||||
|
cms.contenttypes.ui.mparticle.section_table.header_move=Move
|
||||||
|
cms.contenttypes.ui.mparticle.section_table.header_edit=Edit
|
||||||
|
cms.contenttypes.ui.mparticle.section_table.link_delete=delete
|
||||||
|
cms.contenttypes.ui.mparticle.section_table.link_move=move
|
||||||
|
cms.contenttypes.ui.mparticle.section_table.link_edit=edit
|
||||||
|
cms.contenttypes.ui.mparticle.section.create_break=Create section break
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,8 @@ public class ArticleSectionPanel extends SimpleComponent implements
|
||||||
|
|
||||||
bundle = (ContentBundle) item;
|
bundle = (ContentBundle) item;
|
||||||
|
|
||||||
resolved = bundle.getInstance(GlobalizationHelper.getNegotiatedLocale().getLanguage());
|
resolved = bundle.getInstance(GlobalizationHelper
|
||||||
|
.getNegotiatedLocale().getLanguage());
|
||||||
if (resolved == null) {
|
if (resolved == null) {
|
||||||
resolved = bundle.getPrimaryInstance();
|
resolved = bundle.getPrimaryInstance();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,11 +81,11 @@ public class ImageUploadSection extends FormSection
|
||||||
add(m_deleteImage);
|
add(m_deleteImage);
|
||||||
add(new Label(
|
add(new Label(
|
||||||
MPArticleGlobalizationUtil
|
MPArticleGlobalizationUtil
|
||||||
.globalize("cms.contenttypes.ui.mparticle.select_image")));
|
.globalize("cms.contenttypes.ui.mparticle.section.select_image")));
|
||||||
add(new FileUpload(m_name + IMAGE));
|
add(new FileUpload(m_name + IMAGE));
|
||||||
add(new Label(
|
add(new Label(
|
||||||
MPArticleGlobalizationUtil
|
MPArticleGlobalizationUtil
|
||||||
.globalize("cms.contenttypes.ui.mparticle.caption")));
|
.globalize("cms.contenttypes.ui.mparticle.section.caption")));
|
||||||
TextField caption = new TextField(m_name + CAPTION);
|
TextField caption = new TextField(m_name + CAPTION);
|
||||||
caption.setSize(40);
|
caption.setSize(40);
|
||||||
add(caption);
|
add(caption);
|
||||||
|
|
@ -113,7 +113,8 @@ public class ImageUploadSection extends FormSection
|
||||||
FormData data = event.getFormData();
|
FormData data = event.getFormData();
|
||||||
PageState state = event.getPageState();
|
PageState state = event.getPageState();
|
||||||
|
|
||||||
ReusableImageAsset image = (ReusableImageAsset)m_selImage.getSelectedObject(state);
|
ReusableImageAsset image = (ReusableImageAsset)
|
||||||
|
m_selImage.getSelectedObject(state);
|
||||||
|
|
||||||
m_currentImage.setVisible(state, false);
|
m_currentImage.setVisible(state, false);
|
||||||
m_imageDisplay.setVisible(state, false);
|
m_imageDisplay.setVisible(state, false);
|
||||||
|
|
@ -171,7 +172,9 @@ public class ImageUploadSection extends FormSection
|
||||||
if ( image != null ) {
|
if ( image != null ) {
|
||||||
try {
|
try {
|
||||||
a = new ReusableImageAsset();
|
a = new ReusableImageAsset();
|
||||||
a.loadFromFile(getImageFilename(event), image, ReusableImageAsset.MIME_JPEG);
|
a.loadFromFile(getImageFilename(event),
|
||||||
|
image,
|
||||||
|
ReusableImageAsset.MIME_JPEG);
|
||||||
a.setDescription((String)data.get(m_name + CAPTION));
|
a.setDescription((String)data.get(m_name + CAPTION));
|
||||||
} catch ( Exception ex ) {
|
} catch ( Exception ex ) {
|
||||||
log.error("Could not load " + getImageFilename(event));
|
log.error("Could not load " + getImageFilename(event));
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ import com.arsdigita.cms.ui.authoring.CreationComponent;
|
||||||
import com.arsdigita.cms.ui.authoring.CreationSelector;
|
import com.arsdigita.cms.ui.authoring.CreationSelector;
|
||||||
import com.arsdigita.cms.ui.authoring.LanguageWidget;
|
import com.arsdigita.cms.ui.authoring.LanguageWidget;
|
||||||
import com.arsdigita.cms.ui.authoring.ApplyWorkflowFormSection;
|
import com.arsdigita.cms.ui.authoring.ApplyWorkflowFormSection;
|
||||||
|
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||||
import com.arsdigita.cms.contenttypes.util.MPArticleGlobalizationUtil;
|
import com.arsdigita.cms.contenttypes.util.MPArticleGlobalizationUtil;
|
||||||
import com.arsdigita.util.Assert;
|
import com.arsdigita.util.Assert;
|
||||||
|
|
||||||
|
|
@ -64,16 +65,16 @@ public class MultiPartArticleCreate extends MultiPartArticleForm
|
||||||
m_workflowSection.setCreationSelector(m_parent);
|
m_workflowSection.setCreationSelector(m_parent);
|
||||||
m_workflowSection.setContentType(m_itemModel.getContentType());
|
m_workflowSection.setContentType(m_itemModel.getContentType());
|
||||||
addSubmissionListener(this);
|
addSubmissionListener(this);
|
||||||
getSaveCancelSection().getSaveButton().setButtonLabel("Create");
|
getSaveCancelSection().getSaveButton().setButtonLabel(
|
||||||
|
GlobalizationUtil.globalize("cms.ui.create"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addWidgets() {
|
protected void addWidgets() {
|
||||||
m_workflowSection = new ApplyWorkflowFormSection();
|
m_workflowSection = new ApplyWorkflowFormSection();
|
||||||
add(m_workflowSection, ColumnPanel.INSERT);
|
add(m_workflowSection, ColumnPanel.INSERT);
|
||||||
add(new Label(
|
add(new Label(GlobalizationUtil
|
||||||
MPArticleGlobalizationUtil
|
.globalize("cms.ui.language.field")));
|
||||||
.globalize("cms.ui.language.field")));
|
|
||||||
add(new LanguageWidget(LANGUAGE));
|
add(new LanguageWidget(LANGUAGE));
|
||||||
super.addWidgets();
|
super.addWidgets();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,12 +25,13 @@ import com.arsdigita.cms.ContentPage;
|
||||||
import com.arsdigita.cms.ContentSection;
|
import com.arsdigita.cms.ContentSection;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.contenttypes.MultiPartArticle;
|
import com.arsdigita.cms.contenttypes.MultiPartArticle;
|
||||||
|
import com.arsdigita.cms.contenttypes.util.MPArticleGlobalizationUtil;
|
||||||
import com.arsdigita.domain.DomainObject;
|
import com.arsdigita.domain.DomainObject;
|
||||||
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
||||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
import com.arsdigita.cms.contenttypes.util.MPArticleGlobalizationUtil;
|
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||||
|
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
|
|
||||||
|
|
@ -75,14 +76,14 @@ public class MultiPartArticleEdit extends SimpleEditStep {
|
||||||
) {
|
) {
|
||||||
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
||||||
|
|
||||||
sheet.add( MPArticleGlobalizationUtil
|
sheet.add( GlobalizationUtil
|
||||||
.globalize("cms.contenttypes.ui.mparticle.name"),
|
.globalize("cms.contenttypes.ui.title"),
|
||||||
MultiPartArticle.NAME );
|
|
||||||
sheet.add( MPArticleGlobalizationUtil
|
|
||||||
.globalize("cms.contenttypes.ui.mparticle.title"),
|
|
||||||
MultiPartArticle.TITLE );
|
MultiPartArticle.TITLE );
|
||||||
|
sheet.add( GlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.name"),
|
||||||
|
MultiPartArticle.NAME );
|
||||||
if (!ContentSection.getConfig().getHideLaunchDate()) {
|
if (!ContentSection.getConfig().getHideLaunchDate()) {
|
||||||
sheet.add(MPArticleGlobalizationUtil
|
sheet.add(GlobalizationUtil
|
||||||
.globalize("cms.contenttypes.ui.launch_date"),
|
.globalize("cms.contenttypes.ui.launch_date"),
|
||||||
ContentPage.LAUNCH_DATE,
|
ContentPage.LAUNCH_DATE,
|
||||||
new DomainObjectPropertySheet.AttributeFormatter() {
|
new DomainObjectPropertySheet.AttributeFormatter() {
|
||||||
|
|
@ -94,13 +95,12 @@ public class MultiPartArticleEdit extends SimpleEditStep {
|
||||||
return DateFormat.getDateInstance(DateFormat.LONG)
|
return DateFormat.getDateInstance(DateFormat.LONG)
|
||||||
.format(page.getLaunchDate());
|
.format(page.getLaunchDate());
|
||||||
} else {
|
} else {
|
||||||
return "<i>unknown</i>";
|
return "unknown";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
sheet.add( MPArticleGlobalizationUtil
|
sheet.add( GlobalizationUtil.globalize("cms.contenttypes.ui.summary"),
|
||||||
.globalize("cms.contenttypes.ui.mparticle.summary"),
|
|
||||||
MultiPartArticle.SUMMARY );
|
MultiPartArticle.SUMMARY );
|
||||||
|
|
||||||
return sheet;
|
return sheet;
|
||||||
|
|
|
||||||
|
|
@ -63,8 +63,10 @@ import java.util.Date;
|
||||||
* @version $id$
|
* @version $id$
|
||||||
*/
|
*/
|
||||||
public abstract class MultiPartArticleForm extends FormSection
|
public abstract class MultiPartArticleForm extends FormSection
|
||||||
implements FormInitListener, FormProcessListener, FormValidationListener
|
implements FormInitListener,
|
||||||
{
|
FormProcessListener,
|
||||||
|
FormValidationListener {
|
||||||
|
|
||||||
protected ItemSelectionModel m_itemModel;
|
protected ItemSelectionModel m_itemModel;
|
||||||
protected SaveCancelSection m_saveCancelSection;
|
protected SaveCancelSection m_saveCancelSection;
|
||||||
|
|
||||||
|
|
@ -114,7 +116,8 @@ public abstract class MultiPartArticleForm extends FormSection
|
||||||
|
|
||||||
|
|
||||||
protected void addWidgets () {
|
protected void addWidgets () {
|
||||||
add(new Label(MPArticleGlobalizationUtil.globalize("cms.contenttypes.ui.mparticle.title")));
|
add(new Label(GlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.title")));
|
||||||
TextField titleWidget = new TextField(new TrimmedStringParameter(TITLE));
|
TextField titleWidget = new TextField(new TrimmedStringParameter(TITLE));
|
||||||
titleWidget.addValidationListener(new NotNullValidationListener());
|
titleWidget.addValidationListener(new NotNullValidationListener());
|
||||||
titleWidget.setOnFocus("if (this.form." + NAME + ".value == '') { " +
|
titleWidget.setOnFocus("if (this.form." + NAME + ".value == '') { " +
|
||||||
|
|
@ -126,7 +129,8 @@ public abstract class MultiPartArticleForm extends FormSection
|
||||||
);
|
);
|
||||||
add(titleWidget);
|
add(titleWidget);
|
||||||
|
|
||||||
add(new Label(MPArticleGlobalizationUtil.globalize("cms.contenttypes.ui.mparticle.name")));
|
add(new Label(GlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.name")));
|
||||||
TextField nameWidget = new TextField(new TrimmedStringParameter(NAME));
|
TextField nameWidget = new TextField(new TrimmedStringParameter(NAME));
|
||||||
nameWidget.addValidationListener(new NameValidationListener());
|
nameWidget.addValidationListener(new NameValidationListener());
|
||||||
nameWidget.setOnFocus("defaulting = false");
|
nameWidget.setOnFocus("defaulting = false");
|
||||||
|
|
@ -138,7 +142,8 @@ public abstract class MultiPartArticleForm extends FormSection
|
||||||
add(nameWidget);
|
add(nameWidget);
|
||||||
|
|
||||||
if (!ContentSection.getConfig().getHideLaunchDate()) {
|
if (!ContentSection.getConfig().getHideLaunchDate()) {
|
||||||
add(new Label(MPArticleGlobalizationUtil.globalize("cms.ui.authoring.page_launch_date")));
|
add(new Label(GlobalizationUtil
|
||||||
|
.globalize("cms.ui.authoring.page_launch_date")));
|
||||||
ParameterModel launchDateParam = new DateParameter(LAUNCH_DATE);
|
ParameterModel launchDateParam = new DateParameter(LAUNCH_DATE);
|
||||||
com.arsdigita.bebop.form.Date launchDate
|
com.arsdigita.bebop.form.Date launchDate
|
||||||
= new com.arsdigita.bebop.form.Date(launchDateParam);
|
= new com.arsdigita.bebop.form.Date(launchDateParam);
|
||||||
|
|
@ -150,11 +155,15 @@ public abstract class MultiPartArticleForm extends FormSection
|
||||||
add(launchDate);
|
add(launchDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
add(new Label(MPArticleGlobalizationUtil.globalize("cms.contenttypes.ui.mparticle.summary")));
|
add(new Label(GlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.summary")));
|
||||||
TextArea summaryWidget = new TextArea(new TrimmedStringParameter(SUMMARY));
|
TextArea summaryWidget = new TextArea(new TrimmedStringParameter(SUMMARY));
|
||||||
if (ContentSection.getConfig().mandatoryDescriptions()) {
|
if (ContentSection.getConfig().mandatoryDescriptions()) {
|
||||||
summaryWidget.addValidationListener(new NotEmptyValidationListener(GlobalizationUtil.globalize("cms.contenttypes.ui.description_missing")));
|
summaryWidget
|
||||||
}
|
.addValidationListener(new
|
||||||
|
NotEmptyValidationListener(GlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.description_missing")));
|
||||||
|
}
|
||||||
summaryWidget.setRows(5);
|
summaryWidget.setRows(5);
|
||||||
summaryWidget.setCols(30);
|
summaryWidget.setCols(30);
|
||||||
add(summaryWidget);
|
add(summaryWidget);
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,8 @@ public class MultiPartArticleViewSections extends ResettableContainer
|
||||||
|
|
||||||
private String m_typeIDStr;
|
private String m_typeIDStr;
|
||||||
|
|
||||||
public MultiPartArticleViewSections ( ItemSelectionModel selArticle, AuthoringKitWizard wizard) {
|
public MultiPartArticleViewSections ( ItemSelectionModel selArticle,
|
||||||
|
AuthoringKitWizard wizard) {
|
||||||
super();
|
super();
|
||||||
m_selArticle = selArticle;
|
m_selArticle = selArticle;
|
||||||
m_wizard = wizard;
|
m_wizard = wizard;
|
||||||
|
|
@ -129,13 +130,16 @@ public class MultiPartArticleViewSections extends ResettableContainer
|
||||||
|
|
||||||
m_sectionTable.setSectionModel(m_selSection);
|
m_sectionTable.setSectionModel(m_selSection);
|
||||||
|
|
||||||
Label emptyView = new Label(MPArticleGlobalizationUtil.globalize("cms.contenttypes.ui.mparticle.no_sections_yet"));
|
Label emptyView = new Label(MPArticleGlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.mparticle.no_sections_yet"));
|
||||||
m_sectionTable.setEmptyView(emptyView);
|
m_sectionTable.setEmptyView(emptyView);
|
||||||
|
|
||||||
m_moveSectionLabel = new Label ("Section Name");
|
m_moveSectionLabel = new Label (MPArticleGlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.mparticle.section.title"));
|
||||||
c.add(m_moveSectionLabel, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
c.add(m_moveSectionLabel, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
||||||
|
|
||||||
m_beginLink = new ActionLink( (String) MPArticleGlobalizationUtil.globalize("cms.contenttypes.ui.mparticle.move_to_beginning").localize());
|
m_beginLink = new ActionLink( MPArticleGlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.mparticle.move_to_beginning"));
|
||||||
c.add(m_beginLink);
|
c.add(m_beginLink);
|
||||||
|
|
||||||
m_beginLink.addActionListener ( new ActionListener() {
|
m_beginLink.addActionListener ( new ActionListener() {
|
||||||
|
|
@ -158,28 +162,34 @@ public class MultiPartArticleViewSections extends ResettableContainer
|
||||||
} else {
|
} else {
|
||||||
m_beginLink.setVisible(state, true);
|
m_beginLink.setVisible(state, true);
|
||||||
m_moveSectionLabel.setVisible(state, true);
|
m_moveSectionLabel.setVisible(state, true);
|
||||||
m_moveSectionLabel.setLabel
|
Object[] parmObj = {
|
||||||
((String) MPArticleGlobalizationUtil.globalize
|
((ArticleSection)m_moveSection.getSelectedObject(state))
|
||||||
("cms.contenttypes.ui.mparticle.move_section_name")
|
.getTitle()
|
||||||
.localize() + " "
|
};
|
||||||
+ ((ArticleSection)m_moveSection.getSelectedObject(state))
|
|
||||||
.getTitle(), state);
|
m_moveSectionLabel
|
||||||
|
.setLabel(MPArticleGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.mparticle.move_section_name",
|
||||||
|
parmObj )
|
||||||
|
, state
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// handle clicks to preview or delete a Section
|
// handle clicks to preview or delete a Section
|
||||||
m_sectionTable.addTableActionListener ( new TableActionListener () {
|
m_sectionTable.addTableActionListener ( new
|
||||||
|
TableActionListener () {
|
||||||
public void cellSelected ( TableActionEvent event ) {
|
public void cellSelected ( TableActionEvent event ) {
|
||||||
PageState state = event.getPageState();
|
PageState state = event.getPageState();
|
||||||
|
|
||||||
TableColumn col = m_sectionTable.getColumnModel()
|
TableColumn col = m_sectionTable.getColumnModel()
|
||||||
.get(event.getColumn().intValue());
|
.get(event.getColumn()
|
||||||
String colName = (String)col.getHeaderValue();
|
.intValue());
|
||||||
|
|
||||||
if ( SectionTable.COL_DEL.equals(colName) ) {
|
if (col.getModelIndex() == SectionTable.COL_INDEX_DELETE) {
|
||||||
onlyShowComponent(state, SECTION_DEL+m_typeIDStr);
|
onlyShowComponent(state, SECTION_DEL+m_typeIDStr);
|
||||||
} else if ( SectionTable.COL_EDIT.equals(colName) ) {
|
} else if (col.getModelIndex() == SectionTable.COL_INDEX_EDIT) {
|
||||||
onlyShowComponent(state, SECTION_EDIT+m_typeIDStr);
|
onlyShowComponent(state, SECTION_EDIT+m_typeIDStr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -215,9 +225,11 @@ public class MultiPartArticleViewSections extends ResettableContainer
|
||||||
Label label = (Label)event.getTarget();
|
Label label = (Label)event.getTarget();
|
||||||
|
|
||||||
if ( m_selSection.getSelectedKey(state) == null ) {
|
if ( m_selSection.getSelectedKey(state) == null ) {
|
||||||
label.setLabel( (String) MPArticleGlobalizationUtil.globalize("cms.contenttypes.ui.mparticle.add_section").localize());
|
label.setLabel(MPArticleGlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.mparticle.add_section"));
|
||||||
} else {
|
} else {
|
||||||
label.setLabel( (String) MPArticleGlobalizationUtil.globalize("cms.contenttypes.ui.mparticle.edit_section").localize());
|
label.setLabel(MPArticleGlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.mparticle.edit_section"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
@ -244,7 +256,8 @@ public class MultiPartArticleViewSections extends ResettableContainer
|
||||||
c.setBorderColor("#FFFFFF");
|
c.setBorderColor("#FFFFFF");
|
||||||
c.setPadColor("#FFFFFF");
|
c.setPadColor("#FFFFFF");
|
||||||
|
|
||||||
c.add(new Label(MPArticleGlobalizationUtil.globalize("cms.contenttypes.ui.mparticle.delete_section")));
|
c.add(new Label(MPArticleGlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.mparticle.delete_section")));
|
||||||
m_sectionDelete = new SectionDeleteForm(m_selArticle, m_selSection);
|
m_sectionDelete = new SectionDeleteForm(m_selArticle, m_selSection);
|
||||||
m_sectionDelete.addSubmissionListener ( new FormSubmissionListener () {
|
m_sectionDelete.addSubmissionListener ( new FormSubmissionListener () {
|
||||||
public void submitted ( FormSectionEvent e ) {
|
public void submitted ( FormSectionEvent e ) {
|
||||||
|
|
@ -264,7 +277,8 @@ public class MultiPartArticleViewSections extends ResettableContainer
|
||||||
* Utility method to create a link to display the section list.
|
* Utility method to create a link to display the section list.
|
||||||
*/
|
*/
|
||||||
protected ActionLink buildViewAllLink () {
|
protected ActionLink buildViewAllLink () {
|
||||||
ActionLink viewAllLink = new ActionLink( (String) MPArticleGlobalizationUtil.globalize("cms.contenttypes.ui.mparticle.view_all_sections").localize());
|
ActionLink viewAllLink = new ActionLink(MPArticleGlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.mparticle.view_all_sections"));
|
||||||
viewAllLink.setClassAttr(ACTION_LINK);
|
viewAllLink.setClassAttr(ACTION_LINK);
|
||||||
viewAllLink.addActionListener( new ActionListener() {
|
viewAllLink.addActionListener( new ActionListener() {
|
||||||
public void actionPerformed ( ActionEvent event ) {
|
public void actionPerformed ( ActionEvent event ) {
|
||||||
|
|
@ -280,7 +294,8 @@ public class MultiPartArticleViewSections extends ResettableContainer
|
||||||
* Utility method to create a link to display the section list.
|
* Utility method to create a link to display the section list.
|
||||||
*/
|
*/
|
||||||
protected ActionLink buildAddLink () {
|
protected ActionLink buildAddLink () {
|
||||||
ActionLink addLink = new ActionLink( (String) MPArticleGlobalizationUtil.globalize("cms.contenttypes.ui.mparticle.add_new_section").localize()) {
|
ActionLink addLink = new ActionLink(MPArticleGlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.mparticle.add_new_section")) {
|
||||||
public boolean isVisible(PageState state) {
|
public boolean isVisible(PageState state) {
|
||||||
SecurityManager sm = Utilities.getSecurityManager(state);
|
SecurityManager sm = Utilities.getSecurityManager(state);
|
||||||
ContentItem item = (ContentItem)m_selArticle.getSelectedObject(state);
|
ContentItem item = (ContentItem)m_selArticle.getSelectedObject(state);
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.contenttypes.ArticleSection;
|
import com.arsdigita.cms.contenttypes.ArticleSection;
|
||||||
import com.arsdigita.cms.contenttypes.MultiPartArticle;
|
import com.arsdigita.cms.contenttypes.MultiPartArticle;
|
||||||
import com.arsdigita.cms.contenttypes.util.MPArticleGlobalizationUtil;
|
import com.arsdigita.cms.contenttypes.util.MPArticleGlobalizationUtil;
|
||||||
|
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||||
import com.arsdigita.util.Assert;
|
import com.arsdigita.util.Assert;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
|
|
@ -78,7 +79,8 @@ public class SectionDeleteForm extends Form
|
||||||
|
|
||||||
protected SaveCancelSection addSaveCancelSection () {
|
protected SaveCancelSection addSaveCancelSection () {
|
||||||
m_saveCancelSection = new SaveCancelSection();
|
m_saveCancelSection = new SaveCancelSection();
|
||||||
m_saveCancelSection.getSaveButton().setButtonLabel("Delete");
|
m_saveCancelSection.getSaveButton().setButtonLabel(
|
||||||
|
GlobalizationUtil.globalize("cms.ui.delete"));
|
||||||
add(m_saveCancelSection, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
add(m_saveCancelSection, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
||||||
return m_saveCancelSection;
|
return m_saveCancelSection;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -159,14 +159,14 @@ public class SectionEditForm extends Form {
|
||||||
*/
|
*/
|
||||||
protected void addWidgets() {
|
protected void addWidgets() {
|
||||||
add(new Label(MPArticleGlobalizationUtil
|
add(new Label(MPArticleGlobalizationUtil
|
||||||
.globalize("cms.contenttypes.ui.mparticle.title")));
|
.globalize("cms.contenttypes.ui.mparticle.section.title")));
|
||||||
TextField titleWidget = new TextField(
|
TextField titleWidget = new TextField(
|
||||||
new TrimmedStringParameter(TITLE));
|
new TrimmedStringParameter(TITLE));
|
||||||
titleWidget.addValidationListener(new NotNullValidationListener());
|
titleWidget.addValidationListener(new NotNullValidationListener());
|
||||||
add(titleWidget);
|
add(titleWidget);
|
||||||
|
|
||||||
add(new Label(MPArticleGlobalizationUtil
|
add(new Label(MPArticleGlobalizationUtil
|
||||||
.globalize("cms.contenttypes.ui.mparticle.body_text")),
|
.globalize("cms.contenttypes.ui.mparticle.section.text")),
|
||||||
ColumnPanel.LEFT | ColumnPanel.FULL_WIDTH);
|
ColumnPanel.LEFT | ColumnPanel.FULL_WIDTH);
|
||||||
CMSDHTMLEditor textWidget =
|
CMSDHTMLEditor textWidget =
|
||||||
new CMSDHTMLEditor(new TrimmedStringParameter(TEXT));
|
new CMSDHTMLEditor(new TrimmedStringParameter(TEXT));
|
||||||
|
|
@ -177,15 +177,16 @@ public class SectionEditForm extends Form {
|
||||||
ColumnPanel.LEFT | ColumnPanel.FULL_WIDTH);
|
ColumnPanel.LEFT | ColumnPanel.FULL_WIDTH);
|
||||||
|
|
||||||
add(new Label(MPArticleGlobalizationUtil
|
add(new Label(MPArticleGlobalizationUtil
|
||||||
.globalize("cms.contenttypes.ui.mparticle.image")),
|
.globalize("cms.contenttypes.ui.mparticle.section.image")),
|
||||||
ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
||||||
|
|
||||||
m_imageUpload = new ImageUploadSection("image", m_selImage);
|
m_imageUpload = new ImageUploadSection("image", m_selImage);
|
||||||
add(m_imageUpload, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
add(m_imageUpload, ColumnPanel.FULL_WIDTH | ColumnPanel.LEFT);
|
||||||
|
|
||||||
add(new Label(""));
|
add(new Label(""));
|
||||||
CheckboxGroup pageBreak = new CheckboxGroup(PAGE_BREAK);
|
CheckboxGroup pageBreak = new CheckboxGroup(PAGE_BREAK);
|
||||||
pageBreak.addOption(new Option("true", "Create page break"));
|
pageBreak.addOption(new Option("true",
|
||||||
|
new Label(MPArticleGlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.mparticle.section.create_break")) ));
|
||||||
add(pageBreak);
|
add(pageBreak);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -316,7 +317,8 @@ public class SectionEditForm extends Form {
|
||||||
section.setPageBreak(pageBreak);
|
section.setPageBreak(pageBreak);
|
||||||
|
|
||||||
// get the image asset
|
// get the image asset
|
||||||
ReusableImageAsset reusableImageAsset = m_imageUpload.processImageUpload(event);
|
ReusableImageAsset reusableImageAsset =
|
||||||
|
m_imageUpload.processImageUpload(event);
|
||||||
if ( reusableImageAsset != null ) {
|
if ( reusableImageAsset != null ) {
|
||||||
section.setImage(reusableImageAsset);
|
section.setImage(reusableImageAsset);
|
||||||
m_selImage.setSelectedObject(state, reusableImageAsset);
|
m_selImage.setSelectedObject(state, reusableImageAsset);
|
||||||
|
|
|
||||||
|
|
@ -38,9 +38,11 @@ import com.arsdigita.cms.contenttypes.ArticleSection;
|
||||||
import com.arsdigita.cms.contenttypes.ArticleSectionCollection;
|
import com.arsdigita.cms.contenttypes.ArticleSectionCollection;
|
||||||
import com.arsdigita.cms.contenttypes.MultiPartArticle;
|
import com.arsdigita.cms.contenttypes.MultiPartArticle;
|
||||||
import com.arsdigita.cms.dispatcher.Utilities;
|
import com.arsdigita.cms.dispatcher.Utilities;
|
||||||
|
import com.arsdigita.cms.contenttypes.util.MPArticleGlobalizationUtil;
|
||||||
import com.arsdigita.domain.DomainObjectFactory;
|
import com.arsdigita.domain.DomainObjectFactory;
|
||||||
import com.arsdigita.persistence.OID;
|
import com.arsdigita.persistence.OID;
|
||||||
import com.arsdigita.util.LockableImpl;
|
import com.arsdigita.util.LockableImpl;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
@ -58,11 +60,11 @@ public class SectionTable extends Table
|
||||||
private static final Logger log =
|
private static final Logger log =
|
||||||
Logger.getLogger(SectionTable.class.getName());
|
Logger.getLogger(SectionTable.class.getName());
|
||||||
|
|
||||||
// column headings
|
// match columns by (symbolic) index, makes for easier reordering
|
||||||
public static final String COL_TITLE = "Section";
|
public static final int COL_INDEX_TITLE = 0; // "Section";
|
||||||
public static final String COL_EDIT = "Edit";
|
public static final int COL_INDEX_EDIT = 1; // "Edit";
|
||||||
public static final String COL_MOVE = "Move";
|
public static final int COL_INDEX_MOVE = 2; // "Move";
|
||||||
public static final String COL_DEL = "Delete";
|
public static final int COL_INDEX_DELETE = 3; // "Delete";
|
||||||
|
|
||||||
private ItemSelectionModel m_selArticle;
|
private ItemSelectionModel m_selArticle;
|
||||||
private ItemSelectionModel m_selSection;
|
private ItemSelectionModel m_selSection;
|
||||||
|
|
@ -83,10 +85,26 @@ public class SectionTable extends Table
|
||||||
m_moveSection = moveSection;
|
m_moveSection = moveSection;
|
||||||
|
|
||||||
TableColumnModel model = getColumnModel();
|
TableColumnModel model = getColumnModel();
|
||||||
model.add( new TableColumn( 0, COL_TITLE ));
|
model.add( new TableColumn(
|
||||||
model.add( new TableColumn( 1, COL_EDIT ));
|
COL_INDEX_TITLE,
|
||||||
model.add( new TableColumn( 2, COL_MOVE ));
|
new Label(MPArticleGlobalizationUtil.globalize(
|
||||||
model.add( new TableColumn( 3, COL_DEL ));
|
"cms.contenttypes.ui.mparticle.section_table.header_section")
|
||||||
|
) ));
|
||||||
|
model.add( new TableColumn(
|
||||||
|
COL_INDEX_EDIT,
|
||||||
|
new Label(MPArticleGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.mparticle.section_table.header_edit")
|
||||||
|
) ));
|
||||||
|
model.add( new TableColumn(
|
||||||
|
COL_INDEX_MOVE,
|
||||||
|
new Label(MPArticleGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.mparticle.section_table.header_move")
|
||||||
|
) ));
|
||||||
|
model.add( new TableColumn(
|
||||||
|
COL_INDEX_DELETE,
|
||||||
|
new Label(MPArticleGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.mparticle.section_table.header_delete")
|
||||||
|
) ));
|
||||||
|
|
||||||
model.get(1).setCellRenderer(new SectionTableCellRenderer(true));
|
model.get(1).setCellRenderer(new SectionTableCellRenderer(true));
|
||||||
model.get(2).setCellRenderer(new SectionTableCellRenderer(true));
|
model.get(2).setCellRenderer(new SectionTableCellRenderer(true));
|
||||||
|
|
@ -99,13 +117,14 @@ public class SectionTable extends Table
|
||||||
public void cellSelected ( TableActionEvent event ) {
|
public void cellSelected ( TableActionEvent event ) {
|
||||||
PageState state = event.getPageState();
|
PageState state = event.getPageState();
|
||||||
|
|
||||||
TableColumn col = getColumnModel()
|
TableColumn col = getColumnModel().get(event.getColumn()
|
||||||
.get(event.getColumn().intValue());
|
.intValue());
|
||||||
String colName = (String)col.getHeaderValue();
|
|
||||||
|
|
||||||
if ( COL_MOVE.equals(colName) ) {
|
if ( col.getModelIndex() == COL_INDEX_MOVE ) {
|
||||||
if ( m_moveSection.getSelectedKey(state) == null ) {
|
if ( m_moveSection.getSelectedKey(state) == null ) {
|
||||||
m_moveSection.setSelectedKey(state, m_selSection.getSelectedKey(state));
|
m_moveSection.setSelectedKey(state,
|
||||||
|
m_selSection
|
||||||
|
.getSelectedKey(state));
|
||||||
} else {
|
} else {
|
||||||
MultiPartArticle article = (MultiPartArticle)
|
MultiPartArticle article = (MultiPartArticle)
|
||||||
m_selArticle.getSelectedObject(state);
|
m_selArticle.getSelectedObject(state);
|
||||||
|
|
@ -153,8 +172,6 @@ public class SectionTable extends Table
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The model builder to generate a suitable model for the SectionTable
|
* The model builder to generate a suitable model for the SectionTable
|
||||||
*/
|
*/
|
||||||
|
|
@ -175,7 +192,8 @@ public class SectionTable extends Table
|
||||||
public TableModel makeModel ( Table table, PageState state ) {
|
public TableModel makeModel ( Table table, PageState state ) {
|
||||||
table.getRowSelectionModel().clearSelection(state);
|
table.getRowSelectionModel().clearSelection(state);
|
||||||
|
|
||||||
MultiPartArticle article = (MultiPartArticle)m_selArticle.getSelectedObject(state);
|
MultiPartArticle article = (MultiPartArticle)m_selArticle
|
||||||
|
.getSelectedObject(state);
|
||||||
|
|
||||||
return new SectionTableModel(table, state, article, m_moveSection);
|
return new SectionTableModel(table, state, article, m_moveSection);
|
||||||
}
|
}
|
||||||
|
|
@ -202,7 +220,8 @@ public class SectionTable extends Table
|
||||||
* @param moveSection
|
* @param moveSection
|
||||||
*/
|
*/
|
||||||
public SectionTableModel ( Table table, PageState state,
|
public SectionTableModel ( Table table, PageState state,
|
||||||
MultiPartArticle article, ItemSelectionModel moveSection ) {
|
MultiPartArticle article,
|
||||||
|
ItemSelectionModel moveSection ) {
|
||||||
m_colModel = table.getColumnModel();
|
m_colModel = table.getColumnModel();
|
||||||
m_state = state;
|
m_state = state;
|
||||||
m_sections = article.getSections();
|
m_sections = article.getSections();
|
||||||
|
|
@ -215,8 +234,8 @@ public class SectionTable extends Table
|
||||||
return m_colModel.size();
|
return m_colModel.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Move to the next row and return true if the model is now positioned on
|
/** Move to the next row and return true if the model is now positioned
|
||||||
* a valid row.
|
* on a valid row.
|
||||||
*/
|
*/
|
||||||
public boolean nextRow () {
|
public boolean nextRow () {
|
||||||
if ( m_sections.next() ) {
|
if ( m_sections.next() ) {
|
||||||
|
|
@ -226,21 +245,24 @@ public class SectionTable extends Table
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return the data element for the given column and the current row. */
|
/**
|
||||||
public Object getElementAt ( int columnIndex ) {
|
* Return the data element for the given column and the current row.
|
||||||
|
*/
|
||||||
|
public Object getElementAt( int columnIndex ) {
|
||||||
|
|
||||||
if ( m_colModel == null ) { return null; }
|
if ( m_colModel == null ) { return null; }
|
||||||
|
|
||||||
// match columns by name... makes for easier reordering
|
// match columns by (symbolic) index, makes for easier reordering
|
||||||
TableColumn col = m_colModel.get(columnIndex);
|
if ( columnIndex == COL_INDEX_TITLE ) {
|
||||||
String colName = (String)col.getHeaderValue();
|
|
||||||
|
|
||||||
if ( COL_TITLE.equals(colName) ) {
|
|
||||||
return m_section.getTitle();
|
return m_section.getTitle();
|
||||||
} else if ( COL_EDIT.equals(colName) ) {
|
} else if ( columnIndex == COL_INDEX_EDIT ) {
|
||||||
return "edit";
|
return "edit";
|
||||||
} else if ( COL_DEL.equals(colName) ) {
|
//return new Label(MPArticleGlobalizationUtil.globalize(
|
||||||
|
// "cms.contenttypes.ui.mparticle.section_table.link_edit")
|
||||||
|
// );
|
||||||
|
} else if ( columnIndex == COL_INDEX_DELETE ) {
|
||||||
return "delete";
|
return "delete";
|
||||||
} else if ( COL_MOVE.equals(colName) ) {
|
} else if ( columnIndex == COL_INDEX_MOVE ) {
|
||||||
if ( m_moveSection.getSelectedKey(m_state) == null ) {
|
if ( m_moveSection.getSelectedKey(m_state) == null ) {
|
||||||
return "move";
|
return "move";
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -251,7 +273,9 @@ public class SectionTable extends Table
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return the key for the given column and the current row. */
|
/**
|
||||||
|
* Return the key for the given column and the current row.
|
||||||
|
*/
|
||||||
public Object getKeyAt ( int columnIndex ) {
|
public Object getKeyAt ( int columnIndex ) {
|
||||||
return m_section.getID();
|
return m_section.getID();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ cms.contenttypes.ui.contact.attach_person=Attach Person
|
||||||
cms.contenttypes.ui.contact.edit_person=Edit Person
|
cms.contenttypes.ui.contact.edit_person=Edit Person
|
||||||
cms.contenttypes.ui.contact.reattach_person=Reattach Person
|
cms.contenttypes.ui.contact.reattach_person=Reattach Person
|
||||||
cms.contenttypes.ui.contact.delete_person=Delete Person
|
cms.contenttypes.ui.contact.delete_person=Delete Person
|
||||||
cms.contenttypes.ui.contact.emptyPerson=There is no Address attached
|
cms.contenttypes.ui.contact.emptyPerson=There is no Person attached
|
||||||
cms.contenttypes.ui.contact.select_person=Please select a Person content type
|
cms.contenttypes.ui.contact.select_person=Please select a Person content type
|
||||||
cms.contenttypes.ui.contact.select_person.add=Add
|
cms.contenttypes.ui.contact.select_person.add=Add
|
||||||
cms.contenttypes.ui.contact.select_person.change=Change
|
cms.contenttypes.ui.contact.select_person.change=Change
|
||||||
|
|
|
||||||
|
|
@ -8,19 +8,20 @@
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.cms.contenttypes.ui;
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
import com.arsdigita.bebop.PageState;
|
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
|
||||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
|
||||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
|
||||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
|
||||||
import com.arsdigita.domain.DomainObject;
|
|
||||||
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
|
||||||
import com.arsdigita.bebop.Component;
|
import com.arsdigita.bebop.Component;
|
||||||
import com.arsdigita.bebop.Label;
|
import com.arsdigita.bebop.Label;
|
||||||
|
import com.arsdigita.bebop.PageState;
|
||||||
import com.arsdigita.cms.contenttypes.GenericAddress;
|
import com.arsdigita.cms.contenttypes.GenericAddress;
|
||||||
import com.arsdigita.cms.contenttypes.GenericContact;
|
import com.arsdigita.cms.contenttypes.GenericContact;
|
||||||
import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
|
import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
|
||||||
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
|
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||||
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
|
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||||
|
import com.arsdigita.domain.DomainObject;
|
||||||
|
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -124,7 +125,7 @@ public class GenericContactAddressPropertiesStep extends SimpleEditStep {
|
||||||
return GenericAddress.getCountryNameFromIsoCode(Address.
|
return GenericAddress.getCountryNameFromIsoCode(Address.
|
||||||
getIsoCountryCode());
|
getIsoCountryCode());
|
||||||
} else {
|
} else {
|
||||||
return (String) ContenttypesGlobalizationUtil.globalize(
|
return (String) GlobalizationUtil.globalize(
|
||||||
"cms.ui.unknown").localize();
|
"cms.ui.unknown").localize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ import com.arsdigita.bebop.parameters.StringParameter;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.RelationAttribute;
|
import com.arsdigita.cms.RelationAttribute;
|
||||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
|
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||||
import com.arsdigita.cms.contenttypes.GenericContact;
|
import com.arsdigita.cms.contenttypes.GenericContact;
|
||||||
import com.arsdigita.cms.contenttypes.GenericContactTypeCollection;
|
import com.arsdigita.cms.contenttypes.GenericContactTypeCollection;
|
||||||
import com.arsdigita.cms.contenttypes.GenericPerson;
|
import com.arsdigita.cms.contenttypes.GenericPerson;
|
||||||
|
|
@ -39,7 +40,10 @@ import org.apache.log4j.Logger;
|
||||||
*
|
*
|
||||||
* @author quasi
|
* @author quasi
|
||||||
*/
|
*/
|
||||||
public class GenericContactEditPersonPropertyForm extends BasicPageForm implements FormProcessListener, FormInitListener, FormSubmissionListener {
|
public class GenericContactEditPersonPropertyForm extends BasicPageForm
|
||||||
|
implements FormProcessListener,
|
||||||
|
FormInitListener,
|
||||||
|
FormSubmissionListener {
|
||||||
|
|
||||||
private static final Logger logger = Logger.getLogger(GenericContactPropertyForm.class);
|
private static final Logger logger = Logger.getLogger(GenericContactPropertyForm.class);
|
||||||
private GenericContactPersonPropertiesStep m_step;
|
private GenericContactPersonPropertiesStep m_step;
|
||||||
|
|
@ -118,7 +122,7 @@ public class GenericContactEditPersonPropertyForm extends BasicPageForm implemen
|
||||||
contactType.addValidationListener(new NotNullValidationListener());
|
contactType.addValidationListener(new NotNullValidationListener());
|
||||||
contactType.addOption(new
|
contactType.addOption(new
|
||||||
Option("",
|
Option("",
|
||||||
new Label(ContenttypesGlobalizationUtil
|
new Label(GlobalizationUtil
|
||||||
.globalize("cms.ui.select_one"))));
|
.globalize("cms.ui.select_one"))));
|
||||||
|
|
||||||
// Add the Options to the SingleSelect widget
|
// Add the Options to the SingleSelect widget
|
||||||
|
|
|
||||||
|
|
@ -26,13 +26,14 @@ import com.arsdigita.bebop.form.SingleSelect;
|
||||||
import com.arsdigita.bebop.form.TextField;
|
import com.arsdigita.bebop.form.TextField;
|
||||||
import com.arsdigita.bebop.parameters.NotNullValidationListener;
|
import com.arsdigita.bebop.parameters.NotNullValidationListener;
|
||||||
import com.arsdigita.bebop.parameters.ParameterModel;
|
import com.arsdigita.bebop.parameters.ParameterModel;
|
||||||
|
import com.arsdigita.bebop.parameters.StringParameter;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.contenttypes.GenericContact;
|
import com.arsdigita.cms.contenttypes.GenericContact;
|
||||||
import com.arsdigita.cms.contenttypes.GenericContactEntry;
|
import com.arsdigita.cms.contenttypes.GenericContactEntry;
|
||||||
import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
|
import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
|
||||||
import com.arsdigita.cms.ui.authoring.BasicItemForm;
|
|
||||||
import com.arsdigita.bebop.parameters.StringParameter;
|
|
||||||
import com.arsdigita.cms.contenttypes.GenericContactEntryKeys;
|
import com.arsdigita.cms.contenttypes.GenericContactEntryKeys;
|
||||||
|
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||||
|
import com.arsdigita.cms.ui.authoring.BasicItemForm;
|
||||||
|
|
||||||
import com.arsdigita.globalization.GlobalizationHelper;
|
import com.arsdigita.globalization.GlobalizationHelper;
|
||||||
|
|
||||||
|
|
@ -63,7 +64,7 @@ public class GenericContactEntryAddForm extends BasicItemForm {
|
||||||
ParameterModel contactEntryKeyParam = new StringParameter(GenericContactEntry.KEY);
|
ParameterModel contactEntryKeyParam = new StringParameter(GenericContactEntry.KEY);
|
||||||
SingleSelect contactEntryKey = new SingleSelect(contactEntryKeyParam);
|
SingleSelect contactEntryKey = new SingleSelect(contactEntryKeyParam);
|
||||||
contactEntryKey.addValidationListener(new NotNullValidationListener());
|
contactEntryKey.addValidationListener(new NotNullValidationListener());
|
||||||
contactEntryKey.addOption(new Option("", new Label((String)ContenttypesGlobalizationUtil.globalize("cms.ui.select_one").localize())));
|
contactEntryKey.addOption(new Option("", new Label((String)GlobalizationUtil.globalize("cms.ui.select_one").localize())));
|
||||||
|
|
||||||
// Add the Options to the SingleSelect widget
|
// Add the Options to the SingleSelect widget
|
||||||
GenericContactEntryKeys keyList = new GenericContactEntryKeys();
|
GenericContactEntryKeys keyList = new GenericContactEntryKeys();
|
||||||
|
|
|
||||||
|
|
@ -136,8 +136,8 @@ public class GenericContactPropertiesStep extends SimpleEditStep {
|
||||||
/* The DisplayComponent for the Basic Properties */
|
/* The DisplayComponent for the Basic Properties */
|
||||||
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
||||||
|
|
||||||
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.name"), "name");
|
|
||||||
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.title"), "title");
|
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.title"), "title");
|
||||||
|
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.name"), "name");
|
||||||
|
|
||||||
if (!ContentSection.getConfig().getHideLaunchDate()) {
|
if (!ContentSection.getConfig().getHideLaunchDate()) {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue