sr-npm 1.7.732 → 1.7.734
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
|
@@ -25,14 +25,12 @@ async function careersMultiBoxesPageOnReady(_$w,urlParams) {
|
|
|
25
25
|
await bindSearchInput(_$w);
|
|
26
26
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.CLEAR_ALL_BUTTON_ID).onClick(async () => {
|
|
27
27
|
console.log("clear all button clicked");
|
|
28
|
-
if(selectedByField.size>0) {
|
|
28
|
+
if(selectedByField.size>0 || _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.SECONDARY_SEARCH_INPUT).value) {
|
|
29
29
|
for(const field of allfields) {
|
|
30
30
|
_$w(`#${FiltersIds[field.title]}CheckBox`).selectedIndices = [];
|
|
31
31
|
}
|
|
32
32
|
selectedByField.clear();
|
|
33
|
-
console.log(" _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.SECONDARY_SEARCH_INPUT).value ",_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.SECONDARY_SEARCH_INPUT).value );
|
|
34
33
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.SECONDARY_SEARCH_INPUT).value='';
|
|
35
|
-
console.log(" _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.SECONDARY_SEARCH_INPUT).value after clearing ",_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.SECONDARY_SEARCH_INPUT).value );
|
|
36
34
|
await updateJobsAndNumbersAndFilters(_$w,true);
|
|
37
35
|
}
|
|
38
36
|
});
|
|
@@ -330,6 +328,12 @@ async function loadJobsRepeater(_$w) {
|
|
|
330
328
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER).data = jobsFirstPage;
|
|
331
329
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationCurrentText).text = jobsFirstPage.length.toString();
|
|
332
330
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationTotalCountText).text = currentJobs.length.toString();
|
|
331
|
+
if(jobsFirstPage.length===0) {
|
|
332
|
+
await _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_MULTI_STATE_BOX).changeState("noJobs");
|
|
333
|
+
}
|
|
334
|
+
else{
|
|
335
|
+
await _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_MULTI_STATE_BOX).changeState("searchResult");
|
|
336
|
+
}
|
|
333
337
|
pagination.currentPage=1;
|
|
334
338
|
handlePaginationButtons(_$w);
|
|
335
339
|
}
|
|
@@ -398,7 +402,7 @@ async function refreshFacetCounts(_$w,clearAll=false) {
|
|
|
398
402
|
function primarySearch(_$w,query) {
|
|
399
403
|
console.log("primary search query: ", query);
|
|
400
404
|
}
|
|
401
|
-
function secondarySearch(_$w,query) {
|
|
405
|
+
async function secondarySearch(_$w,query) {
|
|
402
406
|
if(query.length===0) {
|
|
403
407
|
secondarySearchJobs=currentJobs;
|
|
404
408
|
}
|
|
@@ -411,18 +415,24 @@ function secondarySearch(_$w,query) {
|
|
|
411
415
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationCurrentText).text = jobsFirstPage.length.toString();
|
|
412
416
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationTotalCountText).text = secondarySearchJobs.length.toString();
|
|
413
417
|
pagination.currentPage=1;
|
|
418
|
+
if(jobsFirstPage.length===0) {
|
|
419
|
+
await _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_MULTI_STATE_BOX).changeState("noJobs");
|
|
420
|
+
}
|
|
421
|
+
else{
|
|
422
|
+
await _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_MULTI_STATE_BOX).changeState("results");
|
|
423
|
+
}
|
|
414
424
|
handlePaginationButtons(_$w,true);
|
|
415
425
|
updateTotalJobsCountText(_$w,true);
|
|
416
426
|
return secondarySearchJobs;
|
|
417
427
|
}
|
|
418
|
-
function bindSearchInput(_$w) {
|
|
428
|
+
async function bindSearchInput(_$w) {
|
|
419
429
|
const primarySearchDebounced = debounce(() => {
|
|
420
430
|
const query = (_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.SEARCH_INPUT).value || '').toLowerCase().trim();
|
|
421
431
|
primarySearch(_$w, query);
|
|
422
432
|
}, 150);
|
|
423
|
-
const secondarySearchDebounced = debounce(() => {
|
|
433
|
+
const secondarySearchDebounced = debounce(async () => {
|
|
424
434
|
const query = (_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.SECONDARY_SEARCH_INPUT).value || '').toLowerCase().trim();
|
|
425
|
-
secondarySearch(_$w, query);
|
|
435
|
+
await secondarySearch(_$w, query);
|
|
426
436
|
}, 150);
|
|
427
437
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.SEARCH_INPUT).onInput(primarySearchDebounced);
|
|
428
438
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.SECONDARY_SEARCH_INPUT).onInput(secondarySearchDebounced);
|