任务编辑文档预览组件Alfresco

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

第一个问题:

我想以工作流程的任务编辑的形式实现文档的预览。 。 我怎样才能做到这一点?我尝试将 document-details.xml 和 document-details.ftl 调整为工作流程-details.xml 和 workflow-details.ftl ,但不起作用。我试图将具有文档详细信息文件的网络预览的组件复制到工作流详细信息。有什么提示吗?

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?

我在 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> </@> </@>

在workflow-details.xml中,我添加了以下组件:

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>

我怎么了?

第二个问题:

在 Aikau 页面的预览中,我得到:警告:未实现的注释类型:Mozilla Firefox萤火虫的控制台中的小部件签名,并且显示的文档中没有数字签名...但是,例如,如果我使用数字签名,我可以在文档的 document-details 页面上看到带有签名的文档。此页面的预览不同吗?如何实现此预览?

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?

推荐答案

仅使用共享中集成的javascript预览器(pdf。 js)。如果您直接使用javascript库,打开预览应该不会很困难。

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.

该项目的官方网站中有一些示例: pdf.js

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

您可以使用共享Web脚本使用附加到工作流程的文档的URL列表来初始化javascript。如果随附的文档不是pdf,则需要使用其pdf格式。

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

发布评论

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

>www.elefans.com

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