diff --git a/index.html b/index.html index 1088971..43e49bc 100644 --- a/index.html +++ b/index.html @@ -119,6 +119,14 @@ + + + * + + + + + diff --git a/js/wwwsqldesigner.js b/js/wwwsqldesigner.js index 00b17f5..2cee59c 100644 --- a/js/wwwsqldesigner.js +++ b/js/wwwsqldesigner.js @@ -113,7 +113,10 @@ SQL.Row.prototype.setTitle = function(t) { var tt = r.row2.getTitle().replace(new RegExp(old,"g"),t); if (tt != r.row2.getTitle()) { r.row2.setTitle(tt); } } - SQL.Visual.prototype.setTitle.apply(this, [t]); + + var title = 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 */ @@ -238,7 +241,6 @@ SQL.Row.prototype.collapse = function() { if (!this.expanded) { return; } this.expanded = false; - this.setTitle(this.dom.name.value); var data = { type: this.dom.type.selectedIndex, def: this.dom.def.value, @@ -251,6 +253,7 @@ SQL.Row.prototype.collapse = function() { this.dom.content.style.display = "none"; this.dom.title.style.display = "block"; this.update(data); + this.setTitle(this.dom.name.value); /* gecko hack */ this.owner.moveBy(1,1); this.owner.moveBy(-1,-1); @@ -388,7 +391,6 @@ SQL.Row.prototype.toXML = function() { SQL.Row.prototype.fromXML = function(node) { var name = node.getAttribute("name"); - this.setTitle(name); var obj = { type:0, size:"" }; obj.nll = (node.getAttribute("null") == "1"); @@ -425,6 +427,7 @@ SQL.Row.prototype.fromXML = function(node) { } this.update(obj); + this.setTitle(name); } SQL.Row.prototype.isPrimary = function() { @@ -2180,8 +2183,9 @@ SQL.Options.prototype.build = function() { this.dom.optionpattern = OZ.$("optionpattern"); this.dom.optionhide = OZ.$("optionhide"); this.dom.optionvector = OZ.$("optionvector"); + this.dom.optionshowsize = OZ.$("optionshowsize"); - var ids = ["language","db","snap","pattern","hide","vector","optionsnapnotice","optionpatternnotice","optionsnotice"]; + var ids = ["language","db","snap","pattern","hide","vector","showsize","optionsnapnotice","optionpatternnotice","optionsnotice","optionshowsize"]; for (var i=0;i%T = primární tabulka, %R = primární klíč, %t = cizí tabulka Schovat spojovníky při tažení tabulkou? Vykreslovat oblé spojovníky (pakliže to prohlížeč podporuje)? - + Zobrazovat velikost polí v tabulce? Klíče diff --git a/locale/en.xml b/locale/en.xml index 4eb1af4..f254645 100644 --- a/locale/en.xml +++ b/locale/en.xml @@ -53,7 +53,7 @@ %T = primary table, %R = primary key, %t = foreign table Hide connectors on table drag? Draw smooth connectors (if supported by browser)? - + Show field size in table design? Keys