sr-npm 1.7.725 → 1.7.726
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -51,9 +51,26 @@ async function handleUrlParams(_$w,urlParams) {
|
|
|
51
51
|
if(applyFiltering) {
|
|
52
52
|
await updateJobsAndNumbersAndFilters(_$w);
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
if(urlParams.page) {
|
|
55
|
+
console.log("urlParams.page: ", urlParams.page);
|
|
56
|
+
if(Number.isNaN(Number(urlParams.page)) || Number(urlParams.page)<=1 || Number(urlParams.page)>Math.ceil(currentJobs.length/pagination.pageSize)) {
|
|
57
|
+
console.log("page number is invalid, removing page from url");
|
|
58
|
+
queryParams.remove(["page"]);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
console.log("(Number(urlParams.page)*pagination.pageSize).toString(); ", (Number(urlParams.page)*pagination.pageSize).toString());
|
|
63
|
+
let paginationCurrentText=Number(urlParams.page)*pagination.pageSize
|
|
64
|
+
if(Number(urlParams.page)==Math.ceil(currentJobs.length/pagination.pageSize)) {
|
|
65
|
+
console.log("last page, subtracting the remaining jobs from the pagination current text");
|
|
66
|
+
paginationCurrentText=paginationCurrentText-(currentJobs.length%pagination.pageSize);
|
|
67
|
+
}
|
|
68
|
+
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationCurrentText).text = paginationCurrentText.toString();
|
|
69
|
+
pagination.currentPage=Number(urlParams.page);
|
|
70
|
+
const jobsFirstPage=currentJobs.slice(pagination.pageSize*(pagination.currentPage),pagination.pageSize*pagination.currentPage);
|
|
71
|
+
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER).data = jobsFirstPage;
|
|
72
|
+
handlePaginationButtons(_$w);
|
|
73
|
+
}
|
|
57
74
|
}
|
|
58
75
|
|
|
59
76
|
async function handleParams(_$w,param,value) {
|