Skip to content

Commit

Permalink
Merge pull request #277 from aumonmes/master
Browse files Browse the repository at this point in the history
Added comment indicators for tables and fields
  • Loading branch information
ondras committed Dec 20, 2018
2 parents 337db5d + 5630fcc commit 36f5285
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
2 changes: 2 additions & 0 deletions js/row.js
Expand Up @@ -191,13 +191,15 @@ SQL.Row.prototype.expand = function() {
this.buildEdit();
this.load();
this.redraw();
this.dom.container.classList.add('expanded');
this.dom.name.focus();
this.dom.name.select();
}

SQL.Row.prototype.collapse = function() {
if (!this.expanded) { return; }
this.expanded = false;
this.dom.container.classList.remove('expanded');

var data = {
type: this.dom.type.selectedIndex,
Expand Down
2 changes: 1 addition & 1 deletion js/table.js
Expand Up @@ -25,7 +25,7 @@ SQL.Table.prototype._build = function() {
var thead = OZ.DOM.elm("thead");
var tr = OZ.DOM.elm("tr");
this.dom.title = OZ.DOM.elm("td", {className:"title", colSpan:2});

OZ.DOM.append(
[this.dom.container, this.dom.content],
[this.dom.content, thead],
Expand Down
28 changes: 28 additions & 0 deletions styles/style.css
Expand Up @@ -145,6 +145,34 @@ body {
display: inline-block;
}

.table thead td[title]:not([title=""]):after{
content: '';
position: absolute;
top: 0;
right: 0;
border-color: royalblue;
border-style: solid;
border-width: 5px;
border-bottom-color: transparent;
border-left-color: transparent;
}

.table tbody td {
position: relative;
}

.table tbody[title]:not(.expanded):not([title=""]) td:last-child:after{
content: '';
position: absolute;
top: 0;
right: 0;
border-color: royalblue;
border-style: solid;
border-width: 5px;
border-bottom-color: transparent;
border-left-color: transparent;
}

.primary {
font-weight: bold;
}
Expand Down

0 comments on commit 36f5285

Please sign in to comment.