From 84243db8c7bcb0b6cf981a46b409b48c4005842e Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 5 Apr 2013 13:36:38 +0200 Subject: Fix selecting collapsed rows on select-all (#1489036) Conflicts: CHANGELOG --- program/js/list.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'program') diff --git a/program/js/list.js b/program/js/list.js index 6b8bb39c7..ac3a3bf5d 100644 --- a/program/js/list.js +++ b/program/js/list.js @@ -824,7 +824,7 @@ select_all: function(filter) for (n in this.rows) { if (!filter || this.rows[n][filter] == true) { this.last_selected = n; - this.highlight_row(n, true); + this.highlight_row(n, true, true); } else { $(this.rows[n].obj).removeClass('selected').removeClass('unfocused'); @@ -919,7 +919,7 @@ get_single_selection: function() /** * Highlight/unhighlight a row */ -highlight_row: function(id, multiple) +highlight_row: function(id, multiple, norecur) { if (!this.rows[id]) return; @@ -935,7 +935,7 @@ highlight_row: function(id, multiple) if (!this.in_selection(id)) { // select row this.selection.push(id); $(this.rows[id].obj).addClass('selected'); - if (!this.rows[id].expanded) + if (!norecur && !this.rows[id].expanded) this.highlight_children(id, true); } else { // unselect row @@ -945,7 +945,7 @@ highlight_row: function(id, multiple) this.selection = a_pre.concat(a_post); $(this.rows[id].obj).removeClass('selected').removeClass('unfocused'); - if (!this.rows[id].expanded) + if (!norecur && !this.rows[id].expanded) this.highlight_children(id, false); } } @@ -963,7 +963,7 @@ highlight_children: function(id, status) for (i=0; i