diff options
author | Tomi Virkki <virkki@vaadin.com> | 2016-01-12 16:59:26 +0200 |
---|---|---|
committer | Tomi Virkki <virkki@vaadin.com> | 2016-01-12 21:41:11 +0200 |
commit | d8b0a67cbfe0bce683ee4005797e0bd84ba7a54d (patch) | |
tree | aad9b3be4ae4719a9700570ac70e77deee066c3e /demo/common.html | |
parent | 22b6379602dff09bf1b3a662a6e59f5d852be1ae (diff) | |
download | vaadin-core-d8b0a67cbfe0bce683ee4005797e0bd84ba7a54d.tar.gz vaadin-core-d8b0a67cbfe0bce683ee4005797e0bd84ba7a54d.zip |
Moved and updated integration examples from vaadin-grid to vaadin-core-elements
Diffstat (limited to 'demo/common.html')
-rw-r--r-- | demo/common.html | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/demo/common.html b/demo/common.html new file mode 100644 index 0000000..1bdf32f --- /dev/null +++ b/demo/common.html @@ -0,0 +1,32 @@ +<link rel="stylesheet" href="../../elements-demo-resources/demo.css"> +<script src="../../elements-demo-resources/ga.js"></script> + + +<script> + + window.localUserUrl = 'users.json'; + var bowerComponents = '../../'; + + window.xCodeExampleSourceHead = + ' <script src="https://cdn.vaadin.com/vaadin-core-elements/latest/webcomponentsjs/webcomponents-lite.js"><\/script>\n' + + ' <link href="https://cdn.vaadin.com/vaadin-core-elements/latest/vaadin-core-elements/vaadin-core-elements.html" rel="import">\n'; + + if (!window.Polymer) { + var link = document.querySelector('link[href$="common.html"]'); + var baseCommon = link.href.replace(/common.html/, ''); + var base = baseCommon + bowerComponents; + + var polymerImport = document.createElement('link'); + polymerImport.rel = 'import'; + polymerImport.href = base + 'polymer/polymer.html'; + + polymerImport.onload = function() { + window.localUserUrl = baseCommon + 'users.json'; + Polymer.Base.importHref(base + 'code-example/code-example.html'); + Polymer.Base.importHref(base + 'table-of-contents/table-of-contents.html'); + Polymer.Base.importHref(base + 'vaadin-grid/vaadin-grid.html'); + Polymer.Base.importHref(base + 'elements-demo-resources/getjson.html'); + }; + document.head.appendChild(polymerImport); + } +</script> |