在alfresco共享文档库分页部分中设置rowsPerPageOptions

时间:2016-02-24 13:20:11

标签: alfresco-share

我需要在documentLibrary paginator部分启用rowsPerPageOptions。我发现在OOTB documentlist.js中的_setupHistoryManagers函数中配置了paginator。所以我创建了documentlist-custom.js并覆盖了OOB documentlist.js中存在的整个函数[_setupHistoryManagers],并将它放在我的自定义js文件中。工作正常。

但是我想知道它是正确的方法还是在my.widgets.paginator函数中设置添加此rowsPerPageOptions选项而不是在自定义js文件中复制整个_setupHistoryManagers函数?

使用4.2.2版本。

_setupHistoryManagers
{

 // YUI Paginator definition
         this.widgets.paginator = new YAHOO.widget.Paginator(
         {
            containers: [this.id + "-paginator", this.id + "-paginatorBottom"],
            rowsPerPage: this.options.pageSize,
            initialPage: this.currentPage,
            rowsPerPageOptions: [25,50,75,100,500],
            template: this.msg("pagination.template"),
            pageReportTemplate: this.msg("pagination.template.page-report"),
            previousPageLinkLabel: this.msg("pagination.previousPageLinkLabel"),
            nextPageLinkLabel: this.msg("pagination.nextPageLinkLabel")
         });

}

0 个答案:

没有答案
相关问题