From: Michael M Slusarz Date: Fri, 16 Apr 2010 21:17:02 +0000 (-0600) Subject: Fix selection list when working with search mailboxes X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=6f1df714605cb58d5c26d8dada7e5da6864a431e;p=horde.git Fix selection list when working with search mailboxes --- diff --git a/imp/js/DimpCore.js b/imp/js/DimpCore.js index 0de9b124f..a1cf4de16 100644 --- a/imp/js/DimpCore.js +++ b/imp/js/DimpCore.js @@ -138,11 +138,13 @@ var DimpCore = { tmp = {}; if (b.getMetaData('search')) { - s.get('dataob').each(function(r) { - if (!tmp[r.view]) { - tmp[r.view] = []; + s.get('uid').each(function(r) { + var parts = r.split(DIMP.conf.IDX_SEP); + if (tmp[parts[1]]) { + tmp[parts[1]].push(parts[0]); + } else { + tmp[parts[1]] = [ parts[0] ]; } - tmp[r.view].push(r.imapuid); }); } else { tmp[b.getView()] = s.get('uid'); diff --git a/imp/js/ViewPort.js b/imp/js/ViewPort.js index 33d66d00a..4e7975782 100644 --- a/imp/js/ViewPort.js +++ b/imp/js/ViewPort.js @@ -1225,7 +1225,7 @@ var ViewPort = Class.create({ getSelection: function(view) { var buffer = this._getBuffer(view); - return this.createSelection('uid', buffer ? buffer.getAllUIDs() : [], view); + return this.createSelection('uid', buffer ? buffer.getSelected().get('uid') : [], view); }, // vs = (Viewport_Selection | array) A Viewport_Selection object -or- if