merge of '1f66f69ac041c4c07572f485c685adf50bf6866c'

and 'dba9e298691b115fdb536d3e5610f71142ab4ee3'

Monotone-Parent: 1f66f69ac041c4c07572f485c685adf50bf6866c
Monotone-Parent: dba9e298691b115fdb536d3e5610f71142ab4ee3
Monotone-Revision: 63ee524117cc9ce93494633a63d1159b33b05365

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-12-05T20:55:24
This commit is contained in:
Wolfgang Sourdeau
2011-12-05 20:55:24 +00:00
77 changed files with 2126 additions and 42 deletions
+8 -13
View File
@@ -36,6 +36,10 @@ var SOGoResizableTableInterface = {
},
_resize: function() {
this.restore();
},
restore: function(relativeWidths) {
if (Prototype.Browser.IE)
while (SOGoResizableTable._stylesheet.styleSheet.rules.length)
SOGoResizableTable._stylesheet.styleSheet.removeRule();
@@ -43,8 +47,10 @@ var SOGoResizableTableInterface = {
while (SOGoResizableTable._stylesheet.firstChild)
SOGoResizableTable._stylesheet.removeChild(SOGoResizableTable._stylesheet.firstChild);
if (relativeWidths)
this.ratios = relativeWidths;
var tableWidth = this.getWidth()/100;
var cells = $(this).down('tr').childElements();
var cells = $(this).down('tr').select('.resizable');
for (i = 0; i < cells.length; i++) {
var cell = cells[i];
var ratio = this.ratios.get(cell.id);
@@ -52,17 +58,6 @@ var SOGoResizableTableInterface = {
}
},
restore: function(relativeWidths) {
var tableWidth = this.getWidth()/100;
var cells = $(this).down('tr').childElements();
for (i = 0; i < cells.length; i++) {
var cell = cells[i];
var ratio = relativeWidths.get(cell.id);
SOGoResizableTable._resize(this, $(cell), i, null, ratio*tableWidth);
}
this.ratios = relativeWidths;
},
computeColumnsWidths: function() {
this.ratios = new Hash();
var tableWidth = 100/this.getWidth();
@@ -172,7 +167,7 @@ SOGoResizableTable = {
}
// Respect the minimum width of the cell.
w = Math.max(w - pad, parseInt(cell.getStyle('minWidth')));
w = Math.max(Math.round(w) - pad, parseInt(cell.getStyle('minWidth')));
var delta = w - cell.getWidth() + pad;