comparison service/arduinoNode/static/index.html @ 194:35e07a9f3287

fix arduinoNode for safari Ignore-this: dca839ff96575cb154d6ab0b0008196d
author drewp@bigasterisk.com
date Sun, 30 Aug 2015 11:46:37 -0700
parents 960b3b4cdd29
children 06795f84fe29
comparison
equal deleted inserted replaced
193:960b3b4cdd29 194:35e07a9f3287
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>arduinoNode</title> 4 <title>arduinoNode</title>
5 <meta name=viewport content="width=device-width, initial-scale=1">
5 <meta charset="utf-8" /> 6 <meta charset="utf-8" />
6 <script src="/lib/polymer/1.0.9/webcomponentsjs/webcomponents.min.js"></script> 7 <script src="/lib/polymer/1.0.9/webcomponentsjs/webcomponents.min.js"></script>
7 <link rel="import" href="/lib/polymer/1.0.9/polymer/polymer.html"> 8 <link rel="import" href="/lib/polymer/1.0.9/polymer/polymer.html">
8 <link rel="import" href="/lib/polymer/1.0.9/iron-ajax/iron-ajax.html"> 9 <link rel="import" href="/lib/polymer/1.0.9/iron-ajax/iron-ajax.html">
9 <link rel="import" href="/lib/polymer/1.0.9/iron-flex-layout/iron-flex-layout.html"> 10 <link rel="import" href="/lib/polymer/1.0.9/iron-flex-layout/iron-flex-layout.html">
34 <dom-module id="linked-uri"> 35 <dom-module id="linked-uri">
35 <template> 36 <template>
36 <a href$="{{href}}">{{compactUri(href)}}</a> 37 <a href$="{{href}}">{{compactUri(href)}}</a>
37 </template> 38 </template>
38 <script> 39 <script>
39 Polymer({ 40 HTMLImports.whenReady(function () {
40 is: 'linked-uri', 41 Polymer({
41 properties: { href: { notify: true } }, 42 is: 'linked-uri',
42 behaviors: [BigastUri] 43 properties: { href: { notify: true } },
44 behaviors: [BigastUri]
45 });
43 }); 46 });
44 </script> 47 </script>
45 </dom-module> 48 </dom-module>
46 49
47 <!-- subj/pred are compact uris --> 50 <!-- subj/pred are compact uris -->
57 <span class="read">{{formatted(out)}}</span> 60 <span class="read">{{formatted(out)}}</span>
58 </div> 61 </div>
59 62
60 </template> 63 </template>
61 <script> 64 <script>
62 Polymer({ 65 HTMLImports.whenReady(function () {
63 is: 'watched-subgraph', 66 Polymer({
64 properties: { 67 is: 'watched-subgraph',
65 graph: { notify: true }, 68 properties: {
66 out: { notify: true }, 69 graph: { notify: true },
67 pred: { notify: true }, 70 out: { notify: true },
68 subj: { notify: true } 71 pred: { notify: true },
69 }, 72 subj: { notify: true }
70 behaviors: [BigastUri], 73 },
71 formatted: function (out) { 74 behaviors: [BigastUri],
72 var obj = out[this.compactUri(this.pred)]; 75 formatted: function (out) {
73 if (typeof obj == 'string') { 76 var obj = out[this.compactUri(this.pred)];
74 return this.compactUri(obj); 77 if (typeof obj == 'string') {
75 } else { 78 return this.compactUri(obj);
76 return obj['@value']; 79 } else {
80 return obj['@value'];
81 }
77 } 82 }
78 } 83 });
79 }); 84 });
80 </script> 85 </script>
81 </dom-module> 86 </dom-module>
82 87
83 <dom-module id="arduinonode-boards"> 88 <dom-module id="arduinonode-boards">
141 </ul> 146 </ul>
142 </div> 147 </div>
143 </template> 148 </template>
144 </template> 149 </template>
145 <script> 150 <script>
146 Polymer({ 151 HTMLImports.whenReady(function () {
147 is: 'arduinonode-boards', 152 Polymer({
148 behaviors: [BigastUri] 153 is: 'arduinonode-boards',
154 behaviors: [BigastUri]
155 });
149 }); 156 });
150 </script> 157 </script>
151 </dom-module> 158 </dom-module>
152 <arduinonode-boards></arduinonode-boards> 159 <arduinonode-boards></arduinonode-boards>
153 </body> 160 </body>
154 </html> 161 </html>