Ajax pop-up summary panels used for nodes in portlet templates now have own template which launches into different window

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5629 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-05-04 15:26:15 +00:00
parent 96b61f3ac7
commit 3c1db37e0c
4 changed files with 98 additions and 4 deletions

View File

@@ -0,0 +1,91 @@
<div class="summaryPopupPanel" style="background-color:#F8FCFD">
<table cellpadding='3' cellspacing='0'>
<tr>
<td colspan='2' class='mainSubTitle'>
<table cellspacing='0' cellpadding='0' width='100%' style='cursor:move' id='dragable'>
<tr>
<td class='mainSubTitle'>${node.name}</td>
<#if node.isDocument>
<#assign navurl="/navigate/showDocDetails/">
<#else>
<#assign navurl="/navigate/showSpaceDetails/">
</#if>
<#assign navurl=navurl + node.nodeRef.storeRef.protocol + '/' + node.nodeRef.storeRef.identifier + '/' + node.nodeRef.id>
<td width=24><center><a href='${url.context}${navurl}' target="new"><img src='${url.context}/images/icons/View_details.gif' style='cursor:pointer' width=12 height=16 border=0 title="Details" alt="Details"></a></center></td>
<td width=14 align=right><img src='${url.context}/images/icons/close_panel.gif' onclick="AlfNodeInfoMgr.close('${node.nodeRef}');" style='cursor:pointer' width=14 height=14 border=0 title="Close" alt="Close"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign='middle' align='center'>
<#assign isImage=node.isDocument && (node.mimetype = "image/gif" || node.mimetype = "image/jpeg" || node.mimetype = "image/png")>
<#assign isVideo=node.isDocument && node.mimetype?starts_with("video/")>
<#if isImage>
<a href="${url.context}${node.url}" target="new"><img src="${url.context}${node.url}" width=120 border=0></a>
<#elseif isVideo>
<object width="320" height="240" border="0" id="player">
<param name="UIMode" value="none" />
<param name="URL" value="${url.context}${node.url}" />
<param name="autoStart" value="true" />
<#--<embed type="application/x-mplayer2" pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" src="${url.context}${node.url}" showcontrols="1" showdisplay="0" showstatusbar="0" autosize="1" autoplay="0" autoStart="0" height="240" width="320"></embed>-->
<embed width="320" height="240" src="${url.context}${node.url}" border="0" showcontrols="1" showdisplay="0" showstatusbar="0" autosize="1" autoplay="0" autoStart="0"></embed>
</object>
<#else>
<table cellspacing=0 cellpadding=0 border=0>
<tr>
<td>
<div style="border: thin solid #cccccc; padding:4px">
<a href="${url.context}${node.url}" target="new"><img src="${url.context}${node.icon32}" width=32 height=32 border=0></a>
</div>
</td>
<td><img src="${url.context}/images/parts/rightSideShadow42.gif" width=6 height=42></td>
</tr>
<tr>
<td colspan=2><img src="${url.context}/images/parts/bottomShadow42.gif" width=48 height=5></td>
</tr>
</table>
</#if>
</td>
<td valign='top'>
<table cellpadding='2' cellspacing='0'>
<#if node.properties.title?exists>
<tr><td>&nbsp;Title:</td><td>${node.properties.title?html}</td></tr>
</#if>
<#if node.properties.description?exists>
<tr><td>&nbsp;Description:</td><td>${node.properties.description?html}</td></tr>
</#if>
<tr><td>&nbsp;Created:</td><td>${node.properties.created?datetime}</td></tr>
<tr><td>&nbsp;Creator:</td><td>${node.properties.creator}</td></tr>
<tr><td>&nbsp;Modified:</td><td>${node.properties.modified?datetime}</td></tr>
<tr><td>&nbsp;Modifier:</td><td>${node.properties.modifier}</td></tr>
<#if node.properties.owner?exists>
<tr><td>&nbsp;Owner:</td><td>${node.properties.owner}</td></tr>
</#if>
<#if node.properties.author?exists>
<tr><td>&nbsp;Author:</td><td>${node.properties.author}</td></tr>
</#if>
<#if node.isDocument>
<tr><td>&nbsp;Size:</td><td>${(node.size / 1000)?string("0.##")} KB</td></tr>
</#if>
</table>
</td>
</tr>
<#if node.isDocument && !isImage && !isVideo>
<#assign c=cropContent(node.properties.content, 512)>
<#if c?length != 0>
<tr>
<td colspan='2'>Preview:</td>
</tr>
<tr>
<td colspan='2'>
${c?html?replace('$', '<br>', 'rm')}<#if (c?length >= 512)>...</#if>
</td>
</tr>
</#if>
</#if>
</table>
</div>

View File

@@ -14,7 +14,7 @@
<script>
// create manager object for the pop-up summary panels
var AlfNodeInfoMgr = new Alfresco.PanelManager("NodeInfoBean.sendNodeInfo", "noderef");
var AlfNodeInfoMgr = new Alfresco.PanelManager("NodeInfoBean.sendNodeInfo", "noderef", "portlet_node_summary_panel.ftl");
</script>
<#-- get the filter mode from the passed in args -->

View File

@@ -14,7 +14,7 @@
<script>
// create manager object for the pop-up summary panels
var AlfNodeInfoMgr = new Alfresco.PanelManager("NodeInfoBean.sendNodeInfo", "noderef");
var AlfNodeInfoMgr = new Alfresco.PanelManager("NodeInfoBean.sendNodeInfo", "noderef", "portlet_node_summary_panel.ftl");
</script>
<#-- List the available web form objects in all web projects the user is assigned to -->

View File

@@ -13,10 +13,11 @@ var _zIndex = 99;
* @param serverCall Server call to make on display e.g. NodeInfoBean.sendNodeInfo
* @param argName Argument name to pass panel ID object as e.g. nodeRef
*/
Alfresco.PanelManager = function(serverCall, argName)
Alfresco.PanelManager = function(serverCall, argName, template)
{
this.serverCall = serverCall;
this.argName = argName;
this.template = template;
}
/**
@@ -29,6 +30,7 @@ Alfresco.PanelManager.prototype =
displayed: [],
serverCall: null,
argName: null,
template: null,
/**
* Request toggle of the open/close state of an info panel
@@ -122,7 +124,8 @@ Alfresco.InfoPanel.prototype =
failure: handleErrorYahoo, // global error handler
argument: [this]
},
this.manager.argName + "=" + this.id);
this.manager.argName + "=" + this.id +
(this.manager.template != null ? ("&template=" + this.manager.template) : ""));
}
else
{