Revision 2354f07d
Von Moritz Bunkus vor fast 8 Jahren hinzugefügt
js/kivi.js | ||
---|---|---|
459 | 459 |
if (!found) |
460 | 460 |
console.log('No duplicate IDs found :)'); |
461 | 461 |
}; |
462 |
|
|
463 |
// Verifies that at least one checkbox matching the |
|
464 |
// "checkbox_selector" is actually checked. If not, an error message |
|
465 |
// is shown, and false is returned. Otherwise (at least one of them |
|
466 |
// is checked) nothing is shown and true returned. |
|
467 |
// |
|
468 |
// Can be used in checks when clicking buttons. |
|
469 |
ns.check_if_entries_selected = function(checkbox_selector) { |
|
470 |
if ($(checkbox_selector + ':checked').length > 0) |
|
471 |
return true; |
|
472 |
|
|
473 |
alert(kivi.t8('No entries have been selected.')); |
|
474 |
|
|
475 |
return false; |
|
476 |
}; |
|
462 | 477 |
}); |
463 | 478 |
|
464 | 479 |
kivi = namespace('kivi'); |
Auch abrufbar als: Unified diff
kivi.js: Funktion zur Prüfung, ob mindestens eine Checkbox gecheckt ist
Kann benutzt werden, um Prüfungen vor Submits zu realisieren.