Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid_scroller.js =================================================================== diff -u -r7368 -r7504 --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 7368) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 7504) @@ -167,6 +167,20 @@ profile_total = 0; } +function addLoadEvent(func) { + var oldonload = window.onload; + if (typeof window.onload != 'function') { + window.onload = func; + } else { + window.onload = function() { + if (oldonload) { + oldonload(); + } + func(); + } + } +} + function GridScroller(grid_id, w, h) { this.GridId = grid_id @@ -268,6 +282,8 @@ this.TheGrid.SyncScroll(); }, false); } + + addLoadEvent( function() {the_grid.AutoResize()} ); } @@ -496,6 +512,12 @@ if (w) this.Width = w; if (h) this.Height = h; + + pos = findPos(this.Dot) + + this.TheGrid.style.left = (pos[0])+ 'px' + this.TheGrid.style.top = (pos[1]) + 'px' + this.MainOuter.style.height = (this.Height)+'px' this.MainOuter.style.width = (this.Width)+'px' @@ -600,6 +622,19 @@ GridScroller.prototype.PrepareWidths = function() { cache = getFrame('head').grid_widths_cache; + + if (this.MinWidths.length == this.Header[0].length) { + var has_all_widths = true; + for (var i in this.MinWidths) { + if (isNaN(parseInt(this.MinWidths[i]))) has_all_widths = false; + } + if (has_all_widths) { + widths = this.MinWidths + cache[this.GridId+'_'+this.PickerCRC] = widths; + return widths; + } + } + if (cache[this.GridId+'_'+this.PickerCRC]) { return cache[this.GridId+'_'+this.PickerCRC] }