sr-npm 1.7.1269 → 1.7.1271
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
|
@@ -39,7 +39,7 @@ let secondarySearchIsFilled=false // whether the secondary search is filled with
|
|
|
39
39
|
let keywordAllJobs; // all jobs that are displayed in the jobs repeater when the keyword is filled
|
|
40
40
|
let ActivateURLOnchange=true; // whether to activate the url onchange
|
|
41
41
|
let considerAllJobs=false; // whether to consider all jobs or not
|
|
42
|
-
let
|
|
42
|
+
let urlOnchangeIsActive=false
|
|
43
43
|
const pagination = {
|
|
44
44
|
pageSize: 10,
|
|
45
45
|
currentPage: 1,
|
|
@@ -48,7 +48,9 @@ const pagination = {
|
|
|
48
48
|
async function careersMultiBoxesPageOnReady(_$w,urlParams) {
|
|
49
49
|
//to handle back and forth , url changes
|
|
50
50
|
onChange(async ()=>{
|
|
51
|
-
|
|
51
|
+
urlOnchangeIsActive=true;
|
|
52
|
+
await handleBackAndForth(_$w);
|
|
53
|
+
urlOnchangeIsActive=false;
|
|
52
54
|
|
|
53
55
|
});
|
|
54
56
|
await loadData(_$w);
|
|
@@ -208,10 +210,6 @@ async function handleUrlParams(_$w,urlParams,handleBackAndForth=false) {
|
|
|
208
210
|
const jobsFirstPage=currentJobs.slice(startSlicIndex,endSlicIndex);
|
|
209
211
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER).data = jobsFirstPage;
|
|
210
212
|
handlePaginationButtons(_$w);
|
|
211
|
-
if(!ActivateURLOnchange)
|
|
212
|
-
{
|
|
213
|
-
finishedUrlOnChange=true;
|
|
214
|
-
}
|
|
215
213
|
|
|
216
214
|
}
|
|
217
215
|
} catch (error) {
|
|
@@ -284,6 +282,11 @@ async function handleParams(_$w,param,values) {
|
|
|
284
282
|
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.SELECTED_VALUES_REPEATER_ITEM_LABEL).text = itemData.label || '';
|
|
285
283
|
// Deselect this value from both the selected map and the multibox
|
|
286
284
|
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.DESELECT_BUTTON_ID).onClick(async () => {
|
|
285
|
+
const currentQueryParams=await location.query();
|
|
286
|
+
if(currentQueryParams.page)
|
|
287
|
+
{
|
|
288
|
+
queryParams.remove(["page"]);
|
|
289
|
+
}
|
|
287
290
|
const fieldId = itemData.fieldId;
|
|
288
291
|
const valueId = itemData.valueId;
|
|
289
292
|
dontUpdateThisCheckBox=fieldId;
|
|
@@ -407,6 +410,11 @@ async function loadJobsRepeater(_$w) {
|
|
|
407
410
|
|
|
408
411
|
_$w(`#${FiltersIds[field.title]}CheckBox`).selectedIndices = []; // start empty
|
|
409
412
|
_$w(`#${FiltersIds[field.title]}CheckBox`).onChange(async (ev) => {
|
|
413
|
+
const currentQueryParams=await location.query();
|
|
414
|
+
if(currentQueryParams.page)
|
|
415
|
+
{
|
|
416
|
+
queryParams.remove(["page"]);
|
|
417
|
+
}
|
|
410
418
|
dontUpdateThisCheckBox=field._id;
|
|
411
419
|
const selected = ev.target.value; // array of selected value IDs
|
|
412
420
|
let fieldTitle=field.title.toLowerCase().replace(' ', '');
|
|
@@ -606,12 +614,16 @@ function getValueFromValueId(valueIds, value) {
|
|
|
606
614
|
await _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_MULTI_STATE_BOX).changeState("searchResult");
|
|
607
615
|
pagination.currentPage=1;
|
|
608
616
|
}
|
|
617
|
+
if(!urlOnchangeIsActive)
|
|
618
|
+
{
|
|
619
|
+
handlePaginationButtons(_$w);
|
|
620
|
+
}
|
|
609
621
|
|
|
610
|
-
handlePaginationButtons(_$w);
|
|
611
622
|
}
|
|
612
623
|
|
|
613
624
|
function handlePaginationButtons(_$w)
|
|
614
625
|
{
|
|
626
|
+
console.log("iamhere")
|
|
615
627
|
handlePageUrlParam();
|
|
616
628
|
|
|
617
629
|
pagination.currentPage===1 || pagination.currentPage===0? _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PAGE_BUTTON_PREVIOUS).disable():_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PAGE_BUTTON_PREVIOUS).enable();
|