sr-npm 1.7.1294 → 1.7.1296

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.1294",
3
+ "version": "1.7.1296",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -63,6 +63,17 @@ async function careersMultiBoxesPageOnReady(_$w,urlParams) {
63
63
  await clearAll(_$w);
64
64
  });
65
65
 
66
+ setInterval(async () => {
67
+ const windowinfo=await window.getBoundingRect();
68
+ if(windowinfo.window.width>1000){
69
+ handleFilterButton(_$w,"Desktop");
70
+ }
71
+ else{
72
+ const formFactor = await window.formFactor();
73
+ handleFilterButton(_$w,formFactor);
74
+ }
75
+ }, 600);
76
+
66
77
  const formFactor = await window.formFactor();
67
78
  if(formFactor === "Mobile" || formFactor === "Tablet") {
68
79
  handleFilterButton(_$w);
@@ -71,8 +82,12 @@ async function careersMultiBoxesPageOnReady(_$w,urlParams) {
71
82
  }
72
83
 
73
84
  async function handleBackAndForth(_$w){
74
-
85
+ if(ActivateURLOnchange) {
75
86
  await clearAll(_$w);
87
+ }
88
+ else{
89
+ ActivateURLOnchange=true;
90
+ }
76
91
 
77
92
  // if(ActivateURLOnchange) {
78
93
  // const newQueryParams=await location.query();
@@ -110,7 +125,8 @@ async function clearAll(_$w,urlOnChange=false) {
110
125
 
111
126
  }
112
127
 
113
- function handleFilterButton(_$w) {
128
+ function handleFilterButton(_$w,formFactor) {
129
+
114
130
  const searchResultsSelectors = [
115
131
  CAREERS_PAGE_SELECTORS.RESULT_BOX,
116
132
  CAREERS_PAGE_SELECTORS.PAGINATION_BTN,
@@ -155,10 +171,23 @@ function handleFilterButton(_$w) {
155
171
  });
156
172
 
157
173
  //onmobile we should collapse the filter box and the refine search button by default
174
+ if(formFactor === "Mobile" || formFactor === "Tablet") {
158
175
  mobileFilterBoxSelectors.forEach(selector => {
159
176
  _$w(selector).collapse();
160
177
  });
161
178
  }
179
+ else{
180
+ mobileFilterBoxSelectors.forEach(selector => {
181
+ _$w(selector).expand();
182
+ });
183
+ searchResultsSelectors.forEach(selector => {
184
+ _$w(selector).expand();
185
+ });
186
+ _$w(CAREERS_PAGE_SELECTORS.FILTER_ICON).collapse();
187
+ _$w(CAREERS_PAGE_SELECTORS.EXIT_BUTTON).collapse();
188
+ _$w(CAREERS_PAGE_SELECTORS.REFINE_SEARCH_BUTTON).collapse();
189
+ }
190
+ }
162
191
 
163
192
 
164
193
  async function handleUrlParams(_$w,urlParams,handleBackAndForth=false) {
@@ -405,8 +434,21 @@ async function loadJobsRepeater(_$w) {
405
434
 
406
435
  _$w(`#${FiltersIds[field.title]}CheckBox`).selectedIndices = []; // start empty
407
436
  _$w(`#${FiltersIds[field.title]}CheckBox`).onChange(async (ev) => {
408
- const formFactor = await window.formFactor();
409
- console.log("formFactor: ", formFactor);
437
+
438
+ window.getBoundingRect().then((windowSizeInfo) => {
439
+ let windowHeight = windowSizeInfo.window.height; // 565
440
+ let windowWidth = windowSizeInfo.window.width; // 1269
441
+ let documentHeight = windowSizeInfo.document.height; // 780
442
+ let documentWidth = windowSizeInfo.document.width; // 1269
443
+ let scrollX = windowSizeInfo.scroll.x; // 0
444
+ let scrollY = windowSizeInfo.scroll.y; // 120
445
+ console.log("windowHeight: ", windowHeight);
446
+ console.log("windowWidth: ", windowWidth);
447
+ console.log("documentHeight: ", documentHeight);
448
+ console.log("documentWidth: ", documentWidth);
449
+ console.log("scrollX: ", scrollX);
450
+ console.log("scrollY: ", scrollY);
451
+ });
410
452
  dontUpdateThisCheckBox=field._id;
411
453
  const selected = ev.target.value; // array of selected value IDs
412
454
  let fieldTitle=field.title.toLowerCase().replace(' ', '');