From 7bc855316739867a7534b40ed8fe00c80c561472 Mon Sep 17 00:00:00 2001 From: Kevin Roast Date: Thu, 18 Jun 2009 11:18:59 +0000 Subject: [PATCH] Fixes for ALFCOM-2313, ETHREEOH-1006, ALFCOM-2302, ETHREEOH-1023, ETWOTWO-1069 - correct enable/disable of OK button for applying Templates and RSS feeds to spaces and documents - clean up of related bean and JSP pages - conversion to JSF components from horrid verbatim tag based dialogs git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14783 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../bean/spaces/ApplyDocTemplateDialog.java | 38 ++++---- .../bean/spaces/ApplyRssTemplateDialog.java | 15 +-- .../bean/spaces/ApplySpaceTemplateDialog.java | 18 ++-- source/web/css/main.css | 5 + source/web/jsp/content/apply-doc-template.jsp | 39 ++++++-- source/web/jsp/spaces/apply-rss-template.jsp | 91 +++++++++---------- .../web/jsp/spaces/apply-space-template.jsp | 39 ++++++-- 7 files changed, 134 insertions(+), 111 deletions(-) diff --git a/source/java/org/alfresco/web/bean/spaces/ApplyDocTemplateDialog.java b/source/java/org/alfresco/web/bean/spaces/ApplyDocTemplateDialog.java index 0dc913aebf..404224c6d7 100644 --- a/source/java/org/alfresco/web/bean/spaces/ApplyDocTemplateDialog.java +++ b/source/java/org/alfresco/web/bean/spaces/ApplyDocTemplateDialog.java @@ -40,15 +40,14 @@ import org.alfresco.web.ui.common.Utils; public class ApplyDocTemplateDialog extends BaseDialogBean { - private static final long serialVersionUID = -9098279672434597354L; - - protected String template; - + private static final String DIALOG_CLOSE = "dialog:close"; - private static final String MSG_APPLY_TEMPLATE = "apply_template"; - + + protected String template; + + @Override protected String finishImpl(FacesContext context, String outcome) throws Exception { @@ -80,27 +79,22 @@ public class ApplyDocTemplateDialog extends BaseDialogBean return DIALOG_CLOSE; } - public boolean getFinishButtonDisabled() - { - return false; - } - public String getContainerTitle() { return Application.getMessage(FacesContext.getCurrentInstance(), MSG_APPLY_TEMPLATE) + " '" + getName() + "'"; } - public String getTemplate() - { - // return current template if it exists - NodeRef ref = (NodeRef) getNode().getProperties().get(ContentModel.PROP_TEMPLATE); - return ref != null ? ref.getId() : this.template; - } + public String getTemplate() + { + // return current template if it exists + NodeRef ref = (NodeRef) getNode().getProperties().get(ContentModel.PROP_TEMPLATE); + return ref != null ? ref.getId() : this.template; + } - public void setTemplate(String template) - { - this.template = template; - } + public void setTemplate(String template) + { + this.template = template; + } public Node getNode() { @@ -111,4 +105,4 @@ public class ApplyDocTemplateDialog extends BaseDialogBean { return getNode().getName(); } -} +} \ No newline at end of file diff --git a/source/java/org/alfresco/web/bean/spaces/ApplyRssTemplateDialog.java b/source/java/org/alfresco/web/bean/spaces/ApplyRssTemplateDialog.java index e4421d3858..b614944b91 100644 --- a/source/java/org/alfresco/web/bean/spaces/ApplyRssTemplateDialog.java +++ b/source/java/org/alfresco/web/bean/spaces/ApplyRssTemplateDialog.java @@ -41,14 +41,14 @@ import org.alfresco.web.ui.common.Utils; public class ApplyRssTemplateDialog extends BaseDialogBean { - private static final long serialVersionUID = 9207265799149337182L; - + private static final String DIALOG_CLOSE = "dialog:close"; - private static final String MSG_APPLY_RSS_FEED = "apply_rss_feed"; + private String rssTemplate; - + + public void setRSSTemplate(String rssTemplate) { this.rssTemplate = rssTemplate; @@ -71,11 +71,6 @@ public class ApplyRssTemplateDialog extends BaseDialogBean return DIALOG_CLOSE; } - public boolean getFinishButtonDisabled() - { - return false; - } - public String getContainerTitle() { return Application.getMessage(FacesContext.getCurrentInstance(), MSG_APPLY_RSS_FEED) + " '" + getNode().getName() + "'"; @@ -119,4 +114,4 @@ public class ApplyRssTemplateDialog extends BaseDialogBean { return this.browseBean.getActionSpace(); } -} +} \ No newline at end of file diff --git a/source/java/org/alfresco/web/bean/spaces/ApplySpaceTemplateDialog.java b/source/java/org/alfresco/web/bean/spaces/ApplySpaceTemplateDialog.java index 3fc7f2d283..1271c42754 100644 --- a/source/java/org/alfresco/web/bean/spaces/ApplySpaceTemplateDialog.java +++ b/source/java/org/alfresco/web/bean/spaces/ApplySpaceTemplateDialog.java @@ -41,15 +41,14 @@ import org.alfresco.web.ui.common.Utils; public class ApplySpaceTemplateDialog extends BaseDialogBean { - private static final long serialVersionUID = -3019234033026890265L; - - protected String template; - + private static final String DIALOG_CLOSE = "dialog:close"; - private static final String MSG_APPLY_TEMPLATE = "apply_template"; - + + protected String template; + + @Override protected String finishImpl(FacesContext context, String outcome) throws Exception { @@ -57,11 +56,6 @@ public class ApplySpaceTemplateDialog extends BaseDialogBean return DIALOG_CLOSE; } - public boolean getFinishButtonDisabled() - { - return false; - } - public String getContainerTitle() { return Application.getMessage(FacesContext.getCurrentInstance(), MSG_APPLY_TEMPLATE) + " '" + getNode().getName() + "'"; @@ -112,4 +106,4 @@ public class ApplySpaceTemplateDialog extends BaseDialogBean { this.template = template; } -} +} \ No newline at end of file diff --git a/source/web/css/main.css b/source/web/css/main.css index 216960546b..4c67bc5f00 100644 --- a/source/web/css/main.css +++ b/source/web/css/main.css @@ -676,6 +676,11 @@ a.topToolbarLinkHighlight, a.topToolbarLinkHighlight:link, a.topToolbarLinkHighl width: 20px; } +.panelGridLabelColumnAuto +{ + white-space: nowrap; +} + .panelGridLabelColumn { white-space: nowrap; diff --git a/source/web/jsp/content/apply-doc-template.jsp b/source/web/jsp/content/apply-doc-template.jsp index e29cd75e34..fe2247c89f 100644 --- a/source/web/jsp/content/apply-doc-template.jsp +++ b/source/web/jsp/content/apply-doc-template.jsp @@ -29,13 +29,32 @@ <%@ taglib uri="/WEB-INF/repo.tld" prefix="r"%> - - - - - -
:<%-- Templates drop-down selector --%> - -
-
\ No newline at end of file + + + + + + + + + \ No newline at end of file diff --git a/source/web/jsp/spaces/apply-rss-template.jsp b/source/web/jsp/spaces/apply-rss-template.jsp index b79f4a1c86..58e3bcab8e 100644 --- a/source/web/jsp/spaces/apply-rss-template.jsp +++ b/source/web/jsp/spaces/apply-rss-template.jsp @@ -35,51 +35,48 @@ - - - <%-- TODO: check for Guest user access and hide panel? --%> - - -
- <% - PanelGenerator.generatePanelStart(out, request.getContextPath(), - "yellowInner", "#ffffcc"); - %> - - - - - -
- -
- <% - PanelGenerator.generatePanelEnd(out, request.getContextPath(), - "yellowInner"); - %> + -
- <% - PanelGenerator.generatePanelStart(out, request.getContextPath(), - "white", "white"); - %> - - - - - -
:<%-- Templates drop-down selector --%> - -
- <% - PanelGenerator.generatePanelEnd(out, request.getContextPath(), - "white"); - %> -
-
+ <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc"); %> + + + + + +
+ + + + +
+ <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner"); %> +
+ <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %> + + + + + + + <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %> + \ No newline at end of file diff --git a/source/web/jsp/spaces/apply-space-template.jsp b/source/web/jsp/spaces/apply-space-template.jsp index 40ab204376..387b956967 100644 --- a/source/web/jsp/spaces/apply-space-template.jsp +++ b/source/web/jsp/spaces/apply-space-template.jsp @@ -29,13 +29,32 @@ <%@ taglib uri="/WEB-INF/repo.tld" prefix="r"%> - - - - - -
:<%-- Templates drop-down selector --%> - -
-
\ No newline at end of file + + + + + + + + + \ No newline at end of file