diff --git a/src/ifctester/webapp/www/app.js b/src/ifctester/webapp/www/app.js index 895a517108..13802c2237 100644 --- a/src/ifctester/webapp/www/app.js +++ b/src/ifctester/webapp/www/app.js @@ -5,6 +5,31 @@ feather.replace() var ns = 'http://standards.buildingsmart.org/IDS'; var xs = 'http://www.w3.org/2001/XMLSchema'; +class IDSNew extends HTMLElement { + connectedCallback() { + this.addEventListener('click', this.click); + } + + click(e) { + var ifcTester = this.closest('ifc-tester'); + var template = ifcTester.getElementsByTagName('template')[0]; + console.log(template); + ifcTester.appendChild(template.content.cloneNode(true)); + feather.replace(); + } +} + +class IDSClose extends HTMLElement { + connectedCallback() { + this.addEventListener('click', this.click); + } + + click(e) { + var container = this.closest('ids-container'); + container.parentElement.removeChild(container); + } +} + class IDSContainer extends HTMLElement { connectedCallback() { this.filename = 'specifications.ids'; @@ -943,9 +968,11 @@ class IDSAudit extends HTMLElement { } } +window.customElements.define('ids-new', IDSNew); window.customElements.define('ids-container', IDSContainer); window.customElements.define('ids-loader', IDSLoader); window.customElements.define('ids-save', IDSSave); +window.customElements.define('ids-close', IDSClose); window.customElements.define('ids-audit', IDSAudit); window.customElements.define('ids-info', IDSInfo); window.customElements.define('ids-info-element', IDSInfoElement); diff --git a/src/ifctester/webapp/www/index.html b/src/ifctester/webapp/www/index.html index 72e088a874..9d12bb5b46 100644 --- a/src/ifctester/webapp/www/index.html +++ b/src/ifctester/webapp/www/index.html @@ -27,171 +27,177 @@
IfcTester - New Spec + + New Spec + Settings Heeeelllp!
- -
-
-
- - - LOAD - - - - - SAVE - - - - - AUDIT MODEL - - - - - CLOSE - - + diff --git a/src/ifctester/webapp/www/style.css b/src/ifctester/webapp/www/style.css index fd86d02296..0ea35dcd76 100644 --- a/src/ifctester/webapp/www/style.css +++ b/src/ifctester/webapp/www/style.css @@ -63,6 +63,11 @@ a { a:hover { color: #7fc8f8; } +ids-container { + float: left; + width: 950px; + height: 100%; +} .ids { width: 700px; height: calc(100%);