diff --git a/index.html b/index.html
index 43e49bc..8ae345f 100644
--- a/index.html
+++ b/index.html
@@ -1,14 +1,13 @@
-
+
WWW SQL Designer
-
@@ -127,6 +126,14 @@
+
+ |
+ *
+ |
+
+
+ |
+
diff --git a/js/wwwsqldesigner.js b/js/wwwsqldesigner.js
index 3bf19f9..2cbae9c 100644
--- a/js/wwwsqldesigner.js
+++ b/js/wwwsqldesigner.js
@@ -17,9 +17,8 @@ SQL.Visual.prototype.init = function() {
SQL.Visual.prototype._init = function() {
this.dom = {
- container:OZ.DOM.elm("div"),
- content:OZ.DOM.elm("div"),
- title:OZ.DOM.elm("div",{className:"title"})
+ container: null,
+ title: null
};
this.data = {
title:""
@@ -76,20 +75,26 @@ SQL.Row.prototype.init = function(owner, title, data) {
}
SQL.Row.prototype._build = function() {
- this.dom.container.className = "row";
- this.dom.content.style.display = "none";
+ this.dom.container = OZ.DOM.elm("tbody");
+
+ this.dom.content = OZ.DOM.elm("tr");
+ this.dom.selected = OZ.DOM.elm("div", {className:"selected",innerHTML:"» "});
+ this.dom.title = OZ.DOM.elm("div", {className:"title"});
+ var td1 = OZ.DOM.elm("td");
+ var td2 = OZ.DOM.elm("td", {className:"typehint"});
+ this.dom.typehint = td2;
+
+ OZ.DOM.append(
+ [this.dom.container, this.dom.content],
+ [this.dom.content, td1, td2],
+ [td1, this.dom.selected, this.dom.title]
+ );
this.enter = this.bind(this.enter);
this.changeComment = this.bind(this.changeComment);
-
- this.dom.selected = OZ.DOM.elm("span",{className:"row_selected"});
- this.dom.selected.innerHTML = "» ";
-
- OZ.DOM.append([this.dom.container,this.dom.selected,this.dom.title,this.dom.content]);
- OZ.Event.add(this.dom.container,"click",this.bind(this.click));
- OZ.Event.add(this.dom.container,"dblclick",this.bind(this.dblclick));
- OZ.Event.add(this.dom.container,"mousedown",this.bind(this.mousedown));
+ OZ.Event.add(this.dom.container, "click",this.bind(this.click));
+ OZ.Event.add(this.dom.container, "dblclick",this.bind(this.dblclick));
}
SQL.Row.prototype.select = function() {
@@ -120,8 +125,7 @@ SQL.Row.prototype.setTitle = function(t) {
}
SQL.Row.prototype.click = function(e) { /* clicked on row */
- OZ.Event.stop(e);
- this.dispatch("rowclick",this);
+ this.dispatch("rowclick", this);
this.owner.owner.rowManager.select(this);
}
@@ -131,11 +135,6 @@ SQL.Row.prototype.dblclick = function(e) { /* dblclicked on row */
this.expand();
}
-SQL.Row.prototype.mousedown = function(e) {
- OZ.Event.stop(e);
- this.owner.owner.tableManager.select(this.owner);
-}
-
SQL.Row.prototype.update = function(data) { /* update subset of row data */
var des = SQL.Designer;
if (data.nll && data.def && data.def.match(/^null$/i)) { data.def = null; }
@@ -171,7 +170,9 @@ SQL.Row.prototype.down = function() { /* shift down */
this.redraw();
}
-SQL.Row.prototype.buildContent = function() {
+SQL.Row.prototype.buildEdit = function() {
+ OZ.DOM.clear(this.dom.container);
+
var elms = [];
this.dom.name = OZ.DOM.elm("input");
this.dom.name.type = "text";
@@ -197,6 +198,9 @@ SQL.Row.prototype.buildContent = function() {
this.dom.nll.type = "checkbox";
elms.push(["null",this.dom.nll]);
+ this.dom.comment = OZ.DOM.elm("span",{className:"comment"});
+ this.dom.comment.innerHTML = this.data.comment;
+
this.dom.commentbtn = OZ.DOM.elm("input");
this.dom.commentbtn.type = "button";
this.dom.commentbtn.value = _("comment");
@@ -205,17 +209,27 @@ SQL.Row.prototype.buildContent = function() {
for (var i=0;iSchovat spojovníky při tažení tabulkou?
Vykreslovat oblé spojovníky (pakliže to prohlížeč podporuje)?
Zobrazovat velikost polí v tabulce?
+ Zobrazovat datový typ polí v tabulce?
Klíče
diff --git a/locale/en.xml b/locale/en.xml
index f254645..d65ca04 100644
--- a/locale/en.xml
+++ b/locale/en.xml
@@ -54,6 +54,7 @@
Hide connectors on table drag?
Draw smooth connectors (if supported by browser)?
Show field size in table design?
+ Show field datatype in table design?
Keys
diff --git a/styles/style.css b/styles/style.css
index 6c07a34..875f7e3 100644
--- a/styles/style.css
+++ b/styles/style.css
@@ -105,27 +105,38 @@ body {
box-shadow: 4px 4px 8px #888; /* Opera 10.5, IE 9.0 */
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=135, Color='#888888'); /* IE 6, IE 7 */
-ms-filter: progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=135, Color='#888888'); /* IE 8 */
+ border-radius: 3px;
}
-.table_selected {
+.table table {
+ border-collapse: collapse;
+}
+
+.table.selected {
border: 2px solid #000;
}
-.table_title {
- margin: 0px 30px;
+.table thead .title {
text-align: center;
- padding: 3px 0px;
+ padding: 3px 30px;
}
-.row {
+.table tbody {
border-top: 1px dotted #888;
+}
+
+.table tbody td {
padding: 3px;
}
-.row_selected {
+.table tbody .selected {
font-weight: bold;
color: #f00;
- float: left;
+ display: inline-block;
+}
+
+.table tbody .title {
+ display: inline-block;
}
.primary {
@@ -140,6 +151,11 @@ body {
font-style: normal;
}
+.typehint {
+ font-size: 80%;
+ color: gray;
+}
+
.comment {
font-size: 80%;
font-weight: normal;
@@ -151,7 +167,6 @@ body {
}
.relation {
- background-color: #000;
overflow: hidden;
}