From 0a120ff920aa98715bdd0d11d61903a3b73a0405 Mon Sep 17 00:00:00 2001 From: "ondrej.zara" Date: Mon, 15 Mar 2010 19:58:06 +0000 Subject: [PATCH] #75 italic keys --HG-- extra : convert_revision : svn%3Ab267cdba-c1da-11dd-874b-8bacd04a0a74/trunk%4085 --- js/wwwsqldesigner.js | 7 ++++++- styles/style.css | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/js/wwwsqldesigner.js b/js/wwwsqldesigner.js index d57a243..3c04e26 100644 --- a/js/wwwsqldesigner.js +++ b/js/wwwsqldesigner.js @@ -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 += '\n'; for (var i=0;i