Dojo Alfresco共享Aikau路径树以显示文档而不仅仅是文件夹
我正在一个Aikau共享页面上工作,在那里我看到一个侧栏,它使用Alfresco共享文档库树选择器。选择器允许我将nodeRef发布到另一个小部件,该小部件将显示信息。我想使用树状视图,但我在显示文档时遇到问题,它只显示容器/文件夹。有人知道我需要做什么来解决这个问题吗 以下是我使用的Aikua代码:Dojo Alfresco共享Aikau路径树以显示文档而不仅仅是文件夹,dojo,alfresco,alfresco-share,aikau,Dojo,Alfresco,Alfresco Share,Aikau,我正在一个Aikau共享页面上工作,在那里我看到一个侧栏,它使用Alfresco共享文档库树选择器。选择器允许我将nodeRef发布到另一个小部件,该小部件将显示信息。我想使用树状视图,但我在显示文档时遇到问题,它只显示容器/文件夹。有人知道我需要做什么来解决这个问题吗 以下是我使用的Aikua代码: { align: "sidebar", name: "alfresco/layout/Twister", config: { la
{
align: "sidebar",
name: "alfresco/layout/Twister",
config: {
label: "twister.library.label",
additionalCssClasses: "no-borders",
widgets: [
{
name: "alfresco/navigation/PathTree",
config: {
showRoot: true,
rootLabel: "Repository",
rootNode: "/app:company_home",
publishTopic: "ALF_ITEM_SELECTED"
}
}
]
}
}
我想知道我是否需要为CoreXhr编写一个扩展,或者需要采取哪些步骤才能使其正常工作
任何帮助都将不胜感激我能够解决这个问题。问题来自alfresco explorer端“treenode.get.js”中的存储库脚本。解决方法是执行以下操作
define(["dojo/_base/declare",
"alfresco/navigation/PathTree",
"alfresco/documentlibrary/_AlfDocumentListTopicMixin",
"service/constants/Default",
"dojo/_base/lang",
"dojo/_base/array",
"dojo/dom-class",
"dojo/query",
"dojo/NodeList-dom"],
function(declare, PathTree, _AlfDocumentListTopicMixin, AlfConstants, lang, array, domClass, query) {
return declare([PathTree, _AlfDocumentListTopicMixin], {
useHash: true,
getTargetUrl: function alfresco_navigation_Tree__getTargetUrl() {
var url = null;
if (this.siteId && this.containerId)
{
url = AlfConstants.PROXY_URI + "slingshot/doclib/treenodeCustom/site/" + this.siteId + "/documentlibrary";
}
else if (this.rootNode)
{
url = AlfConstants.PROXY_URI + "slingshot/doclib/treenodeCustom/node/alfresco/company/home";
}
else if (!this.childRequestPublishTopic)
{
this.alfLog("error", "Cannot create a tree without 'siteId' and 'containerId' or 'rootNode' attributes", this);
}
return url;
}
});
});
{
align: "sidebar",
name: "alfresco/layout/Twister",
config: {
label: "twister.library.label",
additionalCssClasses: "no-borders",
widgets: [
{
name: "CustomWidgets/widgets/CustomTreeNode",
config: {
showRoot: true,
rootLabel: "Repository",
rootNode: "/app:company_home",
publishTopic: "ALF_ITEM_SELECTED"
}
}
]
}
}
在那之后就行了。我仍然需要将图标从文件夹更改为文档 这是一个有趣的用例,Aikau团队还没有遇到过。。。您可能值得在issues.alfresco.com或GitHub()上提出此功能请求,我们可以考虑增强现有行为或提供替代小部件。