Revize fb32f0e8
Přidáno uživatelem Ondřej Anděl před více než 3 roky(ů)
application/view/library/vanillaSelectBox/vanillaSelectBox.js | ||
---|---|---|
22 | 22 |
https://github.com/PhilippeMarcMeyer/vanillaSelectBox |
23 | 23 |
*/ |
24 | 24 |
|
25 |
|
|
26 |
function getValues(id) { |
|
27 |
let result = []; |
|
28 |
let collection = document.querySelectorAll("#" + id + " option"); |
|
29 |
collection.forEach(function (x) { |
|
30 |
if (x.selected) { |
|
31 |
result.push(x.value); |
|
32 |
} |
|
33 |
}); |
|
34 |
return result; |
|
35 |
} |
|
36 |
|
|
25 | 37 |
let VSBoxCounter = function () { |
26 | 38 |
let count = 0; |
27 | 39 |
let instances = []; |
... | ... | |
529 | 541 |
selectedTexts = nrActives + " " + wordForItems; |
530 | 542 |
} |
531 | 543 |
} |
532 |
self.title.textContent = selectedTexts; |
|
544 |
//self.title.textContent = selectedTexts; |
|
545 |
let result = nrActives; |
|
546 |
if(nrActives < 1){ |
|
547 |
result = "Nevybráno"; |
|
548 |
} else if(nrActives === 1){ |
|
549 |
result += " rukopis"; |
|
550 |
} else if(nrActives < 5){ |
|
551 |
result += " rukopisy"; |
|
552 |
} else { |
|
553 |
result += " rukopisů"; |
|
554 |
} |
|
555 |
|
|
556 |
self.title.textContent = result; |
|
533 | 557 |
|
534 | 558 |
self.checkUncheckAll(); |
535 | 559 |
self.privateSendChange(); |
... | ... | |
716 | 740 |
selectedTexts = nrActives + " " + wordForItems; |
717 | 741 |
} |
718 | 742 |
} |
719 |
self.title.textContent = selectedTexts; |
|
743 |
//self.title.textContent = selectedTexts; |
|
744 |
let result = nrActives; |
|
745 |
if(nrActives < 1){ |
|
746 |
result = "Nevybráno"; |
|
747 |
} else if(nrActives === 1){ |
|
748 |
result += " rukopis"; |
|
749 |
} else if(nrActives < 5){ |
|
750 |
result += " rukopisy"; |
|
751 |
} else { |
|
752 |
result += " rukopisů"; |
|
753 |
} |
|
754 |
|
|
755 |
self.title.textContent = result; |
|
720 | 756 |
self.privateSendChange(); |
721 | 757 |
} |
722 | 758 |
self.checkUncheckAll(); |
Také k dispozici: Unified diff
Feature #8349: Napojení metod serveru