mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
@@ -676,6 +676,11 @@ a.topToolbarLinkHighlight, a.topToolbarLinkHighlight:link, a.topToolbarLinkHighl
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.panelGridLabelColumnAuto
|
||||
{
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.panelGridLabelColumn
|
||||
{
|
||||
white-space: nowrap;
|
||||
|
@@ -29,13 +29,32 @@
|
||||
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r"%>
|
||||
|
||||
<f:verbatim>
|
||||
<table cellpadding="2" cellspacing="2" border="0" width="100%">
|
||||
<tr>
|
||||
<td></f:verbatim><h:outputText value="#{msg.template}" /><f:verbatim>:</td>
|
||||
<td width=100%><%-- Templates drop-down selector --%> </f:verbatim><h:selectOneMenu
|
||||
value="#{ApplyDocTemplateDialog.template}">
|
||||
<f:selectItems value="#{TemplateSupportBean.contentTemplates}" />
|
||||
</h:selectOneMenu><f:verbatim></td>
|
||||
</tr>
|
||||
</table>
|
||||
</f:verbatim>
|
||||
<script type="text/javascript">
|
||||
var finishButtonPressed = false;
|
||||
window.onload = pageLoaded;
|
||||
|
||||
function pageLoaded()
|
||||
{
|
||||
checkButtonState();
|
||||
}
|
||||
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("dialog:dialog-body:template").value == "none")
|
||||
{
|
||||
document.getElementById("dialog:finish-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("dialog:finish-button").disabled = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</f:verbatim>
|
||||
|
||||
<h:panelGrid id="template-panel" columns="2" cellpadding="2" cellspacing="2" border="0" width="100%" columnClasses="panelGridLabelColumnAuto,panelGridValueColumn">
|
||||
<h:outputText value="#{msg.template}:" />
|
||||
<h:selectOneMenu id="template" value="#{ApplyDocTemplateDialog.template}" onchange="checkButtonState();">
|
||||
<f:selectItems value="#{TemplateSupportBean.contentTemplates}" />
|
||||
</h:selectOneMenu>
|
||||
</h:panelGrid>
|
@@ -35,51 +35,48 @@
|
||||
<r:loadBundle var="msg"/>
|
||||
|
||||
<f:verbatim>
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<%-- TODO: check for Guest user access and hide panel? --%>
|
||||
<td width="100%" valign="top">
|
||||
<%
|
||||
PanelGenerator.generatePanelStart(out, request.getContextPath(),
|
||||
"yellowInner", "#ffffcc");
|
||||
%>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td valign=top style="padding-top:2px" width=20></f:verbatim><h:graphicImage
|
||||
url="/images/icons/info_icon.gif" width="16" height="16" /><f:verbatim></td>
|
||||
<td class="mainSubText"></f:verbatim><h:outputText
|
||||
value="#{msg.apply_rss_feed_warning1} " /> <a:actionLink
|
||||
value="#{msg.manage_invited_users}"
|
||||
actionListener="#{BrowseBean.setupSpaceAction}"
|
||||
action="dialog:manageInvitedUsers">
|
||||
<f:param name="id" value="#{SpaceDetailsDialog.id}" />
|
||||
</a:actionLink> <h:outputText value=" #{msg.apply_rss_feed_warning2}" /><f:verbatim></td>
|
||||
</tr>
|
||||
</table>
|
||||
<%
|
||||
PanelGenerator.generatePanelEnd(out, request.getContextPath(),
|
||||
"yellowInner");
|
||||
%>
|
||||
<script type="text/javascript">
|
||||
var finishButtonPressed = false;
|
||||
window.onload = pageLoaded;
|
||||
|
||||
function pageLoaded()
|
||||
{
|
||||
checkButtonState();
|
||||
}
|
||||
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("dialog:dialog-body:template").value == "none")
|
||||
{
|
||||
document.getElementById("dialog:finish-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("dialog:finish-button").disabled = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div style="padding:4px"></div>
|
||||
<%
|
||||
PanelGenerator.generatePanelStart(out, request.getContextPath(),
|
||||
"white", "white");
|
||||
%>
|
||||
<table cellpadding="2" cellspacing="2" border="0" width="100%">
|
||||
<tr>
|
||||
<td><nobr></f:verbatim><h:outputText value="#{msg.rss_template}" /><f:verbatim>:</nobr></td>
|
||||
<td width=100%><%-- Templates drop-down selector --%> </f:verbatim><h:selectOneMenu
|
||||
value="#{ApplyRssTemplateDialog.RSSTemplate}">
|
||||
<f:selectItems value="#{TemplateSupportBean.RSSTemplates}" />
|
||||
</h:selectOneMenu><f:verbatim></td>
|
||||
</tr>
|
||||
</table>
|
||||
<%
|
||||
PanelGenerator.generatePanelEnd(out, request.getContextPath(),
|
||||
"white");
|
||||
%>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</f:verbatim>
|
||||
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc"); %>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td valign="top" style="padding-top:2px" width="20"></f:verbatim><h:graphicImage url="/images/icons/info_icon.gif" width="16" height="16" /><f:verbatim></td>
|
||||
<td class="mainSubText"></f:verbatim>
|
||||
<h:outputText value="#{msg.apply_rss_feed_warning1}" />
|
||||
<a:actionLink value=" #{msg.manage_invited_users} " actionListener="#{BrowseBean.setupSpaceAction}" action="dialog:manageInvitedUsers">
|
||||
<f:param name="id" value="#{SpaceDetailsDialog.id}" />
|
||||
</a:actionLink>
|
||||
<h:outputText value="#{msg.apply_rss_feed_warning2}" /><f:verbatim></td>
|
||||
</tr>
|
||||
</table>
|
||||
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner"); %>
|
||||
<div style="padding:4px"></div>
|
||||
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %></f:verbatim>
|
||||
<h:panelGrid id="template-panel" columns="2" cellpadding="2" cellspacing="2" border="0" width="100%" columnClasses="panelGridLabelColumnAuto,panelGridValueColumn">
|
||||
<h:outputText value="#{msg.rss_template}:" />
|
||||
<h:selectOneMenu id="template" value="#{ApplyRssTemplateDialog.RSSTemplate}" onchange="checkButtonState();">
|
||||
<f:selectItems value="#{TemplateSupportBean.RSSTemplates}" />
|
||||
</h:selectOneMenu>
|
||||
</h:panelGrid><f:verbatim>
|
||||
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
|
||||
</f:verbatim>
|
@@ -29,13 +29,32 @@
|
||||
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r"%>
|
||||
|
||||
<f:verbatim>
|
||||
<table cellpadding="2" cellspacing="2" border="0" width="100%">
|
||||
<tr>
|
||||
<td></f:verbatim><h:outputText value="#{msg.template}" /><f:verbatim>:</td>
|
||||
<td width=100%><%-- Templates drop-down selector --%> </f:verbatim><h:selectOneMenu
|
||||
value="#{ApplySpaceTemplateDialog.template}">
|
||||
<f:selectItems value="#{TemplateSupportBean.contentTemplates}" />
|
||||
</h:selectOneMenu><f:verbatim></td>
|
||||
</tr>
|
||||
</table>
|
||||
</f:verbatim>
|
||||
<script type="text/javascript">
|
||||
var finishButtonPressed = false;
|
||||
window.onload = pageLoaded;
|
||||
|
||||
function pageLoaded()
|
||||
{
|
||||
checkButtonState();
|
||||
}
|
||||
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("dialog:dialog-body:template").value == "none")
|
||||
{
|
||||
document.getElementById("dialog:finish-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("dialog:finish-button").disabled = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</f:verbatim>
|
||||
|
||||
<h:panelGrid id="template-panel" columns="2" cellpadding="2" cellspacing="2" border="0" width="100%" columnClasses="panelGridLabelColumnAuto,panelGridValueColumn">
|
||||
<h:outputText value="#{msg.template}:" />
|
||||
<h:selectOneMenu id="template" value="#{ApplySpaceTemplateDialog.template}" onchange="checkButtonState();">
|
||||
<f:selectItems value="#{TemplateSupportBean.contentTemplates}" />
|
||||
</h:selectOneMenu>
|
||||
</h:panelGrid>
|
Reference in New Issue
Block a user