diff --git a/ccm-cms/src/com/arsdigita/cms/CMSResources.properties b/ccm-cms/src/com/arsdigita/cms/CMSResources.properties index f417b9a6d..33a5814bd 100755 --- a/ccm-cms/src/com/arsdigita/cms/CMSResources.properties +++ b/ccm-cms/src/com/arsdigita/cms/CMSResources.properties @@ -1090,7 +1090,7 @@ cms.ui.template_not_supportet=The selected mime type is not supported cms.ui.uploaded_file_not_properly_formatted=The uploaded file is not properly formatted XML: cms.ui.unique_string_violation=Unique string value constraint violation. cms.ui.unique_item_name_violation=An item with this name already exists. -= +cms.ui.lifecycle.publish.not_possible_abstract_category=This item can't be (re-)published because it is assigned to an abstract category (a category to which you can't assign items). cms.ui.item_searchwidget.submit=item search FormSection submit cms.ui.workflow.task.approval_or_reject_required=Approval or rejection is required. cms.ui.type.cancelled=Cancelled @@ -1106,3 +1106,4 @@ cms.ui.authoring.invalid_file_type=Files with invalide type connot be loaded int cms.ui.authoring.couldnt_convert_missing_inso=Could not convert to html format because interMedia INSO filter is not installed cms.ui.authoring.couldnt_convert_inso_failed=Could not convert to html format because interMedia INSO filter conversion failed cms.ui.authoring.html_file_missing_body_tags=The file (which should be type HTML) is missing the
or tag. +cms.ui.lifecycle.publish.not_possible_abstract_category\ = diff --git a/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties b/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties index aaee842dd..32008db32 100755 --- a/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties +++ b/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties @@ -1084,7 +1084,7 @@ cms.ui.template_not_supportet=Das ausgew\u00e4hlte Template(mime type) wird nich cms.ui.uploaded_file_not_properly_formatted=Die hochgeladene Datei ist fehlerhaft cms.ui.unique_string_violation=String bereits vergeben. cms.ui.unique_item_name_violation=Ein Item mit diesem Namen existiert bereits. -= +cms.ui.lifecycle.publish.not_possible_abstract_category=Dieses Dokument kann nicht (re-)publiziert werden, da es einer abstrakten Kategorie (einer Kategorie der keine Items mehr zugeordnet werden k\u00f6nnen) zugeordnet ist. cms.ui.item_searchwidget.submit=item search FormSection submit cms.ui.workflow.task.approval_or_reject_required=Ablehnung oder Zustimmung ist ben\u00f6tigt cms.ui.type.cancelled=Abgebrochen @@ -1100,3 +1100,4 @@ cms.ui.authoring.invalid_file_type=Dateien mit ung\u00fcltigem Typ k\u00f6nnen n cms.ui.authoring.couldnt_convert_missing_inso=Konnte nicht ins html Format umgewandelt werden, da der interMedia INSO Filter nicht installiert ist cms.ui.authoring.couldnt_convert_inso_failed=Konnte nicht ins html Format umgewandelt werden, da die interMedia INSO Umwandlung fehlschlug cms.ui.authoring.html_file_missing_body_tags=Der Datei (vom Type HTML) fehlt der oder Tag +cms.ui.lifecycle.publish.not_possible_abstract_category\ = diff --git a/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties b/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties index a66dd1f36..18d923a43 100755 --- a/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties +++ b/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties @@ -127,7 +127,7 @@ cms.ui.template_not_supportet=The selected mime type is not supported cms.ui.uploaded_file_not_properly_formatted=The uploaded file is not properly formatted XML: cms.ui.unique_string_violation=Unique string value constraint violation. cms.ui.unique_item_name_violation=An item with this name already exists. -= +cms.ui.lifecycle.publish.not_possible_abstract_category=This item can't be (re-)published because it is assigned to an abstract category (a category to which you can't assign items). cms.ui.item_searchwidget.submit=item search FormSection submit cms.ui.workflow.task.approval_or_reject_required=Approval or rejection is required. cms.ui.type.name_not_unique=Name not unique @@ -144,3 +144,4 @@ cms.ui.authoring.invalid_file_type= cms.ui.authoring.couldnt_convert_missing_inso= cms.ui.authoring.couldnt_convert_inso_failed= cms.ui.authoring.html_file_missing_body_tags= +cms.ui.lifecycle.publish.not_possible_abstract_category\ = diff --git a/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties b/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties index 844c117f3..52e900951 100755 --- a/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties +++ b/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties @@ -596,7 +596,7 @@ cms.ui.template_not_supportet=The selected mime type is not supported cms.ui.uploaded_file_not_properly_formatted=The uploaded file is not properly formatted XML: cms.ui.unique_string_violation= cms.ui.unique_item_name_violation= -= +cms.ui.lifecycle.publish.not_possible_abstract_category=This item can't be (re-)published because it is assigned to an abstract category (a category to which you can't assign items). cms.ui.item_searchwidget.submit=item search FormSection submit cms.ui.workflow.task.approval_or_reject_required=Approval or rejection is required. cms.ui.type.name_not_unique=Ce type de contenu a d\u00e9ja un \u00e9l\u00e9ment avec le nom @@ -616,3 +616,4 @@ cms.ui.authoring.invalid_file_type=Fichiers de type invalide connot \u00eatre ch cms.ui.authoring.couldnt_convert_missing_inso=Impossible de convertir au format HTML car le filtre interMedia INSO n'est pas install\u00e9 cms.ui.authoring.couldnt_convert_inso_failed=Impossible de convertir au format HTML car la conversion de filtre interMedia INSO a \u00e9chou\u00e9 cms.ui.authoring.html_file_missing_body_tags=Le fichier (qui devrait \u00eatre de type HTML) est absent de la ou body> +cms.ui.lifecycle.publish.not_possible_abstract_category\ = diff --git a/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchPopup.java b/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchPopup.java index 6aedb75d6..2ce65b792 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchPopup.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/ItemSearchPopup.java @@ -46,8 +46,8 @@ import javax.servlet.http.HttpServletRequest; */ public class ItemSearchPopup extends ItemSearch { - private static final org.apache.log4j.Logger s_log = org.apache.log4j.Logger.getLogger( - ItemSearchPopup.class); +// private static final org.apache.log4j.Logger s_log = org.apache.log4j.Logger.getLogger( +// ItemSearchPopup.class); public static final String WIDGET_PARAM = "widget"; public static final String URL_PARAM = "useURL"; public static final String QUERY = "query"; @@ -59,32 +59,34 @@ public class ItemSearchPopup extends ItemSearch { * {@link ContentItem#DRAFT} or {@link ContentItem#LIVE} * @param limitToContentSection limit the search to the current content section */ - public ItemSearchPopup(String context, boolean limitToContentSection) { + public ItemSearchPopup(final String context, final boolean limitToContentSection) { super(context, limitToContentSection); } // Hide results by default @Override - public void register(Page p) { - super.register(p); - p.addGlobalStateParam(new StringParameter(WIDGET_PARAM)); - p.addGlobalStateParam(new StringParameter(URL_PARAM)); - p.addGlobalStateParam(new StringParameter(QUERY)); + public void register(final Page page) { + super.register(page); + page.addGlobalStateParam(new StringParameter(WIDGET_PARAM)); + page.addGlobalStateParam(new StringParameter(URL_PARAM)); + page.addGlobalStateParam(new StringParameter(QUERY)); } @Override - protected ItemSearchSection createSearchSection(String context, boolean limitToContentSection) { + protected ItemSearchSection createSearchSection(final String context, + final boolean limitToContentSection) { return new ItemSearchSectionPopup(context, limitToContentSection); } private static class ItemSearchSectionPopup extends ItemSearchSection { - public ItemSearchSectionPopup(String context, boolean limitToContentSection) { + public ItemSearchSectionPopup(final String context, + final boolean limitToContentSection) { super(context, limitToContentSection); } @Override - protected Component createResultsPane(QueryGenerator generator) { + protected Component createResultsPane(final QueryGenerator generator) { return new PopupResultsPane(generator); } @@ -92,8 +94,11 @@ public class ItemSearchPopup extends ItemSearch { /** * The default context is Live.No need to append &context=live explicitly. + * @param request + * @param oid + * @return */ - public static String getItemURL(HttpServletRequest request, OID oid) { + public static String getItemURL(final HttpServletRequest request, final OID oid) { // redirect doesn't use /ccm prefix for some reason, so just returning the raw string. //ParameterMap map = new ParameterMap(); //map.setParameter("oid", oid.toString()); @@ -108,7 +113,7 @@ public class ItemSearchPopup extends ItemSearch { private static class PopupResultsPane extends ResultsPane { - public PopupResultsPane(QueryGenerator generator) { + public PopupResultsPane(final QueryGenerator generator) { super(generator); setRelativeURLs(true); setSearchHelpMsg(GlobalizationUtil.globalize("cms.ui.search.help")); @@ -116,15 +121,16 @@ public class ItemSearchPopup extends ItemSearch { } @Override - protected Element generateDocumentXML(PageState state, Document doc) { - Element element = super.generateDocumentXML(state, doc); + protected Element generateDocumentXML(final PageState state, + final Document doc) { + final Element element = super.generateDocumentXML(state, doc); element.addAttribute("class", "jsButton"); - String widget = (String) state.getValue(new StringParameter(WIDGET_PARAM)); - String searchWidget = (String) state.getValue(new StringParameter("searchWidget")); + final String widget = (String) state.getValue(new StringParameter(WIDGET_PARAM)); + final String searchWidget = (String) state.getValue(new StringParameter("searchWidget")); - boolean useURL = "true".equals(state.getValue(new StringParameter(URL_PARAM))); + final boolean useURL = "true".equals(state.getValue(new StringParameter(URL_PARAM))); String fillString; if (useURL) { @@ -133,26 +139,38 @@ public class ItemSearchPopup extends ItemSearch { fillString = doc.getOID().get("id").toString(); } - String title = doc.getTitle(); + final String title = doc.getTitle(); - Element jsLabel = Search.newElement("jsAction"); + final Element jsLabel = Search.newElement("jsAction"); jsLabel.addAttribute("name", "fillItem" + doc.getOID().get("id") + "()"); jsLabel.setText(generateJSLabel((BigDecimal) doc.getOID().get("id"), - widget, searchWidget, fillString, title)); + widget, + searchWidget, + fillString, + title)); + jsLabel.addAttribute("action", + String.format( + "window.opener.document.%s.value = \"%s\"; self.close(); return false;", + widget, + fillString)); element.addContent(jsLabel); return element; } - private String generateJSLabel(BigDecimal id, String widget, String searchWidget, - String fill, String title) { - return "