Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid_scroller.js =================================================================== diff -u -r6938 -r7021 --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 6938) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 7021) @@ -43,6 +43,8 @@ var result = new Object(); result.innerHeight = obj.clientHeight - padding[0] - padding[2]; result.innerWidth = obj.clientWidth - padding[1] - padding[3]; + result.padding = padding; + result.borders = border; return result; } @@ -56,7 +58,7 @@ this.LeftCells = 0; this.LeftWidth = 0; - this.BottomOffset = 5; + this.BottomOffset = 0; this.Width = w; this.Height = h; @@ -93,6 +95,13 @@ this.TheGrid.style.visibility = 'visible' this.MainScroller.style.visibility = 'visible' + + var the_grid = this; + if (document.all) { + $status = window.attachEvent('onresize', function(ev) { the_grid.AutoResize() }); + } else { + $status = window.addEventListener('resize', function(ev) { the_grid.AutoResize() }, true); + } } GridScroller.prototype.SetReferences = function() { @@ -170,7 +179,7 @@ { // target = Math.max( Math.max(header_widths[i], data_widths[i]), footer_widths[i]); var sum = header_widths[i]*header_cf*count + data_widths[i]*data_cf*count; -// alert('sum = '+header_widths[i]+' * '+header_cf+' * '+count+' + '+data_widths[i]+' * '+data_cf+' * '+count+' = '+sum) +// alert('sum ('+i+') = '+header_widths[i]+' * '+header_cf+' * '+count+' + '+data_widths[i]+' * '+data_cf+' * '+count+' = '+sum) if (this.HasFooter()) { sum += footer_widths[i]*footer_cf*count; // alert('sum + '+footer_widths[i]+' * '+footer_cf+' * '+count+' = '+sum) @@ -181,7 +190,7 @@ total += target; } this.MinDataWidth = total; - this.SetRowWidths('header_'+this.GridId, widths, total); + this.SetWidths('header_'+this.GridId, widths, total); this.SetWidths('data_'+this.GridId, widths, total); if (this.LeftCells != 0) { @@ -248,6 +257,7 @@ for (var col=0; col' + table.rows[row].cells[col].innerHTML + '' +// alert('setting '+widths[col]+' for col '+col) table.rows[row].cells[col].style.width = widths[col]+'px'; // alert('set ('+col+')'+table.rows[0].cells[col].innerHTML+' to '+widths[col]) } @@ -302,7 +312,7 @@ for (var col=0; col

', 100, 100, 'main_'+this.GridId, false, 1 ); + o += this.CreateScroller( '


', 100, 100, 'main_'+this.GridId, false, 1 ); - o += '