See ChangeLog.

Monotone-Parent: 4ebbfbccc5eec87857b36901546058740ff96f2b
Monotone-Revision: 3ed5547660c034b85d2587a802d66c09ecb62b0c

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2010-08-05T21:23:48
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2010-08-05 21:23:48 +00:00
parent e7ab667573
commit 99727fd0b5
2 changed files with 14 additions and 2 deletions
+7 -2
View File
@@ -24,11 +24,12 @@ var SOGoResizableTableInterface = {
}
SOGoResizableTable._resize(this, $(cell), i, null, cell.getWidth());
}
this.computeColumnsWidths();
Event.observe(window, "resize", this.resize.bind(this));
},
resize: function(e) {
// Only resize the columns after a certain delay, otherwise it slow
// Only resize the columns after a certain delay, otherwise it slows
// down the interface.
if (this.delayedResize) window.clearTimeout(this.delayedResize);
this.delayedResize = this._resize.bind(this).delay(0.2);
@@ -62,7 +63,7 @@ var SOGoResizableTableInterface = {
this.ratios = relativeWidths;
},
saveColumnsState: function() {
computeColumnsWidths: function() {
this.ratios = new Hash();
var tableWidth = 100/this.getWidth();
var cells = $(this).down('tr').childElements();
@@ -71,6 +72,10 @@ var SOGoResizableTableInterface = {
if (cell.hasClassName('resizable'))
this.ratios.set(cell.id, Math.round(cell.getWidth()*tableWidth));
}
},
saveColumnsState: function() {
this.computeColumnsWidths();
if (!$(document.body).hasClassName("popup")) {
var url = ApplicationBaseURL + "saveColumnsState";
var data = this.ratios;