diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-10-20 17:49:01 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-10-20 17:49:01 +0000 |
| commit | d99e4374d04a448b6e1db49ea92253ac47be1e67 (patch) | |
| tree | c5eee9109d5186633b39bb9606e02730800628e4 | |
| parent | 22798d9cdfcd2914a807a705062342b7adc0c140 (diff) | |
Fix toggleselect of list widget
git-svn-id: https://svn.roundcube.net/trunk@889 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/program/js/list.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/roundcubemail/program/js/list.js b/roundcubemail/program/js/list.js index be7b02ddc..de4d7c84a 100644 --- a/roundcubemail/program/js/list.js +++ b/roundcubemail/program/js/list.js @@ -344,15 +344,20 @@ select_row: function(id, mod_key, with_mouse) 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); }, |
