diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-03-17 16:52:16 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-03-17 16:52:16 +0000 |
| commit | c54d3ef41ae56561e313c4c445478326bcfe697a (patch) | |
| tree | ba3a2fe146d32b22b32400265dfabbc44c493b66 /roundcubemail/program/js | |
| parent | 4cea150a5fd936a909792159cac7f5912d215dcd (diff) | |
Also select childs when dragging a thread message
git-svn-id: https://svn.roundcube.net/trunk@3372 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js')
| -rw-r--r-- | roundcubemail/program/js/list.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/roundcubemail/program/js/list.js b/roundcubemail/program/js/list.js index 5764afc98..2c539987c 100644 --- a/roundcubemail/program/js/list.js +++ b/roundcubemail/program/js/list.js @@ -1007,6 +1007,27 @@ drag_mouse_move: function(e) if (!this.draglayer) this.draglayer = $('<div>').attr('id', 'rcmdraglayer').css({ position:'absolute', display:'none', 'z-index':2000 }).appendTo(document.body); + + // also select childs of (collapsed) threads for dragging + var selection = $.merge([], this.selection); + var depth, row, uid, r; + for (var n=0; n < selection.length; n++) { + uid = selection[n]; + if (this.rows[uid].has_children /*&& !this.rows[uid].expanded*/) { + depth = this.rows[uid].depth; + row = this.rows[uid].obj.nextSibling; + while (row) { + if (row.nodeType == 1) { + if ((r = this.rows[row.uid])) { + if (!r.depth || r.depth <= depth) + break; + this.select_row(r.uid, CONTROL_KEY); + } + } + row = row.nextSibling; + } + } + } // get subjects of selected messages var names = ''; |
