diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-05-31 11:12:04 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-05-31 11:12:04 +0000 |
| commit | 3bd3b519e80923d075eda705a1c50d01de22536c (patch) | |
| tree | 2510823abc75a1e93b4c64ffeb9844d34ae073a9 /roundcubemail/program/js/list.js | |
| parent | 4b63a58ffa073eec25b7672a673ade54ee779ad3 (diff) | |
- Added possibility to invert messages selection
git-svn-id: https://svn.roundcube.net/trunk@2581 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js/list.js')
| -rw-r--r-- | roundcubemail/program/js/list.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/roundcubemail/program/js/list.js b/roundcubemail/program/js/list.js index addd1e652..51889fa30 100644 --- a/roundcubemail/program/js/list.js +++ b/roundcubemail/program/js/list.js @@ -530,6 +530,30 @@ select_all: function(filter) /** + * Invert selection + */ +invert_selection: function() +{ + if (!this.rows || !this.rows.length) + return false; + + // remember old selection + var select_before = this.selection.join(','); + + for (var n in this.rows) + this.highlight_row(n, true); + + // trigger event if selection changed + if (this.selection.join(',') != select_before) + this.triggerEvent('select'); + + this.focus(); + + return true; +}, + + +/** * Unselect selected row(s) */ clear_selection: function(id) |
