mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.1 to HEAD
6529: Fix for AWC-1506 "Configure Dashboard Wizard - no indication as to why new Components can not be added to the Selected list...." 6530: SDK remote dependencies for Axis jar rename 6531: Fixed XML blooper in sample config. 6532: AWC-1516 6533 FQDN case sensitivity 6534: Fixed WebServices query session cache in the cluster sample git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6743 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1349,6 +1349,7 @@ dashlet_btn_remove=Remove
|
||||
selected_dashlets=Selected Components
|
||||
dashboard_column=Column
|
||||
column_max_components=this column can display {0} components
|
||||
single_column_max_components=This layout can display {0} components
|
||||
|
||||
# My Alfresco Layouts messages
|
||||
layout_single_label=Single Column
|
||||
|
@@ -264,6 +264,9 @@ public class DashboardWizard extends BaseWizardBean
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
|
||||
Column column = this.editConfig.getCurrentPage().getColumns().get(this.column);
|
||||
// trim the max number of dashlets for this column
|
||||
LayoutDefinition layoutDef = this.editConfig.getCurrentPage().getLayoutDefinition();
|
||||
column.trimDashlets(layoutDef.ColumnLength);
|
||||
List<SelectItem> dashlets = new ArrayList<SelectItem>(column.getDashlets().size());
|
||||
for (DashletDefinition dashletDef : column.getDashlets())
|
||||
{
|
||||
@@ -276,7 +279,16 @@ public class DashboardWizard extends BaseWizardBean
|
||||
}
|
||||
return dashlets;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the number of dashlets currently displayed in the selected column
|
||||
*/
|
||||
public int getColumnDashletCount()
|
||||
{
|
||||
Column column = this.editConfig.getCurrentPage().getColumns().get(this.column);
|
||||
return column.getDashlets().size();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return List of UIDescription objects for the available layouts
|
||||
*/
|
||||
|
@@ -403,4 +403,13 @@ final class Column
|
||||
{
|
||||
return this.dashlets;
|
||||
}
|
||||
|
||||
public void trimDashlets(int max)
|
||||
{
|
||||
if (max >= 0)
|
||||
{
|
||||
int maxTrim = Math.min(this.dashlets.size(), max);
|
||||
this.dashlets = this.dashlets.subList(0, maxTrim);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -53,6 +53,12 @@
|
||||
<f:param value="#{WizardManager.bean.columnMax}" />
|
||||
</h:outputFormat>
|
||||
</h:panelGroup>
|
||||
|
||||
<h:panelGroup id="panel1b" rendered="#{WizardManager.bean.columnCount == 1}">
|
||||
<h:outputFormat value="#{msg.single_column_max_components}">
|
||||
<f:param value="#{WizardManager.bean.columnMax}" />
|
||||
</h:outputFormat>
|
||||
</h:panelGroup>
|
||||
|
||||
<h:panelGrid id="panel2" columns="3" cellpadding="2" cellspacing="0" border="0" columnClasses="alignTop,alignMiddle">
|
||||
<h:panelGrid id="panel3" columns="1" cellpadding="2" border="0">
|
||||
@@ -62,8 +68,8 @@
|
||||
<f:selectItems value="#{WizardManager.bean.allDashlets}" />
|
||||
</h:selectManyListbox>
|
||||
</h:panelGrid>
|
||||
|
||||
<h:commandButton id="select-btn" value="#{msg.dashlet_btn_select} >>" actionListener="#{WizardManager.bean.addDashlets}" />
|
||||
|
||||
<h:commandButton id="select-btn" value="#{msg.dashlet_btn_select} >>" actionListener="#{WizardManager.bean.addDashlets}" disabled="#{WizardManager.bean.columnDashletCount >= WizardManager.bean.columnMax}"/>
|
||||
|
||||
<h:panelGrid id="panel4" columns="1" cellpadding="2" border="0">
|
||||
<h:outputText value="#{msg.selected_dashlets}:" />
|
||||
@@ -73,12 +79,12 @@
|
||||
<f:selectItems value="#{WizardManager.bean.columnDashlets}" />
|
||||
</h:selectOneListbox>
|
||||
<h:panelGroup id="panel6">
|
||||
<h:commandButton value="+" style="width:24px" actionListener="#{WizardManager.bean.dashletUp}" />
|
||||
<h:commandButton value="+" style="width:24px" actionListener="#{WizardManager.bean.dashletUp}" disabled="#{WizardManager.bean.columnDashletCount < 1}"/>
|
||||
<f:verbatim><br></f:verbatim>
|
||||
<h:commandButton value="-" style="width:24px" actionListener="#{WizardManager.bean.dashletDown}"/>
|
||||
<h:commandButton value="-" style="width:24px" actionListener="#{WizardManager.bean.dashletDown}" disabled="#{WizardManager.bean.columnDashletCount < 1}"/>
|
||||
</h:panelGroup>
|
||||
</h:panelGrid>
|
||||
<h:commandButton id="remove-btn" value="#{msg.dashlet_btn_remove}" actionListener="#{WizardManager.bean.removeDashlet}" />
|
||||
<h:commandButton id="remove-btn" value="#{msg.dashlet_btn_remove}" actionListener="#{WizardManager.bean.removeDashlet}" disabled="#{WizardManager.bean.columnDashletCount < 1}"/>
|
||||
</h:panelGrid>
|
||||
</h:panelGrid>
|
||||
</h:panelGrid>
|
||||
|
@@ -28,6 +28,28 @@
|
||||
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
|
||||
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
window.onload = pageLoaded;
|
||||
|
||||
function pageLoaded()
|
||||
{
|
||||
checkButtonState();
|
||||
}
|
||||
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("wizard:wizard-body:space-selector_selected").value.length == 0)
|
||||
{
|
||||
document.getElementById("wizard:next-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("wizard:next-button").disabled = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<f:verbatim>
|
||||
<table cellpadding="3" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
|
Reference in New Issue
Block a user