Revision 2659735b
Von Bernd Bleßmann vor fast 8 Jahren hinzugefügt
js/kivi.Order.js | ||
---|---|---|
219 | 219 |
|
220 | 220 |
ns.hide_second_row = function(row) { |
221 | 221 |
$(row).children().not(':first').hide(); |
222 |
$(row).data('expanded', false);
|
|
222 |
$(row).data('expanded', 0);
|
|
223 | 223 |
var elt = $(row).find('.expand'); |
224 | 224 |
elt.attr('src', "image/expand3.gif"); |
225 | 225 |
elt.attr('alt', kivi.t8('Show details')); |
... | ... | |
228 | 228 |
|
229 | 229 |
ns.show_second_row = function(row) { |
230 | 230 |
$(row).children().not(':first').show(); |
231 |
$(row).data('expanded', true);
|
|
231 |
$(row).data('expanded', 1);
|
|
232 | 232 |
var elt = $(row).find('.expand'); |
233 | 233 |
elt.attr('src', "image/collapse3.gif"); |
234 | 234 |
elt.attr('alt', kivi.t8('Hide details')); |
... | ... | |
236 | 236 |
}; |
237 | 237 |
|
238 | 238 |
ns.toggle_second_row = function(row) { |
239 |
if ($(row).data('expanded') === true) {
|
|
239 |
if ($(row).data('expanded') == 1) {
|
|
240 | 240 |
ns.hide_second_row(row); |
241 | 241 |
} else { |
242 | 242 |
ns.show_second_row(row); |
... | ... | |
548 | 548 |
|
549 | 549 |
$('#expand_all').on('click', function(event) { |
550 | 550 |
event.preventDefault(); |
551 |
if ($('#expand_all').data('expanded') === true) {
|
|
552 |
$('#expand_all').data('expanded', false);
|
|
551 |
if ($('#expand_all').data('expanded') == 1) {
|
|
552 |
$('#expand_all').data('expanded', 0);
|
|
553 | 553 |
$('#expand_all').attr('src', 'image/expand3.gif'); |
554 | 554 |
$('#expand_all').attr('alt', kivi.t8('Show all details')); |
555 | 555 |
$('#expand_all').attr('title', kivi.t8('Show all details')); |
... | ... | |
557 | 557 |
kivi.Order.hide_second_row(elt); |
558 | 558 |
}); |
559 | 559 |
} else { |
560 |
$('#expand_all').data('expanded', true);
|
|
560 |
$('#expand_all').data('expanded', 1);
|
|
561 | 561 |
$('#expand_all').attr('src', "image/collapse3.gif"); |
562 | 562 |
$('#expand_all').attr('alt', kivi.t8('Hide all details')); |
563 | 563 |
$('#expand_all').attr('title', kivi.t8('Hide all details')); |
... | ... | |
568 | 568 |
} |
569 | 569 |
return false; |
570 | 570 |
}); |
571 |
|
|
571 | 572 |
}); |
templates/webpages/order/tabs/_row.html | ||
---|---|---|
3 | 3 |
[%- USE LxERP %] |
4 | 4 |
[%- USE L %] |
5 | 5 |
|
6 |
<tbody class="row_entry listrow"> |
|
7 |
|
|
6 |
<tbody class="row_entry listrow"[%- IF MYCONFIG.show_form_details -%] data-expanded="1"[%- END -%]> |
|
8 | 7 |
<tr> |
9 | 8 |
<td align="center"> |
10 | 9 |
[%- IF MYCONFIG.show_form_details %] |
templates/webpages/order/tabs/basic_data.html | ||
---|---|---|
157 | 157 |
<tr class="listheading"> |
158 | 158 |
<th class="listheading" style='text-align:center' nowrap width="1"> |
159 | 159 |
[%- IF MYCONFIG.show_form_details %] |
160 |
[%- L.img_tag(src="image/collapse3.gif", alt=LxERP.t8('Hide all details'), title=LxERP.t8('Hide all details'), id='expand_all') %] |
|
160 |
[%- L.img_tag(src="image/collapse3.gif", alt=LxERP.t8('Hide all details'), title=LxERP.t8('Hide all details'), id='expand_all', "data-expanded"="1") %]
|
|
161 | 161 |
[%- ELSE %] |
162 | 162 |
[%- L.img_tag(src="image/expand3.gif", alt=LxERP.t8('Show all details'), title=LxERP.t8('Show all details'), id='expand_all') %] |
163 | 163 |
[%- END %] |
Auch abrufbar als: Unified diff
Auftrags-Controller: 2. Zeilen beim 1. Klick einklappen, wenn Detailsanzeige an
Wenn die Detailanzeige per Voreinstellung immer an war, musste man zweimal
zum Einklappen der zweiten Zeile klicken, da das Daten-Attribut "expanded"
nicht gesetzt war.