diff --git a/scripts/explorer.js b/scripts/explorer.js index 47f4311..99a8c3e 100644 --- a/scripts/explorer.js +++ b/scripts/explorer.js @@ -510,13 +510,23 @@ jQuery(document).ready(function($) // pagination + function getPageRange() + { + if (window.innerWidth >= 600) + return 6; + else if (window.innerWidth < 600 && window.innerWidth > 450) + return 4; + else + return 2; + } + var currentPage = 0; var previousArray = [] var options = { dataSource: paintingList, pageSize: pageSize, - pageRange: 6, + pageRange: getPageRange(), className: 'paginationjs-theme-ginou', callback: function (response, pagination) { diff --git a/scripts/exposition.js b/scripts/exposition.js index c921827..66c3cb8 100644 --- a/scripts/exposition.js +++ b/scripts/exposition.js @@ -38,13 +38,23 @@ jQuery(document).ready(function($) if (urlParams.get('page') != "") targetPage = urlParams.get('page'); + function getPageRange() + { + if (window.innerWidth >= 600) + return null; + else if (window.innerWidth < 600 && window.innerWidth > 450) + return 4; + else + return 2; + } + var currentPage = 0; var previousArray = [] var options = { dataSource: paintingList, pageSize: pageSize, - pageRange: null, + pageRange: getPageRange(), className: 'paginationjs-theme-ginou', callback: function (response, pagination) {