Index: branches/RC/core/admin_templates/js/grid_scroller.js =================================================================== diff -u -N -r9969 -r10863 --- branches/RC/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 9969) +++ branches/RC/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 10863) @@ -221,7 +221,7 @@ if (!this.UpdateColWidths()) return; if (this.Width == 'auto') { - this.Resize( this.GetAutoSize() ); + this.Resize( this.GetAutoSize(this.Height) ); } else { this.Resize(); @@ -679,18 +679,22 @@ } } -GridScroller.prototype.GetAutoSize = function() +GridScroller.prototype.GetAutoSize = function(h) { this.MainOuter.style.width = 'auto' var w = this.MainInner.offsetWidth; - var h = document.body.clientHeight; - var pos = findPos(this.MainOuter); + if (h == 'auto') { + var h = document.body.clientHeight; - var dim = getDimensions(this.MainOuter); + var pos = findPos(this.MainOuter); - h -= pos[1] + dim.padding[0] + dim.padding[2] + dim.borders[0] + dim.borders[2] + this.BottomOffset; - return [w,h] + var dim = getDimensions(this.MainOuter); + + h -= pos[1] + dim.padding[0] + dim.padding[2] + dim.borders[0] + dim.borders[2] + this.BottomOffset; + } + + return [w, h]; } @@ -708,6 +712,11 @@ }, 300) } +GridScroller.prototype.RefreshPos = function() { + var dot = document.getElementById('my_measure_'+this.GridId); + this.pos = findPos(dot); +} + GridScroller.prototype.Resize = function(w,h) { // alert('-1'); @@ -988,13 +997,13 @@ var needs_last = needs_last == null ? (end_col == (source[0].data ? source[0].data.length : source[0].length)) : needs_last; var total_width = 0; var width_printed = false; - + for (var row=start_row; row'+"\n" even = !even;