mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 01:41:46 +03:00
24 lines
540 B
JavaScript
24 lines
540 B
JavaScript
|
var defaultPaginationSettings = {
|
||
|
page: 1,
|
||
|
limit: 15
|
||
|
};
|
||
|
|
||
|
var PaginationRoute = Ember.Mixin.create({
|
||
|
|
||
|
/**
|
||
|
* Sets up pagination details
|
||
|
* @param {settings}: object that specifies additional pagination details
|
||
|
*/
|
||
|
setupPagination: function (settings) {
|
||
|
|
||
|
settings = settings || {};
|
||
|
settings = _.defaults(settings, defaultPaginationSettings);
|
||
|
|
||
|
this.set('paginationSettings', settings);
|
||
|
this.controller.set('paginationSettings', settings);
|
||
|
}
|
||
|
|
||
|
});
|
||
|
|
||
|
export default PaginationRoute;
|