From: Michael M Slusarz Date: Fri, 30 Apr 2010 17:24:20 +0000 (-0600) Subject: Bug #8995: need to clear all existing DIVs when switching pane modes X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=921e83b0b33c3b11bbedd5445584027c82236f3e;p=horde.git Bug #8995: need to clear all existing DIVs when switching pane modes --- diff --git a/imp/js/ViewPort.js b/imp/js/ViewPort.js index 94fd26940..c36b949c4 100644 --- a/imp/js/ViewPort.js +++ b/imp/js/ViewPort.js @@ -473,6 +473,7 @@ var ViewPort = Class.create({ { var h, c = this.opts.content, + c_opts = {}, lh = this._getLineHeight(), sp = this.split_pane; @@ -480,6 +481,10 @@ var ViewPort = Class.create({ this.page_size = size; } + if (this.view && sp.curr != this.pane_mode) { + c_opts.updated = this.createSelection('div', this.visibleRows()).get('domid'); + } + // Get split pane dimensions switch (this.pane_mode) { case 'horiz': @@ -548,14 +553,15 @@ var ViewPort = Class.create({ } if (this.view) { - this.requestContentRefresh(this.currentOffset()); + this.requestContentRefresh(this.currentOffset(), c_opts); } }, // offset = (integer) TODO - requestContentRefresh: function(offset) + // opts = (object) See _updateContent() + requestContentRefresh: function(offset, opts) { - if (!this._updateContent(offset)) { + if (!this._updateContent(offset, opts)) { return false; } @@ -1248,7 +1254,9 @@ var ViewPort = Class.create({ createSelection: function(format, data, view) { var buffer = this._getBuffer(view); - return buffer ? new ViewPort_Selection(buffer, format, data) : new ViewPort_Selection(this._getBuffer(this.view)); + return buffer + ? new ViewPort_Selection(buffer, format, data) + : new ViewPort_Selection(this._getBuffer(this.view)); }, getSelection: function(view)