From: Michael M Slusarz Date: Tue, 14 Apr 2009 23:53:12 +0000 (-0600) Subject: getViewportSelection() -> getSelection() X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=496833567c78e7483b80561cb0bca43146a8e5ed;p=horde.git getViewportSelection() -> getSelection() --- diff --git a/imp/js/src/DimpBase.js b/imp/js/src/DimpBase.js index d4e35fff6..5cf5ba9b1 100644 --- a/imp/js/src/DimpBase.js +++ b/imp/js/src/DimpBase.js @@ -477,7 +477,7 @@ var DimpBase = { this.setMessageListTitle(); if (this.uid) { - row = this.viewport.getViewportSelection().search({ imapuid: { equal: [ this.uid ] }, view: { equal: [ this.folder ] } }); + row = this.viewport.getSelection().search({ imapuid: { equal: [ this.uid ] }, view: { equal: [ this.folder ] } }); if (row.size()) { this.viewport.scrollTo(row.get('rownum').first()); this.viewport.select(row); @@ -586,7 +586,7 @@ var DimpBase = { onCachedList: function(id) { var tmp, vs; if (!this.cacheids[id]) { - vs = this.viewport.getViewportSelection(id, true); + vs = this.viewport.getSelection(id, true); if (!vs.size()) { return ''; } @@ -944,7 +944,7 @@ var DimpBase = { t = $('msgHeadersContent').down('THEAD'); if (!r.error) { - search = this.viewport.getViewportSelection().search({ imapuid: { equal: [ r.index ] }, view: { equal: [ r.folder ] } }); + search = this.viewport.getSelection().search({ imapuid: { equal: [ r.index ] }, view: { equal: [ r.folder ] } }); if (search.size()) { row = search.get('dataob').first(); this.updateSeenUID(row, 1); @@ -1574,7 +1574,7 @@ var DimpBase = { case 'msg_newwin': case 'msg_newwin_options': - this.msgWindow(this.viewport.getViewportSelection().search({ imapuid: { equal: [ DIMP.conf.msg_index ] } , view: { equal: [ DIMP.conf.msg_folder ] } }).get('dataob').first()); + this.msgWindow(this.viewport.getSelection().search({ imapuid: { equal: [ DIMP.conf.msg_index ] } , view: { equal: [ DIMP.conf.msg_folder ] } }).get('dataob').first()); e.stop(); return; @@ -1749,7 +1749,7 @@ var DimpBase = { // Need to convert uid list to listing of unique viewport IDs since // we may be dealing with multiple mailboxes (i.e. virtual folders) - vs = this.viewport.getViewportSelection(this.folder); + vs = this.viewport.getSelection(this.folder); if (vs.getBuffer().getMetaData('search')) { $H(r.uids).each(function(pair) { pair.value.each(function(v) { @@ -1757,7 +1757,7 @@ var DimpBase = { }); }); - search = this.viewport.getViewportSelection().search({ vp_id: { equal: uids } }); + search = this.viewport.getSelection().search({ vp_id: { equal: uids } }); } else { r.uids = r.uids[this.folder]; r.uids.each(function(f, u) { @@ -2028,9 +2028,9 @@ var DimpBase = { vs = opts.vs; } else if (opts.index) { if (opts.mailbox) { - vs = this.viewport.getViewportSelection().search({ imapuid: { equal: [ opts.index ] }, view: { equal: [ opts.mailbox ] } }); + vs = this.viewport.getSelection().search({ imapuid: { equal: [ opts.index ] }, view: { equal: [ opts.mailbox ] } }); if (!vs.size() && opts.mailbox != this.folder) { - vs = this.viewport.getViewportSelection(opts.mailbox).search({ imapuid: { equal: [ opts.index ] } }); + vs = this.viewport.getSelection(opts.mailbox).search({ imapuid: { equal: [ opts.index ] } }); } } else { vs = this.viewport.createSelection('dataob', opts.index); diff --git a/imp/js/src/ViewPort.js b/imp/js/src/ViewPort.js index 33946f0e6..359f17411 100644 --- a/imp/js/src/ViewPort.js +++ b/imp/js/src/ViewPort.js @@ -555,7 +555,7 @@ var ViewPort = Class.create({ this.isbusy = false; if (r.partial) { - this.select(this.getViewportSelection(id)); + this.select(this.getSelection(id)); } else { // Don't update the viewport if we are now in a different view, or // if we are loading in the background. @@ -925,7 +925,7 @@ var ViewPort = Class.create({ return buffer ? new ViewPort_Selection(buffer, format, data) : new ViewPort_Selection(this._getBuffer(this.view)); }, - getViewportSelection: function(view, nopartial) + getSelection: function(view, nopartial) { var buffer = this._getBuffer(view); return this.createSelection('uid', buffer ? buffer.getAllUIDs(nopartial) : [], view);