From d39eecad6db1caee97624b80634587d98a75e701 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Mon, 10 Dec 2007 10:24:33 -0500 Subject: [PATCH] Remove some unused object properties --- program/js/list.js | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-) diff --git a/program/js/list.js b/program/js/list.js index be7b02d..06c3554 100644 --- a/program/js/list.js +++ b/program/js/list.js @@ -344,15 +344,20 @@ if (this.last_selected != 0 && this.rows[this.last_selected]) this.set_classname(this.rows[this.last_selected].obj, 'focused', false); - + + // unselect if toggleselect is active and the same row was clicked again + if (this.toggleselect && this.last_selected == id) + { + this.clear_selection(); + id = null; + } + else + this.set_classname(this.rows[id].obj, 'focused', true); + if (!this.selection.length) this.shift_start = null; - if (this.toggleselect && this.last_selected==id) - this.highlight_row(id, true); - this.last_selected = id; - this.set_classname(this.rows[id].obj, 'focused', true); }, @@ -530,8 +535,6 @@ if (this.focused != true) return true; - this.shiftkey = e.shiftKey; - var keyCode = document.layers ? e.which : document.all ? event.keyCode : document.getElementById ? e.keyCode : 0; var mod_key = rcube_event.get_modifier(e); switch (keyCode) @@ -542,6 +545,7 @@ break; default: + this.shiftkey = e.shiftKey; this.key_pressed = keyCode; this.trigger_event('keypress'); } -- Gitblit v1.9.1