From 3bd3b519e80923d075eda705a1c50d01de22536c Mon Sep 17 00:00:00 2001 From: alec Date: Sun, 31 May 2009 11:12:04 +0000 Subject: - Added possibility to invert messages selection git-svn-id: https://svn.roundcube.net/trunk@2581 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/js/list.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'roundcubemail/program/js/list.js') 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 @@ -529,6 +529,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) */ -- cgit v1.2.3