Ticket #1184: Sprache-Tab funktioniert nur mit JavaScript
Geändert: * getRelativeItemURL als deprecated markiert. Die beiden Aufrufe in ContentSoonExpiredPane und ItemLanguagesTable ersetzt durch getItemURL git-svn-id: https://svn.libreccm.org/ccm/trunk@2186 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
59dde5434e
commit
528508b556
|
|
@ -73,29 +73,27 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
public class ContentItemPage extends CMSPage implements ActionListener {
|
||||
|
||||
/** Private Logger instance for debugging purpose. */
|
||||
/**
|
||||
* Private Logger instance for debugging purpose.
|
||||
*/
|
||||
private static final Logger s_log = Logger.getLogger(ContentItemPage.class);
|
||||
/**
|
||||
* The URL parameter that must be passed in in order to set
|
||||
* the current tab. This is a KLUDGE right now because the
|
||||
* TabbedDialog's current tab is selected with a local
|
||||
* state parameter
|
||||
* The URL parameter that must be passed in in order to set the current tab.
|
||||
* This is a KLUDGE right now because the TabbedDialog's current tab is
|
||||
* selected with a local state parameter
|
||||
*/
|
||||
public static final String SET_TAB = "set_tab";
|
||||
/**
|
||||
* The name of the global state parameter that holds
|
||||
* the item id
|
||||
* The name of the global state parameter that holds the item id
|
||||
*/
|
||||
public static final String ITEM_ID = "item_id";
|
||||
/**
|
||||
* The name of the global state parameter which holds the
|
||||
* return URL
|
||||
* The name of the global state parameter which holds the return URL
|
||||
*/
|
||||
public static final String RETURN_URL = "return_url";
|
||||
/**
|
||||
* The name of the global state parameter that determines whether
|
||||
* or not to use the streamlined authoring process (assuming the
|
||||
* option is turned on).
|
||||
* The name of the global state parameter that determines whether or not to
|
||||
* use the streamlined authoring process (assuming the option is turned on).
|
||||
*
|
||||
*/
|
||||
public static final String STREAMLINED_CREATION = "streamlined_creation";
|
||||
|
|
@ -107,11 +105,11 @@ public class ContentItemPage extends CMSPage implements ActionListener {
|
|||
*/
|
||||
public static final int SUMMARY_TAB = s_tabOrder++;
|
||||
/**
|
||||
* <p>The name of the state parameter which indicates the content
|
||||
* type of the item the user wishes to create. or edit.</p>
|
||||
* <p>The name of the state parameter which indicates the content type of
|
||||
* the item the user wishes to create. or edit.</p>
|
||||
*
|
||||
* <p>The parameter must be a BigDecimalParameter which encodes
|
||||
* the id of the content type.</p>
|
||||
* <p>The parameter must be a BigDecimalParameter which encodes the id of
|
||||
* the content type.</p>
|
||||
*/
|
||||
public static final String CONTENT_TYPE = "content_type";
|
||||
public static final int AUTHORING_TAB = s_tabOrder++;
|
||||
|
|
@ -185,7 +183,6 @@ public class ContentItemPage extends CMSPage implements ActionListener {
|
|||
|
||||
// Validate the item ID parameter (caches the validation).
|
||||
getStateModel().addValidationListener(new FormValidationListener() {
|
||||
|
||||
public void validate(FormSectionEvent event)
|
||||
throws FormProcessException {
|
||||
validateItemID(event.getPageState());
|
||||
|
|
@ -231,7 +228,6 @@ public class ContentItemPage extends CMSPage implements ActionListener {
|
|||
m_templatesPane);
|
||||
|
||||
m_tabbedPane.addActionListener(new ActionListener() {
|
||||
|
||||
public final void actionPerformed(final ActionEvent e) {
|
||||
final PageState state = e.getPageState();
|
||||
final Component pane = m_tabbedPane.getCurrentPane(state);
|
||||
|
|
@ -245,7 +241,6 @@ public class ContentItemPage extends CMSPage implements ActionListener {
|
|||
// Build the preview link.
|
||||
m_previewLink = new Link(new Label(gz("cms.ui.preview")),
|
||||
new PrintListener() {
|
||||
|
||||
public final void prepare(final PrintEvent e) {
|
||||
final Link link = (Link) e.getTarget();
|
||||
link.setTarget(getPreviewURL(e.getPageState()));
|
||||
|
|
@ -259,7 +254,6 @@ public class ContentItemPage extends CMSPage implements ActionListener {
|
|||
|
||||
// Add validation to make sure we are not attempting to edit a live item
|
||||
getStateModel().addValidationListener(new FormValidationListener() {
|
||||
|
||||
public void validate(FormSectionEvent e) throws FormProcessException {
|
||||
PageState s = e.getPageState();
|
||||
FormData data = e.getFormData();
|
||||
|
|
@ -296,7 +290,8 @@ public class ContentItemPage extends CMSPage implements ActionListener {
|
|||
/**
|
||||
* Fetch the request-local content section.
|
||||
*
|
||||
* @deprecated use com.arsdigita.cms.CMS.getContext().getContentSection() instead
|
||||
* @deprecated use com.arsdigita.cms.CMS.getContext().getContentSection()
|
||||
* instead
|
||||
* @param request The HTTP request
|
||||
* @return The current content section
|
||||
*/
|
||||
|
|
@ -409,6 +404,7 @@ public class ContentItemPage extends CMSPage implements ActionListener {
|
|||
return url.toString();
|
||||
}
|
||||
|
||||
@deprecated use getItemURL(BigDecimal itemId, int tab) instead
|
||||
public static String getRelativeItemURL(BigDecimal itemId, int tab) {
|
||||
StringBuffer url = new StringBuffer();
|
||||
url.append(PageLocations.ITEM_PAGE).append("?").append(ITEM_ID).append("=").append(itemId.
|
||||
|
|
@ -453,8 +449,8 @@ public class ContentItemPage extends CMSPage implements ActionListener {
|
|||
}
|
||||
|
||||
/**
|
||||
* Redirect back to wherever the user came from, using the value
|
||||
* of the return_url parameter.
|
||||
* Redirect back to wherever the user came from, using the value of the
|
||||
* return_url parameter.
|
||||
*
|
||||
* @param state The current page state
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -214,7 +214,8 @@ public class ContentSoonExpiredPane extends SimpleContainer {
|
|||
}
|
||||
|
||||
Link l = (Link) threadLocal.get();
|
||||
l.setTarget(ContentItemPage.getRelativeItemURL(ContentSoonExpiredPane.getItemDraft(id.toString()), ContentItemPage.AUTHORING_TAB));
|
||||
// l.setTarget(ContentItemPage.getRelativeItemURL(ContentSoonExpiredPane.getItemDraft(id.toString()), ContentItemPage.AUTHORING_TAB));
|
||||
l.setTarget(ContentItemPage.getItemURL(ContentSoonExpiredPane.getItemFromIdString(id.toString()), ContentItemPage.AUTHORING_TAB));
|
||||
((Label) l.getChild()).setLabel(GlobalizationUtil.globalize("cms.ui.cse.editLink"));
|
||||
|
||||
return l;
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ public class ItemLanguagesTable extends DataTable {
|
|||
classes.append("primaryInstance");
|
||||
}
|
||||
|
||||
String target = ContentItemPage.getRelativeItemURL(id, ContentItemPage.AUTHORING_TAB);
|
||||
String target = ContentItemPage.getItemURL(cp, ContentItemPage.AUTHORING_TAB);
|
||||
Label langLabel = new Label(LanguageUtil.getLangFull((String) value));
|
||||
|
||||
langLabel.setFontWeight(fontWeight.toString().trim());
|
||||
|
|
|
|||
Loading…
Reference in New Issue