sr-npm 1.7.343 → 1.7.345
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 +1 -1
- package/pages/careersPage.js +55 -48
package/package.json
CHANGED
package/pages/careersPage.js
CHANGED
|
@@ -183,46 +183,51 @@ function init(_$w) {
|
|
|
183
183
|
|
|
184
184
|
//URL onChange
|
|
185
185
|
onChange(async ()=>{
|
|
186
|
-
|
|
187
|
-
const newQueryParams=await location.query();
|
|
188
|
-
console.log("location.query(): ", newQueryParams);
|
|
189
|
-
if(newQueryParams.keyWord){
|
|
190
|
-
console.log("setting querykeyparam")
|
|
191
|
-
queryKeyWordVar=newQueryParams.keyWord;
|
|
192
|
-
}
|
|
193
|
-
else
|
|
194
|
-
{
|
|
195
|
-
queryKeyWordVar=undefined;
|
|
196
|
-
_$w('#searchInput').value = '';
|
|
197
|
-
deletedParam=true;
|
|
198
|
-
}
|
|
199
|
-
if(newQueryParams.department){
|
|
200
|
-
console.log("setting queryDepartmentVar")
|
|
201
|
-
queryDepartmentVar=newQueryParams.department;
|
|
202
|
-
}
|
|
203
|
-
else
|
|
204
|
-
{
|
|
205
|
-
queryDepartmentVar=undefined;
|
|
206
|
-
_$w('#dropdownDepartment').value = '';
|
|
207
|
-
deletedParam=true;
|
|
208
|
-
}
|
|
209
|
-
if(newQueryParams.location){
|
|
210
|
-
console.log("setting queryLocationVar")
|
|
211
|
-
queryLocationVar=newQueryParams.location;
|
|
212
|
-
}
|
|
213
|
-
else
|
|
214
|
-
{
|
|
215
|
-
queryLocationVar=undefined;
|
|
216
|
-
_$w('#dropdownLocation').value = '';
|
|
217
|
-
deletedParam=true;
|
|
218
|
-
}
|
|
186
|
+
|
|
219
187
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
// handleBackAndForth(_$w);
|
|
192
|
+
// const newQueryParams=await location.query();
|
|
193
|
+
// console.log("location.query(): ", newQueryParams);
|
|
194
|
+
// if(newQueryParams.keyWord){
|
|
195
|
+
// console.log("setting querykeyparam")
|
|
196
|
+
// queryKeyWordVar=newQueryParams.keyWord;
|
|
197
|
+
// }
|
|
198
|
+
// else
|
|
199
|
+
// {
|
|
200
|
+
// queryKeyWordVar=undefined;
|
|
201
|
+
// _$w('#searchInput').value = '';
|
|
202
|
+
// deletedParam=true;
|
|
203
|
+
// }
|
|
204
|
+
// if(newQueryParams.department){
|
|
205
|
+
// console.log("setting queryDepartmentVar")
|
|
206
|
+
// queryDepartmentVar=newQueryParams.department;
|
|
207
|
+
// }
|
|
208
|
+
// else
|
|
209
|
+
// {
|
|
210
|
+
// queryDepartmentVar=undefined;
|
|
211
|
+
// _$w('#dropdownDepartment').value = '';
|
|
212
|
+
// deletedParam=true;
|
|
213
|
+
// }
|
|
214
|
+
// if(newQueryParams.location){
|
|
215
|
+
// console.log("setting queryLocationVar")
|
|
216
|
+
// queryLocationVar=newQueryParams.location;
|
|
217
|
+
// }
|
|
218
|
+
// else
|
|
219
|
+
// {
|
|
220
|
+
// queryLocationVar=undefined;
|
|
221
|
+
// _$w('#dropdownLocation').value = '';
|
|
222
|
+
// deletedParam=true;
|
|
223
|
+
// }
|
|
224
|
+
|
|
225
|
+
// await handleUrlParams(_$w);
|
|
226
|
+
// if(deletedParam)
|
|
227
|
+
// {
|
|
228
|
+
// await applyFilters(_$w,true);
|
|
229
|
+
// deletedParam=false;
|
|
230
|
+
// }
|
|
226
231
|
});
|
|
227
232
|
|
|
228
233
|
|
|
@@ -253,9 +258,9 @@ async function applyFilters(_$w, skipUrlUpdate = false) {
|
|
|
253
258
|
filter.value = '';
|
|
254
259
|
if (!skipUrlUpdate) {
|
|
255
260
|
queryParams.remove(["keyWord", "department","page","location"]);
|
|
256
|
-
queryKeyWordVar=undefined;
|
|
257
|
-
queryDepartmentVar=undefined;
|
|
258
|
-
queryLocationVar=undefined;
|
|
261
|
+
// queryKeyWordVar=undefined;
|
|
262
|
+
// queryDepartmentVar=undefined;
|
|
263
|
+
// queryLocationVar=undefined;
|
|
259
264
|
}
|
|
260
265
|
}
|
|
261
266
|
|
|
@@ -264,15 +269,15 @@ async function applyFilters(_$w, skipUrlUpdate = false) {
|
|
|
264
269
|
if (!skipUrlUpdate) {
|
|
265
270
|
if(filter.field === 'title'){
|
|
266
271
|
queryParams.add({ keyWord: filter.value });
|
|
267
|
-
|
|
272
|
+
// queryKeyWordVar=filter.value;
|
|
268
273
|
}
|
|
269
274
|
if(filter.field === 'department'){
|
|
270
275
|
queryParams.add({ department: encodeURIComponent(filter.value) });
|
|
271
|
-
queryDepartmentVar=filter.value;
|
|
276
|
+
//queryDepartmentVar=filter.value;
|
|
272
277
|
}
|
|
273
278
|
if(filter.field === 'cityText'){
|
|
274
279
|
queryParams.add({ location: encodeURIComponent(filter.value) });
|
|
275
|
-
queryLocationVar=filter.value;
|
|
280
|
+
//queryLocationVar=filter.value;
|
|
276
281
|
}
|
|
277
282
|
}
|
|
278
283
|
if(filter.field === 'remote') {
|
|
@@ -286,15 +291,17 @@ async function applyFilters(_$w, skipUrlUpdate = false) {
|
|
|
286
291
|
if (!skipUrlUpdate) {
|
|
287
292
|
if(filter.field === 'title'){
|
|
288
293
|
queryParams.remove(["keyWord" ]);
|
|
289
|
-
|
|
294
|
+
// queryKeyWordVar=undefined;
|
|
290
295
|
}
|
|
291
296
|
if(filter.field === 'department'){
|
|
297
|
+
console.log("removing department from url")
|
|
292
298
|
queryParams.remove(["department" ]);
|
|
293
|
-
|
|
299
|
+
// queryDepartmentVar=undefined;
|
|
294
300
|
}
|
|
295
301
|
if(filter.field === 'cityText'){
|
|
302
|
+
console.log("removing location from url")
|
|
296
303
|
queryParams.remove(["location" ]);
|
|
297
|
-
|
|
304
|
+
// queryLocationVar=undefined;
|
|
298
305
|
}
|
|
299
306
|
}
|
|
300
307
|
}
|