Index: branches/RC/core/admin_templates/js/grid_scroller.js =================================================================== diff -u -N -r9359 -r9969 --- branches/RC/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 9359) +++ branches/RC/core/admin_templates/js/grid_scroller.js (.../grid_scroller.js) (revision 9969) @@ -154,9 +154,8 @@ this.PickerCRC = ''; -// this.FixedHeights = true; - this.FixedHeaderHeights = [50,30]; - this.FixedRowHeight = 25; + this.MaxHeaderHeights = [50,30]; + this.MaxRowHeight = 45; } GridScroller.prototype.Render = function(id) @@ -228,6 +227,7 @@ this.Resize(); } + this.AdjustInputWidths(); this.TheGrid.style.visibility = 'visible' this.MainScroller.style.visibility = 'visible' // Profile('Finalizng', 1); @@ -393,7 +393,8 @@ // reseting heights table1.rows[row].cells[0].style.height = 'auto'; table2.rows[row].cells[0].style.height = 'auto'; - + table1.rows[row].style.height = 'auto'; + table2.rows[row].style.height = 'auto'; var height1_div = document.getElementById(table1_id+'_left_height_'+row); if (height1_div) { height1_div.style.height = 'auto'; @@ -407,7 +408,6 @@ GridScroller.prototype.SetHeights = function(table1_id, table2_id) { - if (this.FixedHeights) return; var table1 = document.getElementById(table1_id); var table2 = document.getElementById(table2_id); var height1_div, height2_div; @@ -439,12 +439,12 @@ else { if (!is.ie) { // firefox needs div, but it can display it as table-cell var width = table.rows[row].cells[0].clientWidth; - table.rows[row].cells[0].innerHTML = '
' + table.rows[row].cells[0].innerHTML + '
' +// table.rows[row].cells[0].innerHTML = '
' + table.rows[row].cells[0].innerHTML + '
' } } // IE can't display div as table-cell, but it respects the tr height table.rows[row].cells[0].style.height = the_height+'px'; -// table.rows[row].style.height = the_height+'px'; + table.rows[row].style.height = the_height+'px'; } } @@ -455,8 +455,9 @@ var height for (var row=0; row 0) { + var left_inputs = this.LeftHeaderTable.getElementsByTagName('INPUT'); + for (var i=0; i= this.LeftCells) { @@ -610,6 +638,7 @@ this.SetLeftWidth(new_left_total_w+left_diff); } + this.AdjustInputWidths(); this.MinWidths[col] = width; this.SetLeftHeights(); @@ -817,9 +846,9 @@ var footer_rows = this.Footer.length; var header_h = 80; - if (this.FixedHeights) { - for (var i=0; i'+"\n" + + var row_class = 'grid-'+class_name+'-row '+(even ? even_class : '')+' grid-'+class_name+'-row-'+row + (source[row].row_class ? ' '+source[row].row_class : ''); + rh +=''+"\n" even = !even; total_width = 0; - if (this.FixedHeights) { - var height_style = id.match(/^(left_)?header/) ? 'height: '+this.FixedHeaderHeights[row]+'px;' : 'height: '+this.FixedRowHeight+'px;'; + if (this.LimitedHeights) { + var row_height = id.match(/^(left_)?header/) ? this.MaxHeaderHeights[row]+'px;' : this.MaxRowHeight+'px;' + var height_style = id.match(/^(left_)?header/) ? 'height: '+this.MaxHeaderHeights[row]+'px;' : 'height: '+this.MaxRowHeight+'px;'; } else { + var row_height = 'auto' var height_style = ''; } for (var col=start_col; col
', '
']; + if (id.match(/^(left_)?header/) && is.gecko) { + cursor_workaround = ['
', '
']; + } + else { + if (this.LimitedHeights) { + cursor_workaround = ['
','
']; } - /*else { - var cursor_workaround = ['
','
'] - }*/ } - var width_style = width_printed ? '' : 'style="width: '+this.MinWidths[col]+'px;"' - rh += "\t"+''+cursor_workaround[0]+source[row][col]+cursor_workaround[1]+''+"\n" + var width_style = width_printed ? '' : 'width: '+this.MinWidths[col]+'px;"' + var td_style = 'style="overflow: hidden; max-height: '+row_height+'; '+width_style+'"'; + var td_class = 'grid-'+class_name+'-col-'+col; + if (this.FieldNames) { + td_class += ' '+this.FieldNames[col]; + } + rh += "\t"+''+cursor_workaround[0]+row_data[col]+cursor_workaround[1]+''+"\n" } width_printed = true; // print widths in first row only if (needs_last) { @@ -1047,7 +1087,7 @@ GridScroller.prototype.SetHeader = function(a_header) { this.Header = a_header; - this.FixedHeaderHeightCorrection = (6*this.Header.length)+1; + this.MaxHeaderHeightCorrection = (6*this.Header.length)+1; } GridScroller.prototype.SetFooter = function(a_footer)