ns.hide_second_row = function(row) {
$(row).children().not(':first').hide();
- $(row).data('expanded', false);
+ $(row).data('expanded', 0);
var elt = $(row).find('.expand');
elt.attr('src', "image/expand3.gif");
elt.attr('alt', kivi.t8('Show details'));
ns.show_second_row = function(row) {
$(row).children().not(':first').show();
- $(row).data('expanded', true);
+ $(row).data('expanded', 1);
var elt = $(row).find('.expand');
elt.attr('src', "image/collapse3.gif");
elt.attr('alt', kivi.t8('Hide details'));
};
ns.toggle_second_row = function(row) {
- if ($(row).data('expanded') === true) {
+ if ($(row).data('expanded') == 1) {
ns.hide_second_row(row);
} else {
ns.show_second_row(row);
$('#expand_all').on('click', function(event) {
event.preventDefault();
- if ($('#expand_all').data('expanded') === true) {
- $('#expand_all').data('expanded', false);
+ if ($('#expand_all').data('expanded') == 1) {
+ $('#expand_all').data('expanded', 0);
$('#expand_all').attr('src', 'image/expand3.gif');
$('#expand_all').attr('alt', kivi.t8('Show all details'));
$('#expand_all').attr('title', kivi.t8('Show all details'));
kivi.Order.hide_second_row(elt);
});
} else {
- $('#expand_all').data('expanded', true);
+ $('#expand_all').data('expanded', 1);
$('#expand_all').attr('src', "image/collapse3.gif");
$('#expand_all').attr('alt', kivi.t8('Hide all details'));
$('#expand_all').attr('title', kivi.t8('Hide all details'));
}
return false;
});
+
});
<tr class="listheading">
<th class="listheading" style='text-align:center' nowrap width="1">
[%- IF MYCONFIG.show_form_details %]
- [%- L.img_tag(src="image/collapse3.gif", alt=LxERP.t8('Hide all details'), title=LxERP.t8('Hide all details'), id='expand_all') %]
+ [%- 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") %]
[%- ELSE %]
[%- L.img_tag(src="image/expand3.gif", alt=LxERP.t8('Show all details'), title=LxERP.t8('Show all details'), id='expand_all') %]
[%- END %]