field size bug

This commit is contained in:
ondras
2011-10-07 08:43:09 +02:00
parent 3791a36ade
commit 8d9f95ea0b
+8 -6
View File
@@ -119,9 +119,7 @@ SQL.Row.prototype.setTitle = function(t) {
if (tt != r.row2.getTitle()) { r.row2.setTitle(tt); } if (tt != r.row2.getTitle()) { r.row2.setTitle(tt); }
} }
var title = t; SQL.Visual.prototype.setTitle.apply(this, [t]);
if (SQL.Designer.getOption("showsize") && this.data.size) { title += " (" + this.data.size + ")"; }
SQL.Visual.prototype.setTitle.apply(this, [title]);
} }
SQL.Row.prototype.click = function(e) { /* clicked on row */ SQL.Row.prototype.click = function(e) { /* clicked on row */
@@ -289,13 +287,17 @@ SQL.Row.prototype.redraw = function() {
this.dom.selected.style.display = (this.selected ? "" : "none"); this.dom.selected.style.display = (this.selected ? "" : "none");
this.dom.container.title = this.data.comment; this.dom.container.title = this.data.comment;
var typehint = [];
if (this.owner.owner.getOption("showtype")) { if (this.owner.owner.getOption("showtype")) {
var elm = this.getDataType(); var elm = this.getDataType();
var t = elm.getAttribute("sql"); typehint.push(elm.getAttribute("sql"));
if (this.data.size.length) { t += "("+this.data.size+")"; }
this.dom.typehint.innerHTML = t;
} }
if (this.owner.owner.getOption("showsize") && this.data.size) {
typehint.push("(" + this.data.size + ")");
}
this.dom.typehint.innerHTML = typehint.join(" ");
this.owner.redraw(); this.owner.redraw();
this.owner.owner.rowManager.redraw(); this.owner.owner.rowManager.redraw();
} }