summaryrefslogtreecommitdiffstats
path: root/js/wwwsqldesigner.js
diff options
context:
space:
mode:
authorondrej.zara <none@none>2010-03-15 19:58:06 +0000
committerondrej.zara <none@none>2010-03-15 19:58:06 +0000
commit0a120ff920aa98715bdd0d11d61903a3b73a0405 (patch)
treea2f9bbad3ded231ccd780bc3dd606fffe89817cb /js/wwwsqldesigner.js
parent9b83886d5f6efa97e69ddc1057326e455725bbfb (diff)
downloadwwwsqldesigner-0a120ff920aa98715bdd0d11d61903a3b73a0405.zip
wwwsqldesigner-0a120ff920aa98715bdd0d11d61903a3b73a0405.tar.gz
wwwsqldesigner-0a120ff920aa98715bdd0d11d61903a3b73a0405.tar.bz2
#75 italic keys
--HG-- extra : convert_revision : svn%3Ab267cdba-c1da-11dd-874b-8bacd04a0a74/trunk%4085
Diffstat (limited to 'js/wwwsqldesigner.js')
-rw-r--r--js/wwwsqldesigner.js7
1 files changed, 6 insertions, 1 deletions
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,"&quot;");
+ var t = this.getTitle().replace(/"/g,"&quot;"); //"
var xml = "";
xml += '<table x="'+this.x+'" y="'+this.y+'" name="'+t+'">\n';
for (var i=0;i<this.rows.length;i++) {