Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 138ee2db

Von Sven Schöling vor mehr als 15 Jahren hinzugefügt

  • ID 138ee2dba1810f6070ce2b5bac79ebffde1f3f58
  • Vorgänger 2ee3f0d7
  • Nachfolger 9ef2729a

show_details über toggle (experimentell)

Unterschiede anzeigen:

templates/webpages/oe/sales_order_de.html
[% USE HTML %]
<tr>
<td>
<input type="hidden" name="show_details" value="[% HTML.escape(show_details) %]">
<input type="checkbox" id="cb_show_details" onclick="show_form_details([% IF show_details %]0[% ELSE %]1[% END %]);"[%- IF show_details %] checked[% END %]>
<input type="checkbox" id="cb_show_details" name="show_details" [%- IF show_details %] checked[% END %]>
<label for="cb_show_details">Details anzeigen</label><br>
<script type="text/javascript">
$('#cb_show_details').click(function(){ $('[id$="row2"]').toggle() });
</script>
<table width="100%">
<tr class="listheading">[% FOREACH header = HEADER %][% IF header.display %]
<th align="left" nowrap width="[% header.width %]" class="listheading">[% header.value %]</th>[% END %][% END %]
......
[% FOREACH hidden = row.HIDDENS %][% hidden.value %]
[% END %]
<tr class="listrow[% loop.count % 2 %]" [% UNLESS show_details %]style="display:none;"[% END %]><td colspan="[% row.colspan %]">[% FOREACH row2 = row.ROW2 %]
<tr class="listrow[% loop.count % 2 %]" id="[% loop.count %].row2" [% UNLESS show_details %]style="display:none;"[% END %]><td colspan="[% row.colspan %]">[% FOREACH row2 = row.ROW2 %]
[% IF row2.line_break %]<br/>[% END %]
[% row2.value %][% END %]
</td></tr>
templates/webpages/oe/sales_order_master.html
[% USE HTML %]
<tr>
<td>
<input type="hidden" name="show_details" value="[% HTML.escape(show_details) %]">
<input type="checkbox" id="cb_show_details" onclick="show_form_details([% IF show_details %]0[% ELSE %]1[% END %]);"[%- IF show_details %] checked[% END %]>
<input type="checkbox" id="cb_show_details" name="show_details" [%- IF show_details %] checked[% END %]>
<label for="cb_show_details"><translate>Show details</translate></label><br>
<script type="text/javascript">
$('#cb_show_details').click(function(){ $('[id$="row2"]').toggle() });
</script>
<table width="100%">
<tr class="listheading">[% FOREACH header = HEADER %][% IF header.display %]
<th align="left" nowrap width="[% header.width %]" class="listheading">[% header.value %]</th>[% END %][% END %]
......
[% FOREACH hidden = row.HIDDENS %][% hidden.value %]
[% END %]
<tr class="listrow[% loop.count % 2 %]" [% UNLESS show_details %]style="display:none;"[% END %]><td colspan="[% row.colspan %]">[% FOREACH row2 = row.ROW2 %]
<tr class="listrow[% loop.count % 2 %]" id="[% loop.count %].row2" [% UNLESS show_details %]style="display:none;"[% END %]><td colspan="[% row.colspan %]">[% FOREACH row2 = row.ROW2 %]
[% IF row2.line_break %]<br/>[% END %]
[% row2.value %][% END %]
</td></tr>

Auch abrufbar als: Unified diff