From 1678fa1ec7b5ccdeb0ccf524b56710b7ef6f3864 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 6 Apr 2009 17:17:49 -0600 Subject: [PATCH] Merge onComplete() and onContentComplete(). --- imp/js/src/DimpBase.js | 7 +++---- imp/js/src/ViewPort.js | 7 ------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/imp/js/src/DimpBase.js b/imp/js/src/DimpBase.js index ab7505e13..943912436 100644 --- a/imp/js/src/DimpBase.js +++ b/imp/js/src/DimpBase.js @@ -465,6 +465,9 @@ var DimpBase = { } }.bind(this), onContentComplete: function(rows) { + var row, ssc, tmp, + l = this.viewport.getMetaData('label'); + rows.each(function(row) { // Add context menu this._addMouseEvents({ id: row.domid, type: row.menutype }); @@ -472,10 +475,6 @@ var DimpBase = { }, this); this.setMessageListTitle(); - }.bind(this), - onComplete: function() { - var row, ssc, tmp, - l = this.viewport.getMetaData('label'); if (this.uid) { row = this.viewport.getViewportSelection().search({ imapuid: { equal: [ this.uid ] }, view: { equal: [ this.folder ] } }); diff --git a/imp/js/src/ViewPort.js b/imp/js/src/ViewPort.js index 63ba2f38f..345924615 100644 --- a/imp/js/src/ViewPort.js +++ b/imp/js/src/ViewPort.js @@ -85,9 +85,6 @@ var ViewPort = Class.create({ if (curr) { this._updateContent(curr.offset, opts); if (!background) { - if (this.opts.onComplete) { - this.opts.onComplete(); - } this.opts.ajaxRequest(this.opts.fetch_action, this.addRequestParams({ checkcache: 1, rownum: this.currentOffset() + 1 })); } return true; @@ -604,10 +601,6 @@ var ViewPort = Class.create({ !this._updateContent((cr_id && cr_id.offset) ? cr_id.offset : (r.rownum ? parseInt(r.rownum) - 1 : this.currentOffset()))) { return; } - - if (this.opts.onComplete) { - this.opts.onComplete(); - } } if (this.opts.onEndFetch) { -- 2.11.0