summaryrefslogtreecommitdiff
path: root/program/js/list.js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-05-31 11:12:04 +0000
committeralecpl <alec@alec.pl>2009-05-31 11:12:04 +0000
commit52818559ce020e551addd125ac8382bdda020f46 (patch)
tree3fbb7adf817acc2d72e3c84749e20f5776f26e1d /program/js/list.js
parentbd6d22e3e03c3f00f306f68f465d323932aa59c4 (diff)
- Added possibility to invert messages selection
Diffstat (limited to 'program/js/list.js')
-rw-r--r--program/js/list.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/program/js/list.js b/program/js/list.js
index addd1e652..51889fa30 100644
--- a/program/js/list.js
+++ b/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)