+ ns.hide_second_row = function(row) {
+ $(row).children().not(':first').hide();
+ $(row).data('expanded', 0);
+ var elt = $(row).find('.expand');
+ elt.attr('src', "image/expand.svg");
+ elt.attr('alt', kivi.t8('Show details'));
+ elt.attr('title', kivi.t8('Show details'));
+ };
+
+ ns.show_second_row = function(row) {
+ $(row).children().not(':first').show();
+ $(row).data('expanded', 1);
+ var elt = $(row).find('.expand');
+ elt.attr('src', "image/collapse.svg");
+ elt.attr('alt', kivi.t8('Hide details'));
+ elt.attr('title', kivi.t8('Hide details'));
+ };
+
+ ns.toggle_second_row = function(row) {
+ if ($(row).data('expanded') == 1) {
+ ns.hide_second_row(row);
+ } else {
+ ns.show_second_row(row);
+ }
+ };