Index: branches/RC/core/admin_templates/js/grid_scroller.js =================================================================== diff -u -r11368 -r11412 --- branches/RC/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 11368) +++ branches/RC/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 11412) @@ -318,17 +318,13 @@ addLoadEvent( function() { - the_grid.afterLoad(); + the_grid.RefreshPos(); + the_grid.AutoResize(); + the_grid.SetResizeHandles(); } ); } -GridScroller.prototype.afterLoad = function() { - this.RefreshPos(); - this.AutoResize(); - this.SetResizeHandles(); -} - GridScroller.prototype.SetReferences = function() { this.MainOuter = document.getElementById('outer_main_'+this.GridId ); this.MainInner = document.getElementById('inner_main_'+this.GridId) @@ -562,18 +558,26 @@ points.push(tmp); } var scroller = this; - var resize_bar = addElement(document.body, 'div'); + + var resize_bar = document.getElementById(this.GridId + '[resize_bar]'); + if (!resize_bar) { + resize_bar = addElement(document.body, 'div'); + resize_bar.id = this.GridId + '[resize_bar]'; + } + resize_bar.style.display = 'none'; resize_bar.style.width = '2px'; resize_bar.style.height = '200px'; resize_bar.style.backgroundColor = '#777'; resize_bar.style.zIndex = 40; resize_bar.style.position = 'absolute'; - resize_bar.id = 'resize_bar'; for (var i=1; i 15) { - var resize_bar = document.getElementById('resize_bar'); + var resize_bar = document.getElementById(scroller.GridId + '[resize_bar]'); resize_bar.style.left = (coords.x - DragManager.MouseOffset[0] + 2) + 'px'; } }, function(a_handle) { - var resize_bar = document.getElementById('resize_bar'); + var resize_bar = document.getElementById(scroller.GridId + '[resize_bar]'); resize_bar.style.display = 'none'; coords = findPos(a_handle); var offset = (coords[0] - DragManager.InitialPos[0]); @@ -657,7 +661,7 @@ } catch (e) { // IE don't allow to set width for hidden element - alert(e); +// alert('IE exception:' + e); } } } @@ -669,8 +673,8 @@ for (var row=0; row < this.HeadTable.rows.length; row++) { this.HeadTable.rows[row].cells[col - this.LeftCells].style.width = width+'px'; - var a = document.getElementById('cursor_work_around_A_'+col+'_'+row); - var b = document.getElementById('cursor_work_around_B_'+col+'_'+row); + var a = document.getElementById(this.GridId + '[cursor_work_around_A_'+col+'_'+row+']'); + var b = document.getElementById(this.GridId + '[cursor_work_around_B_'+col+'_'+row+']'); if (a) a.style.width = width+'px'; if (b) b.style.width = width+'px'; } @@ -683,8 +687,8 @@ for (var row=0; row < this.LeftHeaderTable.rows.length; row++) { this.LeftHeaderTable.rows[row].cells[col].style.width = width+'px'; - var a = document.getElementById('cursor_work_around_A_'+col+'_'+row); - var b = document.getElementById('cursor_work_around_B_'+col+'_'+row); + var a = document.getElementById(this.GridId + '[cursor_work_around_A_'+col+'_'+row+']'); + var b = document.getElementById(this.GridId + '[cursor_work_around_B_'+col+'_'+row+']'); if (a) a.style.width = width+'px'; if (b) b.style.width = width+'px'; } @@ -715,21 +719,21 @@ { for (var col=1; col
', '
']; + cursor_workaround = ['
', '
']; } else { if (this.LimitedHeights) {