. Custom View (the old dashboard view) now displays in a panel at the top of the main Browse screen

- the panel is only visible if a Custom View has been applied to the space
. Open/closed panel state of Content Items, Browse Spaces and Custom View panel is now remembered for the life of the user session

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3671 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-09-04 10:55:13 +00:00
parent be07f90d50
commit 1b039ef97c
3 changed files with 58 additions and 8 deletions

View File

@@ -104,7 +104,7 @@ search_results=Search Results
search_detail=Search for \"{0}\" results shown below search_detail=Search for \"{0}\" results shown below
close_search=Close Search close_search=Close Search
browse_spaces=Browse Spaces browse_spaces=Browse Spaces
browse_content=Content items browse_content=Content Items
location=Location location=Location
toggle_shelf=Hide or Show the Shelf toggle_shelf=Hide or Show the Shelf
shelf=Shelf shelf=Shelf

View File

@@ -19,6 +19,7 @@ package org.alfresco.web.bean;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -70,6 +71,7 @@ import org.alfresco.web.ui.common.component.UIActionLink;
import org.alfresco.web.ui.common.component.UIBreadcrumb; import org.alfresco.web.ui.common.component.UIBreadcrumb;
import org.alfresco.web.ui.common.component.UIModeList; import org.alfresco.web.ui.common.component.UIModeList;
import org.alfresco.web.ui.common.component.UIStatusMessage; import org.alfresco.web.ui.common.component.UIStatusMessage;
import org.alfresco.web.ui.common.component.UIPanel.ExpandedEvent;
import org.alfresco.web.ui.common.component.data.UIRichList; import org.alfresco.web.ui.common.component.data.UIRichList;
import org.alfresco.web.ui.repo.component.IRepoBreadcrumbHandler; import org.alfresco.web.ui.repo.component.IRepoBreadcrumbHandler;
import org.alfresco.web.ui.repo.component.UINodeDescendants; import org.alfresco.web.ui.repo.component.UINodeDescendants;
@@ -239,6 +241,22 @@ public class BrowseBean implements IContextListener
getSearchMinimum(); getSearchMinimum();
} }
/**
* @return Returns the panels expanded state map.
*/
public Map<String, Boolean> getPanels()
{
return this.panels;
}
/**
* @param panels The panels expanded state map.
*/
public void setPanels(Map<String, Boolean> panels)
{
this.panels = panels;
}
/** /**
* @return Returns the Space Node being used for the current browse screen action. * @return Returns the Space Node being used for the current browse screen action.
*/ */
@@ -1394,6 +1412,18 @@ public class BrowseBean implements IContextListener
this.externalForceRefresh = true; this.externalForceRefresh = true;
} }
/**
* Save the state of the panel that was expanded/collapsed
*/
public void expandPanel(ActionEvent event)
{
if (event instanceof ExpandedEvent)
{
String id = event.getComponent().getId();
this.panels.put(id, ((ExpandedEvent)event).State);
}
}
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// Private helpers // Private helpers
@@ -1672,7 +1702,10 @@ public class BrowseBean implements IContextListener
protected ViewsConfigElement viewsConfig = null; protected ViewsConfigElement viewsConfig = null;
/** Listeners for Node events */ /** Listeners for Node events */
private Set<NodeEventListener> nodeEventListeners = null; protected Set<NodeEventListener> nodeEventListeners = null;
/** Collapsable Panel state */
private Map<String, Boolean> panels = new HashMap<String, Boolean>(4, 1.0f);
/** Component references */ /** Component references */
protected UIRichList spacesRichList; protected UIRichList spacesRichList;
@@ -1680,14 +1713,14 @@ public class BrowseBean implements IContextListener
private UIStatusMessage statusMessage; private UIStatusMessage statusMessage;
/** Transient lists of container and content nodes for display */ /** Transient lists of container and content nodes for display */
private List<Node> containerNodes = null; protected List<Node> containerNodes = null;
private List<Node> contentNodes = null; protected List<Node> contentNodes = null;
/** The current space and it's properties - if any */ /** The current space and it's properties - if any */
private Node actionSpace; protected Node actionSpace;
/** The current document */ /** The current document */
private Node document; protected Node document;
/** Special message to display when user deleting certain folders e.g. Company Home */ /** Special message to display when user deleting certain folders e.g. Company Home */
private String deleteMessage; private String deleteMessage;

View File

@@ -202,6 +202,21 @@
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_9.gif" width=4 height=9></td> <td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_9.gif" width=4 height=9></td>
</tr> </tr>
<%-- Custom Template View --%>
<a:panel id="custom-wrapper-panel" rendered="#{NavigationBean.currentNodeHasTemplate}">
<tr valign=top>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width=4></td>
<td style="padding:4px">
<a:panel id="custom-panel" border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" styleClass="mainSubTitle"
label="#{msg.custom_view}" progressive="true"
expanded='#{BrowseBean.panels["custom-panel"]}' expandedActionListener="#{BrowseBean.expandPanel}">
<r:template id="template" template="#{NavigationBean.currentNodeTemplate}" model="#{NavigationBean.templateModel}" />
</a:panel>
</td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width=4></td>
</tr>
</a:panel>
<%-- Details - Spaces --%> <%-- Details - Spaces --%>
<tr valign=top> <tr valign=top>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width=4></td> <td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width=4></td>
@@ -218,7 +233,8 @@
</f:facet> </f:facet>
</h:panelGroup> </h:panelGroup>
<a:panel id="spaces-panel" border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" styleClass="mainSubTitle" <a:panel id="spaces-panel" border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" styleClass="mainSubTitle"
label="#{msg.browse_spaces}" progressive="true" facetsId="spaces-panel-facets"> label="#{msg.browse_spaces}" progressive="true" facetsId="spaces-panel-facets"
expanded='#{BrowseBean.panels["spaces-panel"]}' expandedActionListener="#{BrowseBean.expandPanel}">
<%-- Spaces List --%> <%-- Spaces List --%>
<a:richList id="spacesList" binding="#{BrowseBean.spacesRichList}" viewMode="#{BrowseBean.browseViewMode}" pageSize="#{BrowseBean.pageSizeSpaces}" <a:richList id="spacesList" binding="#{BrowseBean.spacesRichList}" viewMode="#{BrowseBean.browseViewMode}" pageSize="#{BrowseBean.pageSizeSpaces}"
@@ -354,7 +370,8 @@
</f:facet> </f:facet>
</h:panelGroup> </h:panelGroup>
<a:panel id="content-panel" border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" styleClass="mainSubTitle" <a:panel id="content-panel" border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" styleClass="mainSubTitle"
label="#{msg.browse_content}" progressive="true" facetsId="content-panel-facets"> label="#{msg.browse_content}" progressive="true" facetsId="content-panel-facets"
expanded='#{BrowseBean.panels["content-panel"]}' expandedActionListener="#{BrowseBean.expandPanel}">
<%-- Content list --%> <%-- Content list --%>
<a:richList id="contentRichList" binding="#{BrowseBean.contentRichList}" viewMode="#{BrowseBean.browseViewMode}" pageSize="#{BrowseBean.pageSizeContent}" <a:richList id="contentRichList" binding="#{BrowseBean.contentRichList}" viewMode="#{BrowseBean.browseViewMode}" pageSize="#{BrowseBean.pageSizeContent}"