mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
a3456b7e1c
* Adds `bind`, `isFinite`, and `isNumber` utility functions from lodash. * Use new util funtions instead of lodash throughout the codebase. * Remove lodash from vendor builds.
27 lines
662 B
JavaScript
27 lines
662 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 || {};
|
|
for (var key in defaultPaginationSettings) {
|
|
if (!settings.hasOwnProperty(key)) {
|
|
settings[key] = defaultPaginationSettings[key];
|
|
}
|
|
}
|
|
|
|
this.set('paginationSettings', settings);
|
|
this.controller.set('paginationSettings', settings);
|
|
}
|
|
|
|
});
|
|
|
|
export default PaginationRoute;
|