Revision 2354f07d
Von Moritz Bunkus vor etwa 8 Jahren hinzugefügt
js/kivi.js | ||
---|---|---|
if (!found)
|
||
console.log('No duplicate IDs found :)');
|
||
};
|
||
|
||
// Verifies that at least one checkbox matching the
|
||
// "checkbox_selector" is actually checked. If not, an error message
|
||
// is shown, and false is returned. Otherwise (at least one of them
|
||
// is checked) nothing is shown and true returned.
|
||
//
|
||
// Can be used in checks when clicking buttons.
|
||
ns.check_if_entries_selected = function(checkbox_selector) {
|
||
if ($(checkbox_selector + ':checked').length > 0)
|
||
return true;
|
||
|
||
alert(kivi.t8('No entries have been selected.'));
|
||
|
||
return false;
|
||
};
|
||
});
|
||
|
||
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.