Revision abead59d
Von Moritz Bunkus vor etwa 11 Jahren hinzugefügt
js/kivi.js | ||
---|---|---|
28 | 28 |
}; |
29 | 29 |
|
30 | 30 |
ns.reinit_widgets = function() { |
31 |
$('.datepicker').each(function() {
|
|
32 |
$(this).datepicker();
|
|
31 |
ns.run_once_for('.datepicker', 'datepicker', function(elt) {
|
|
32 |
$(elt).datepicker();
|
|
33 | 33 |
}); |
34 | 34 |
|
35 | 35 |
if (ns.PartPicker) |
36 |
$('input.part_autocomplete').each(function(idx, elt){
|
|
36 |
ns.run_once_for('input.part_autocomplete', 'part_picker', function(elt) {
|
|
37 | 37 |
kivi.PartPicker($(elt)); |
38 | 38 |
}); |
39 | 39 |
}; |
templates/webpages/layout/javascript_setup.js | ||
---|---|---|
15 | 15 |
buttonImageOnly: true |
16 | 16 |
})); |
17 | 17 |
|
18 |
$('.datepicker').each(function() { |
|
19 |
$(this).datepicker(); |
|
20 |
}); |
|
18 |
kivi.reinit_widgets(); |
|
21 | 19 |
[% END %] |
22 | 20 |
|
23 | 21 |
[% IF ajax_spinner %] |
Auch abrufbar als: Unified diff
JS-Setup: kivi.reinit_widgets() nutzen und dort Controls nur einmalig initialisieren