#75 italic keys

--HG--
extra : convert_revision : svn%3Ab267cdba-c1da-11dd-874b-8bacd04a0a74/trunk%4085
This commit is contained in:
ondrej.zara
2010-03-15 19:58:06 +00:00
parent 9b83886d5f
commit 0a120ff920
2 changed files with 14 additions and 1 deletions
+6 -1
View File
@@ -271,6 +271,7 @@ SQL.Row.prototype.redraw = function() {
this.dom.container.style.backgroundColor = color;
OZ.DOM.removeClass(this.dom.container,"primary");
if (this.isPrimary()) { OZ.DOM.addClass(this.dom.container,"primary"); }
if (this.isKey()) { OZ.DOM.addClass(this.dom.container,"key"); }
this.dom.selected.style.display = (this.selected ? "" : "none");
this.owner.redraw();
this.owner.owner.rowManager.redraw();
@@ -440,6 +441,10 @@ SQL.Row.prototype.isUnique = function() {
return false;
}
SQL.Row.prototype.isKey = function() {
return this.keys.length > 0;
}
SQL.Row.prototype.enter = function(e) {
if (e.keyCode == 13) {
this.collapse();
@@ -830,7 +835,7 @@ SQL.Table.prototype.down = function(e) { /* mousedown - start drag */
}
SQL.Table.prototype.toXML = function() {
var t = this.getTitle().replace(/"/g,""");
var t = this.getTitle().replace(/"/g,"""); //"
var xml = "";
xml += '<table x="'+this.x+'" y="'+this.y+'" name="'+t+'">\n';
for (var i=0;i<this.rows.length;i++) {