mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
. File and Space link details page now have a clickable Link Destination Details link - navigates to the details page for the destination of the link
. Panels in space/space-link details pages now remember their expanded state for the current session . Tightening up spacing around panels in Space/File/Link details pages git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2585 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -37,6 +37,7 @@ import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.alfresco.web.ui.common.Utils;
|
||||
import org.alfresco.web.ui.common.Utils.URLMode;
|
||||
|
||||
/**
|
||||
* Backing bean for the edit link properties dialog
|
||||
@@ -91,6 +92,28 @@ public class LinkPropertiesBean
|
||||
this.nodeService, this.nodeService.getPath(destRef), null, "/", null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the URL to access the details page for the current document link object
|
||||
*
|
||||
* @return The bookmark URL
|
||||
*/
|
||||
public String getFileLinkBookmarkUrl()
|
||||
{
|
||||
NodeRef destRef = (NodeRef)this.browseBean.getDocument().getProperties().get(ContentModel.PROP_LINK_DESTINATION);
|
||||
return Utils.generateURL(FacesContext.getCurrentInstance(), new Node(destRef), URLMode.SHOW_DETAILS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the URL to access the details page for the current document link object
|
||||
*
|
||||
* @return The bookmark URL
|
||||
*/
|
||||
public String getSpaceLinkDestinationUrl()
|
||||
{
|
||||
NodeRef destRef = (NodeRef)this.browseBean.getActionSpace().getProperties().get(ContentModel.PROP_LINK_DESTINATION);
|
||||
return Utils.generateURL(FacesContext.getCurrentInstance(), new Node(destRef), URLMode.SHOW_DETAILS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Event handler used to save the edited properties back to the repository
|
||||
*
|
||||
|
@@ -40,6 +40,7 @@ import org.alfresco.web.bean.repository.Repository;
|
||||
import org.alfresco.web.ui.common.Utils;
|
||||
import org.alfresco.web.ui.common.Utils.URLMode;
|
||||
import org.alfresco.web.ui.common.component.UIActionLink;
|
||||
import org.alfresco.web.ui.common.component.UIPanel.ExpandedEvent;
|
||||
|
||||
/**
|
||||
* Back bean provided access to the details of a Space
|
||||
@@ -70,6 +71,21 @@ public class SpaceDetailsBean
|
||||
/** Selected template Id */
|
||||
private String template;
|
||||
|
||||
private Map<String, Boolean> panels = new HashMap<String, Boolean>(4, 1.0f);
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Construction
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
public SpaceDetailsBean()
|
||||
{
|
||||
// initial state of some panels that don't use the default
|
||||
panels.put("rules-panel", false);
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Bean property getters and setters
|
||||
@@ -118,6 +134,22 @@ public class SpaceDetailsBean
|
||||
this.ownableService = ownableService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Space this bean is currently representing
|
||||
*
|
||||
@@ -358,6 +390,18 @@ public class SpaceDetailsBean
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Navigates to next item in the list of Spaces
|
||||
*/
|
||||
|
Reference in New Issue
Block a user