From 52818559ce020e551addd125ac8382bdda020f46 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Sun, 31 May 2009 07:12:04 -0400
Subject: [PATCH] - Added possibility to invert messages selection

---
 program/js/list.js |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/program/js/list.js b/program/js/list.js
index addd1e6..51889fa 100644
--- a/program/js/list.js
+++ b/program/js/list.js
@@ -530,6 +530,30 @@
 
 
 /**
+ * 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)

--
Gitblit v1.9.1