Revision b671b160
Von Sven Schöling vor fast 11 Jahren hinzugefügt
js/jquery.checkall.js | ||
---|---|---|
7 | 7 |
;(function($) { |
8 | 8 |
|
9 | 9 |
$.fn.extend({ |
10 |
checkall: function(target, property) { |
|
10 |
checkall: function(target, property, inverted) {
|
|
11 | 11 |
if (property == null) |
12 | 12 |
property = 'checked'; |
13 | 13 |
return $(this).click(function() { |
14 |
$(target).prop(property, $(this).prop('checked')); |
|
14 |
$(target).prop(property, inverted ? !$(this).prop('checked') : $(this).prop('checked'));
|
|
15 | 15 |
}); |
16 | 16 |
} |
17 | 17 |
}); |
templates/webpages/dunning/show_dunning_bottom.html | ||
---|---|---|
17 | 17 |
</form> |
18 | 18 |
<script type='text/javascript'> |
19 | 19 |
$(function() { |
20 |
$("select[name='language_id']").prop('disabled', $('#force_lang').prop('checked')); |
|
21 |
$('#force_lang').checkall('select[name="language_id"]', 'disabled'); |
|
20 |
$("select[name='language_id']").prop('disabled', !$('#force_lang').prop('checked'));
|
|
21 |
$('#force_lang').checkall('select[name="language_id"]', 'disabled', 'inverted');
|
|
22 | 22 |
}); |
23 | 23 |
</script> |
Auch abrufbar als: Unified diff
jquery.checkall für Mahnungen invertiert