sr-npm 1.7.1295 → 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.1295",
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);
@@ -114,7 +125,8 @@ async function clearAll(_$w,urlOnChange=false) {
114
125
 
115
126
  }
116
127
 
117
- function handleFilterButton(_$w) {
128
+ function handleFilterButton(_$w,formFactor) {
129
+
118
130
  const searchResultsSelectors = [
119
131
  CAREERS_PAGE_SELECTORS.RESULT_BOX,
120
132
  CAREERS_PAGE_SELECTORS.PAGINATION_BTN,
@@ -159,10 +171,23 @@ function handleFilterButton(_$w) {
159
171
  });
160
172
 
161
173
  //onmobile we should collapse the filter box and the refine search button by default
174
+ if(formFactor === "Mobile" || formFactor === "Tablet") {
162
175
  mobileFilterBoxSelectors.forEach(selector => {
163
176
  _$w(selector).collapse();
164
177
  });
165
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
+ }
166
191
 
167
192
 
168
193
  async function handleUrlParams(_$w,urlParams,handleBackAndForth=false) {