Alfresco - Aikau 自定义动作 [英] Alfresco - Aikau Custom Action

查看:32
本文介绍了Alfresco - Aikau 自定义动作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 alfresco aikau 搜索页面中添加自定义操作.我已经创建了扩展模块.

I want add custom action in alfresco aikau search page. I have created extension module.

<extension>
<modules>
    <module>
        <id>Custom Action In Search Result Page</id>
        <auto-deploy>true</auto-deploy>
        <version>1.0</version>

        <customizations>
            <customization>
                <targetPackageRoot>org.alfresco.share.pages.faceted-search
                </targetPackageRoot>
                <sourcePackageRoot>com.custom.faceted-search</sourcePackageRoot>
            </customization>
        </customizations>
    </module>


    <module>
        <id>Tutorial widgets</id>
        <version>1.0</version>
        <auto-deploy>true</auto-deploy>
        <configurations>
            <config evaluator="string-compare" condition="WebFramework"
                replace="false">
                <web-framework>
                    <dojo-pages>
                        <packages>
                            <package name="search" location="js/search" />
                        </packages>
                    </dojo-pages>
                </web-framework>
            </config>
        </configurations>
    </module>
</modules>

faceted-search.js

faceted-search.js

    var searchResultPage = widgetUtils.findObject(model.jsonModel.widgets, "id", "FCTSRCH_SEARCH_RESULT");

if(searchResultPage != null) {
    searchResultPage.config = {
        enableContextMenu : false,
        mergeActions : true,
        additionalDocumentAndFolderActions : ["example-action"]
    }
}

model.jsonModel.widgets.push({
    id: "EXAMPLE_LISTENER",
    name:"search/action"
});

它不是在搜索结果页面单个文档中添加操作.

It is not adding action in search result page individual document.

推荐答案

当您想在 aikau 搜索结果页面中显示相同的操作时,您必须提供您在 share-config-custom.xml 操作中提供的相同 id.

When you want to display same action in aikau search result page then you have to provide same id which you have given in share-config-custom.xml action.

Ex.example-action

Ex.example-action

我提供了不同的 ID,所以它没有显示.

I was providing different Id so it was not displaying.

这篇关于Alfresco - Aikau 自定义动作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆