AnsweredAssumed Answered

setting rowsPerPageOptions in alfresco share document library pagination section

Question asked by chaituu on Feb 24, 2016
I need to enable rowsPerPageOptions in documentLibrary paginator section.I found that paginator is configured in _setupHistoryManagers function in OOTB documentlist.js. so I have created documentlist-custom.js and overwrite entire function[_setupHistoryManagers] that exists in OOB documentlist.js and put it in my custom js file.it working fine.

But I want to know Is it the right way or Is there any way setting the adding this rowsPerPageOptions option in this.widgets.paginator function instead of copying whole _setupHistoryManagers function in custom js file?

using 4.2.2 version.

_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")
         });

}

Outcomes