sr-npm 1.7.733 → 1.7.735
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
|
@@ -328,6 +328,12 @@ async function loadJobsRepeater(_$w) {
|
|
|
328
328
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER).data = jobsFirstPage;
|
|
329
329
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationCurrentText).text = jobsFirstPage.length.toString();
|
|
330
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
|
+
}
|
|
331
337
|
pagination.currentPage=1;
|
|
332
338
|
handlePaginationButtons(_$w);
|
|
333
339
|
}
|
|
@@ -396,7 +402,7 @@ async function refreshFacetCounts(_$w,clearAll=false) {
|
|
|
396
402
|
function primarySearch(_$w,query) {
|
|
397
403
|
console.log("primary search query: ", query);
|
|
398
404
|
}
|
|
399
|
-
function secondarySearch(_$w,query) {
|
|
405
|
+
async function secondarySearch(_$w,query) {
|
|
400
406
|
if(query.length===0) {
|
|
401
407
|
secondarySearchJobs=currentJobs;
|
|
402
408
|
}
|
|
@@ -409,18 +415,24 @@ function secondarySearch(_$w,query) {
|
|
|
409
415
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationCurrentText).text = jobsFirstPage.length.toString();
|
|
410
416
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationTotalCountText).text = secondarySearchJobs.length.toString();
|
|
411
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("searchResult");
|
|
423
|
+
}
|
|
412
424
|
handlePaginationButtons(_$w,true);
|
|
413
425
|
updateTotalJobsCountText(_$w,true);
|
|
414
426
|
return secondarySearchJobs;
|
|
415
427
|
}
|
|
416
|
-
function bindSearchInput(_$w) {
|
|
428
|
+
async function bindSearchInput(_$w) {
|
|
417
429
|
const primarySearchDebounced = debounce(() => {
|
|
418
430
|
const query = (_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.SEARCH_INPUT).value || '').toLowerCase().trim();
|
|
419
431
|
primarySearch(_$w, query);
|
|
420
432
|
}, 150);
|
|
421
|
-
const secondarySearchDebounced = debounce(() => {
|
|
433
|
+
const secondarySearchDebounced = debounce(async () => {
|
|
422
434
|
const query = (_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.SECONDARY_SEARCH_INPUT).value || '').toLowerCase().trim();
|
|
423
|
-
secondarySearch(_$w, query);
|
|
435
|
+
await secondarySearch(_$w, query);
|
|
424
436
|
}, 150);
|
|
425
437
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.SEARCH_INPUT).onInput(primarySearchDebounced);
|
|
426
438
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.SECONDARY_SEARCH_INPUT).onInput(secondarySearchDebounced);
|