sr-npm 1.7.1307 → 1.7.1310

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.1307",
3
+ "version": "1.7.1310",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -40,6 +40,7 @@ let secondarySearchIsFilled=false // whether the secondary search is filled with
40
40
  let keywordAllJobs; // all jobs that are displayed in the jobs repeater when the keyword is filled
41
41
  let ActivateURLOnchange=true; // whether to activate the url onchange
42
42
  let considerAllJobs=false; // whether to consider all jobs or not
43
+ let collapseFilterBoxWhenWindowReduced=false;
43
44
  const pagination = {
44
45
  pageSize: 10,
45
46
  currentPage: 1,
@@ -64,10 +65,10 @@ async function careersMultiBoxesPageOnReady(_$w,urlParams) {
64
65
  });
65
66
 
66
67
  handleFilterButton(_$w);
67
-
68
68
  setInterval(async () => {
69
69
  const windowinfo=await window.getBoundingRect();
70
70
  if(windowinfo.window.width>1000){
71
+ collapseFilterBoxWhenWindowReduced=false;
71
72
  handleWindowResize(_$w,true);
72
73
  }
73
74
  else{
@@ -91,9 +92,13 @@ async function handleWindowResize(_$w,desktop=false) {
91
92
  _$w(CAREERS_PAGE_SELECTORS.REFINE_SEARCH_BUTTON).collapse();
92
93
  }
93
94
  else{
95
+ if(collapseFilterBoxWhenWindowReduced){
96
+ _$w(CAREERS_PAGE_SELECTORS.filterBox).collapse();
97
+ }
94
98
  if(_$w(CAREERS_PAGE_SELECTORS.FILTER_ICON).collapsed && _$w(CAREERS_PAGE_SELECTORS.EXIT_BUTTON).collapsed && _$w(CAREERS_PAGE_SELECTORS.REFINE_SEARCH_BUTTON).collapsed){
95
99
  _$w(CAREERS_PAGE_SELECTORS.FILTER_ICON).expand();
96
100
  }
101
+
97
102
  }
98
103
 
99
104
  }
@@ -178,6 +183,10 @@ async function handleFilterButton(_$w) {
178
183
  _$w(selector).collapse();
179
184
  });
180
185
  }
186
+ else//Desktop
187
+ {
188
+ collapseFilterBoxWhenWindowReduced=true;
189
+ }
181
190
 
182
191
  }
183
192
 
@@ -17,19 +17,18 @@ const {
17
17
  if(siteconfig===undefined) {
18
18
  siteconfig = await wixData.query(COLLECTIONS.SITE_CONFIGS).find().then(result => result.items[0]);
19
19
  }
20
- console.log("positionPageOnReady called");
21
20
  const item = await _$w('#datasetJobsItem').getCurrentItem();
22
- console.log("item: ",item);
21
+
23
22
  if(siteconfig.customFields==="true") {
24
23
  multiRefField=await getPositionWithMultiRefField(item._id);
25
- console.log("multiRefField: ",multiRefField);
26
-
27
- const companysegmentValue=multiRefField.filter(field => field.customField===COMPANY_SEGMENT_CUSTOM_FIELD_ID_IN_CMS && field.title==="Store Support Office" );
28
- console.log("companysegmentValue: ",companysegmentValue);
24
+
25
+
26
+ const companysegmentValue=multiRefField.filter(field => field.customField===COMPANY_SEGMENT_CUSTOM_FIELD_ID_IN_CMS && field.title===siteconfig.showNotifyMeForCompanySegment);
27
+
29
28
  if(companysegmentValue===undefined || companysegmentValue.length===0) {
30
29
 
31
30
  _$w("#notifyMe").hide()
32
- console.log("companysegmentValue is Store Support Office, hiding notifyMe");
31
+ console.log(`companysegmentValue is ${siteconfig.showNotifyMeForCompanySegment}, hiding notifyMe`);
33
32
  }
34
33
 
35
34