diff --git a/js/row.js b/js/row.js index a9abf86..32a9bc7 100644 --- a/js/row.js +++ b/js/row.js @@ -191,6 +191,7 @@ 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(); } @@ -198,6 +199,7 @@ SQL.Row.prototype.expand = function() { 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, diff --git a/js/table.js b/js/table.js index 099881d..1e613d7 100644 --- a/js/table.js +++ b/js/table.js @@ -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], diff --git a/styles/style.css b/styles/style.css index 6dd8f9f..e61b1c3 100644 --- a/styles/style.css +++ b/styles/style.css @@ -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; }