Index: branches/RC/core/admin_templates/js/grid_scroller.js =================================================================== diff -u -N -r10863 -r10865 --- branches/RC/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 10863) +++ branches/RC/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 10865) @@ -156,8 +156,55 @@ this.MaxHeaderHeights = [50,30]; this.MaxRowHeight = 45; + + this.Html = ''; // html from last grid rendering } +GridScroller.prototype._getMeasureHtml = function() { + return '
'; +} + +GridScroller.prototype._prepareHtml = function($container) { + if (typeof($container) == 'undefined') { + var dot = this._getMeasureHtml(); +// console.log('dot without container'); + document.write(dot); + } + else { +// console.log('dot inside container'); + var dot = document.createElement('div'); + dot.id = 'my_measure_'+this.GridId; + dot.style.width = 'auto'; + dot.style.height = '0px'; + dot.style.zIndex = '-105'; + document.getElementById($container).appendChild(dot); + } + + var dot = document.getElementById('my_measure_'+this.GridId); + var measure = document.getElementById('my_measure_'+this.GridId); + this.pos = findPos(dot); +// alert('dot: '+this.pos[0]+','+this.pos[1]) + var collapse_correction = this._getCollapseCorrection(); + if (is.ie) this.pos[0] += 1; + +// this.MainOuter.style.width = 'auto' + var w = measure.offsetWidth; + var h = document.body.clientHeight; + var dim = getDimensions(measure); + h -= this.pos[1] + dim.padding[0] + dim.padding[2] + dim.borders[0] + dim.borders[2] + this.BottomOffset; + var $html = this.AltHTML(this.pos[0],this.pos[1], w, h); + + if (typeof($container) !== 'undefined') { + $html = this._getMeasureHtml() + $html; + } + + return $html; +} + +GridScroller.prototype._getCollapseCorrection = function() { + return is.ie ? 0 : -1; +} + GridScroller.prototype.Render = function(id) { ResetStart(); @@ -170,33 +217,36 @@ document.body.style.overflow = 'hidden'; document.body.scroll = 'no' - // html = this.AltHTML(); + // this.Html = this.AltHTML(); // Profile('Getting HTML',1); +// console.log('GridScroller.Render(', id, ')'); if (id && id != '') { - document.getElementById(id).innerHTML = '