Skip to content

@lsmith /Paginator factory method
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
// Use case:
var myDataTable = new YAHOO.widget.DataTable(id,cols,source,{
paginator : YAHOO.foo.createPaginator({ containers : "bar" })
});
// Method definition
YAHOO.namespace('foo').createPaginator = function (cfg) {
return new YAHOO.widget.Paginator(
// Merge configuration from cfg into some defaults
YAHOO.lang.merge({
rowsPerPage : 5,
rowsPerPageOptions : [5,10,20,30,50,{value:"all",text:"Wszystkie"
}],
alwaysVisible : false,
firstPageLinkLabel : "<<",
previousPageLinkLabel : "<",
nextPageLinkLabel : ">",
lastPageLinkLabel : ">>",
template : "{CurrentPageReport}" + YAHOO.widget.Paginator.TEMPLATE_R
OWS_PER_PAGE,
pageReportTemplate : "<strong>{startRecord}</strong> - <strong>{endR
ecord}</strong> spo&#347;ród <strong>{totalRecords}</strong> egzemplarzy"
}, (YAHOO.lang.isObject(cfg) ? cfg : {})));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.