From 3c1db37e0c15f79d5cc0d3dac31541f47bd06f26 Mon Sep 17 00:00:00 2001 From: Kevin Roast Date: Fri, 4 May 2007 15:26:15 +0000 Subject: [PATCH] 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 --- .../client/portlet_node_summary_panel.ftl | 91 +++++++++++++++++++ .../alfresco/portlets/doclist_get_html.ftl | 2 +- .../alfresco/portlets/mywebforms_get_html.ftl | 2 +- source/web/scripts/ajax/summary-info.js | 7 +- 4 files changed, 98 insertions(+), 4 deletions(-) create mode 100644 config/alfresco/templates/client/portlet_node_summary_panel.ftl diff --git a/config/alfresco/templates/client/portlet_node_summary_panel.ftl b/config/alfresco/templates/client/portlet_node_summary_panel.ftl new file mode 100644 index 0000000000..c38f73c903 --- /dev/null +++ b/config/alfresco/templates/client/portlet_node_summary_panel.ftl @@ -0,0 +1,91 @@ +
+ + + + + + + + + + + + <#if node.isDocument && !isImage && !isVideo> + <#assign c=cropContent(node.properties.content, 512)> + <#if c?length != 0> + + + + + + + + +
+ + + + <#if node.isDocument> + <#assign navurl="/navigate/showDocDetails/"> + <#else> + <#assign navurl="/navigate/showSpaceDetails/"> + + <#assign navurl=navurl + node.nodeRef.storeRef.protocol + '/' + node.nodeRef.storeRef.identifier + '/' + node.nodeRef.id> + + + +
${node.name}
Details
Close
+
+ <#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> + + <#elseif isVideo> + + + + + <#----> + + + <#else> + + + + + + + + +
+
+ +
+
+ +
+ + <#if node.properties.title?exists> + + + <#if node.properties.description?exists> + + + + + + + <#if node.properties.owner?exists> + + + <#if node.properties.author?exists> + + + <#if node.isDocument> + + +
 Title:${node.properties.title?html}
 Description:${node.properties.description?html}
 Created:${node.properties.created?datetime}
 Creator:${node.properties.creator}
 Modified:${node.properties.modified?datetime}
 Modifier:${node.properties.modifier}
 Owner:${node.properties.owner}
 Author:${node.properties.author}
 Size:${(node.size / 1000)?string("0.##")} KB
+
Preview:
+ ${c?html?replace('$', '
', 'rm')}<#if (c?length >= 512)>... +
+
\ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/portlets/doclist_get_html.ftl b/config/alfresco/templates/webscripts/org/alfresco/portlets/doclist_get_html.ftl index 02204faf1e..10afe96c6d 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/portlets/doclist_get_html.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/portlets/doclist_get_html.ftl @@ -14,7 +14,7 @@ <#-- get the filter mode from the passed in args --> diff --git a/config/alfresco/templates/webscripts/org/alfresco/portlets/mywebforms_get_html.ftl b/config/alfresco/templates/webscripts/org/alfresco/portlets/mywebforms_get_html.ftl index b1f4d6779d..f0a5ce3357 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/portlets/mywebforms_get_html.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/portlets/mywebforms_get_html.ftl @@ -14,7 +14,7 @@ <#-- List the available web form objects in all web projects the user is assigned to --> diff --git a/source/web/scripts/ajax/summary-info.js b/source/web/scripts/ajax/summary-info.js index b20bace425..26d7e83290 100644 --- a/source/web/scripts/ajax/summary-info.js +++ b/source/web/scripts/ajax/summary-info.js @@ -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 {