| OLD | NEW |
| 1 <!DOCTYPE html><html><head> | 1 <!-- Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 for details. All rights reserved. Use of this source code is governed by a |
| 3 BSD-style license that can be found in the LICENSE file. |
| 4 --><!DOCTYPE html><html><head> |
| 2 <meta charset="utf-8"> | 5 <meta charset="utf-8"> |
| 3 <title>Slambook</title> | 6 <title>Slambook</title> |
| 4 <link rel="stylesheet" href="slambook.css"> | 7 |
| 5 | 8 |
| 6 | 9 |
| 7 </head> | 10 </head> |
| 8 <body><script src="packages/shadow_dom/shadow_dom.debug.js"></script> | 11 <body><style>body { |
| 9 <script src="packages/browser/interop.js"></script> | 12 background-color: #F8F8F8; |
| 10 <polymer-element name="tute-slambook-form" extends="form"> | 13 font-family: 'Open Sans', sans-serif; |
| 14 font-size: 14px; |
| 15 font-weight: normal; |
| 16 line-height: 1.2em; |
| 17 margin: 15px; |
| 18 } |
| 19 |
| 20 h1, p { |
| 21 color: #333; |
| 22 } |
| 23 |
| 24 </style> |
| 25 |
| 26 <!-- |
| 27 These two files are from the Polymer project: |
| 28 https://github.com/Polymer/platform/ and https://github.com/Polymer/polymer/. |
| 29 |
| 30 You can replace platform.js and polymer.html with different versions if desired. |
| 31 --> |
| 32 <!-- minified for deployment: --> |
| 33 |
| 34 |
| 35 |
| 36 <!-- unminfied for debugging: |
| 37 <script src="../../packages/web_components/platform.concat.js"></script> |
| 38 <script src="src/js/polymer/polymer.concat.js"></script> |
| 39 <link rel="import" href="src/js/polymer/polymer-body.html"> |
| 40 --> |
| 41 |
| 42 <!-- Teach dart2js about Shadow DOM polyfill objects. --> |
| 43 |
| 44 <script src="packages/polymer/src/js/use_native_dartium_shadowdom.js"></script><
script src="packages/web_components/platform.js"></script> |
| 45 <!-- <link rel="import" href="../polymer-dev/polymer.html"> --> |
| 46 |
| 47 <script src="packages/polymer/src/js/polymer/polymer.js"></script><polymer-eleme
nt name="polymer-body" extends="body"> |
| 48 |
| 49 <script> |
| 50 |
| 51 // upgrade polymer-body last so that it can contain other imported elements |
| 52 document.addEventListener('polymer-ready', function() { |
| 53 |
| 54 Polymer('polymer-body', Platform.mixin({ |
| 55 |
| 56 created: function() { |
| 57 this.template = document.createElement('template'); |
| 58 var body = wrap(document).body; |
| 59 var c$ = body.childNodes.array(); |
| 60 for (var i=0, c; (c=c$[i]); i++) { |
| 61 if (c.localName !== 'script') { |
| 62 this.template.content.appendChild(c); |
| 63 } |
| 64 } |
| 65 // snarf up user defined model |
| 66 window.model = this; |
| 67 }, |
| 68 |
| 69 parseDeclaration: function(elementElement) { |
| 70 this.lightFromTemplate(this.template); |
| 71 } |
| 72 |
| 73 }, window.model)); |
| 74 |
| 75 }); |
| 76 |
| 77 </script> |
| 78 |
| 79 </polymer-element><script src="packages/web_components/dart_support.js"></script
> |
| 80 |
| 81 <polymer-element name="tute-slambook-form" extends="form"> |
| 11 <template> | 82 <template> |
| 12 <style> | 83 <style> |
| 13 #slambookform { | 84 #slambookform { |
| 14 width: 500px; | 85 width: 500px; |
| 15 } | 86 } |
| 16 | 87 |
| 17 .entry { | 88 .entry { |
| 18 float: left; | 89 float: left; |
| 19 padding: 3px 3px 3px 3px; | 90 padding: 3px 3px 3px 3px; |
| 20 width: 100%; | 91 width: 100%; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 <label for="kittens" class="andrews">Kittens</label> | 168 <label for="kittens" class="andrews">Kittens</label> |
| 98 <input type="checkbox" checked="{{favoriteThings['raindrops']}}" id="r
aindrops"> | 169 <input type="checkbox" checked="{{favoriteThings['raindrops']}}" id="r
aindrops"> |
| 99 <label for="raindrops" class="andrews">Raindrops</label> | 170 <label for="raindrops" class="andrews">Raindrops</label> |
| 100 <input type="checkbox" checked="{{favoriteThings['mittens']}}" id="mit
tens"> | 171 <input type="checkbox" checked="{{favoriteThings['mittens']}}" id="mit
tens"> |
| 101 <label for="mittens" class="andrews">Mittens</label> | 172 <label for="mittens" class="andrews">Mittens</label> |
| 102 <input type="checkbox" checked="{{favoriteThings['kettles']}}" id="ket
tles"> | 173 <input type="checkbox" checked="{{favoriteThings['kettles']}}" id="ket
tles"> |
| 103 <label for="kettles" class="andrews">Kettles</label> | 174 <label for="kettles" class="andrews">Kettles</label> |
| 104 </div> | 175 </div> |
| 105 | 176 |
| 106 <div class="submitarea"> | 177 <div class="submitarea"> |
| 107 <input type="submit" value="Submit" on-click="submitForm"> | 178 <input type="submit" value="Submit" on-click="{{submitForm}}"> |
| 108 <input type="reset" value="Reset" on-click="resetForm"> <br> | 179 <input type="reset" value="Clear" on-click="{{resetForm}}"> <br> |
| 109 <textarea disabled="" class="responsetext" value="{{serverResponse}}">
</textarea> | 180 <textarea disabled="" class="responsetext" value="{{serverResponse}}">
</textarea> |
| 110 <!--<p class="responsetext"> {{serverResponse}} </p>--> | 181 <!--<p class="responsetext"> {{serverResponse}} </p>--> |
| 111 </div> | 182 </div> |
| 112 </div> | 183 </div> |
| 113 </template> | 184 </template> |
| 114 | 185 |
| 115 | 186 |
| 116 </polymer-element> | 187 </polymer-element> |
| 188 |
| 189 |
| 190 |
| 191 |
| 117 <h1>SlamBook</h1> | 192 <h1>SlamBook</h1> |
| 118 | 193 |
| 119 <div class="container"> | 194 <div class="container"> |
| 120 <form is="tute-slambook-form"></form> | 195 <form is="tute-slambook-form"></form> |
| 121 </div> | 196 </div> |
| 122 | 197 |
| 198 |
| 123 | 199 |
| 124 | 200 |
| 125 <script type="application/dart" src="slambook.html_bootstrap.dart"></script><scr
ipt src="packages/browser/dart.js"></script></body></html> | 201 <script src="slambook.html_bootstrap.dart.js"></script></body></html> |
| OLD | NEW |