任务编辑文档预览组件 Alfresco

编程入门 行业动态 更新时间:2024-10-12 08:20:26
本文介绍了任务编辑文档预览组件 Alfresco的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

第一个问题:

我想以工作流的任务编辑的形式实现文档的预览...我该怎么做?我尝试将 document-details.xml 和 document-details.ftl 改编为 workflow-details.xml 和 workflow-details.ftl 但不起作用.我试图将具有文档详细信息文件的 Web 预览的组件复制到工作流详细信息.有什么提示吗?

我在 workflow-details.ftl 中有这个:

<#include "include/alfresco-template.ftl"/><@templateHeader><@script type="text/javascript" src="${url.context}/res/modules/documentlibrary/doclib-actions.js" group="document-details"/><@link rel="stylesheet" type="text/css" href="${url.context}/res/components/document-details/document-details-panel.css" group="document-details"/><@link rel="stylesheet" type="text/css" href="${url.context}/res/components/workflow/task-edit-header.css" group="workflow-details"/><@templateHtmlEditorAssets/></@><@templateBody><@markup id="alf-hd"><div id="alf-hd"><@region scope="global" id="share-header" chromeless="true"/><@region id="title" scope="template"/><#if page.url.args.nodeRef??><@region id="path" scope="template"/></#if>

</@><@markup id="bd"><div id="bd"><div class="share-form"><@region id="data-header" scope="page"/><div class="yui-gc"><div class="yui-u first"><#if (config.scoped['WorkflowDetails']['workflow-details'].getChildValue('display-web-preview') == "true")><@region id="web-preview" scope="template"/></#if>

<@region id="data-form" scope="page"/><@region id="data-actions" scope="page"/>

</@></@><@templateFooter><@markup id="alf-ft"><div id="alf-ft"><@region id="footer" scope="global"/><@region id="data-loader" scope="page"/>

</@></@>

在workflow-details.xml中我添加了这个组件:

<region-id>web-preview</region-id><子组件><子组件id="默认"><评价><评价><评价者><评估器类型="configponent.evaluator"><参数><element>WorkflowDetails/workflow-details/display-web-preview</element></参数></评估者></评估者><url>/components/preview/web-preview</url><属性><nodeRef>{nodeRef}</nodeRef><api>api</api><代理>户外</代理><dependencyGroup>工作流细节</dependencyGroup></属性></评估></评价></子组件></子组件></组件>

这不显示网络预览,只创建:

<div id="template_x002e_web-preview_x002e_workflow-details"><div id="template_x002e_web-preview_x002e_workflow-details_x0023_default">

我的错误是什么?

第二个问题:

在Aikau页面的预览中,在Mozilla Firefox的firebug控制台中得到:Warning: unimplemented annotation type: Widget signature 并显示文档没有数字签名...但是,例如,如果我上传带有数字签名的文档,我可以在文档的document-details 页面中看到带有签名的文档.这个页面的预览不一样?如何实施此预览?

解决方案

使用 share (pdf.js) 中集成的 javascript 预览器会更容易.如果直接使用javascript库,打开预览应该不难.

项目官网有示例:pdf.js

您可以使用共享网页脚本来初始化带有附加到工作流程的文档的 url 列表的 javascript.如果随附的文档不是 pdf,您将需要使用其 pdf 格式.

First question:

I want to implement a preview of the document in the form of the task-edit of the workflows... How can I do this? I try to adapt the document-details.xml and document-details.ftl to workflow-details.xml and workflow-details.ftl but not works. I tried to copy the components that have web-preview of the document-details files to workflow-details. Any hint to make this?

I have this in workflow-details.ftl:

<#include "include/alfresco-template.ftl" /> <@templateHeader> <@script type="text/javascript" src="${url.context}/res/modules/documentlibrary/doclib-actions.js" group="document-details"/> <@link rel="stylesheet" type="text/css" href="${url.context}/res/components/document-details/document-details-panel.css" group="document-details"/> <@link rel="stylesheet" type="text/css" href="${url.context}/res/components/workflow/task-edit-header.css" group="workflow-details"/> <@templateHtmlEditorAssets /> </@> <@templateBody> <@markup id="alf-hd"> <div id="alf-hd"> <@region scope="global" id="share-header" chromeless="true"/> <@region id="title" scope="template"/> <#if page.url.args.nodeRef??> <@region id="path" scope="template"/> </#if> </div> </@> <@markup id="bd"> <div id="bd"> <div class="share-form"> <@region id="data-header" scope="page" /> <div class="yui-gc"> <div class="yui-u first"> <#if (config.scoped['WorkflowDetails']['workflow-details'].getChildValue('display-web-preview') == "true")> <@region id="web-preview" scope="template"/> </#if> </div> </div> <@region id="data-form" scope="page" /> <@region id="data-actions" scope="page" /> </div> </div> </@> </@> <@templateFooter> <@markup id="alf-ft"> <div id="alf-ft"> <@region id="footer" scope="global"/> <@region id="data-loader" scope="page" /> </div> </@> </@>

In workflow-details.xml I add this component:

<component> <region-id>web-preview</region-id> <sub-components> <sub-component id="default"> <evaluations> <evaluation> <evaluators> <evaluator type="configponent.evaluator"> <params> <element>WorkflowDetails/workflow-details/display-web-preview</element> </params> </evaluator> </evaluators> <url>/components/preview/web-preview</url> <properties> <nodeRef>{nodeRef}</nodeRef> <api>api</api> <proxy>alfresco</proxy> <dependencyGroup>workflow-details</dependencyGroup> </properties> </evaluation> </evaluations> </sub-component> </sub-components> </component>

This not shows the web-preview, only creates:

<div id="template_x002e_web-preview_x002e_workflow-details"> <div id="template_x002e_web-preview_x002e_workflow-details_x0023_default"> </div> </div>

What's my error?

Second question:

In the preview of the Aikau page I get: Warning: unimplemented annotation type: Widget signature in the console of the firebug of the Mozilla Firefox and the document is displayed without the digital signatures... But, for example, if I upload a document with a digital signature, I can see the document with the signature in the page of document-details of the document. The preview of this page is different? How can I implement this preview?

解决方案

It can be easier to just use the javascript previewer that is integrated in share (pdf.js). If you use directly the javascript library, it shouldn't be difficult to open a preview.

There are examples in the official site of the project: pdf.js

you can use the share webscript to initialise the javascript with the list of urls of the documents attached to the workflow. If the document attached is not a pdf, you will need to use its pdf rendition.

更多推荐

任务编辑文档预览组件 Alfresco

本文发布于:2023-11-28 12:15:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1642359.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:组件   编辑   文档   Alfresco

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!