| | |
| | | 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'); |
| | |
| | | /** |
| | | * Highlight/unhighlight a row |
| | | */ |
| | | highlight_row: function(id, multiple) |
| | | highlight_row: function(id, multiple, norecur) |
| | | { |
| | | if (!this.rows[id]) |
| | | return; |
| | |
| | | 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 |
| | |
| | | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | for (i=0; i<len; i++) { |
| | | selected = this.in_selection(children[i]); |
| | | if ((status && !selected) || (!status && selected)) |
| | | this.highlight_row(children[i], true); |
| | | this.highlight_row(children[i], true, true); |
| | | } |
| | | }, |
| | | |