| OLD | NEW |
| 1 <!DOCTYPE html> | |
| 2 <!-- | 1 <!-- |
| 3 Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 2 Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 4 for details. All rights reserved. Use of this source code is governed by a | 3 for details. All rights reserved. Use of this source code is governed by a |
| 5 BSD-style license that can be found in the LICENSE file. | 4 BSD-style license that can be found in the LICENSE file. |
| 6 --> | 5 --> |
| 7 <html> | |
| 8 <head> | |
| 9 <meta charset="utf-8"> | |
| 10 </head> | |
| 11 <body> | |
| 12 <polymer-element name="editable-label" attributes="value"> | 6 <polymer-element name="editable-label" attributes="value"> |
| 13 <template> | 7 <template> |
| 14 <template bind if="{{!editing}}"> | 8 <template bind if="{{!editing}}"> |
| 15 <label class='edit-label' on-double-click="edit">{{value}}</label> | 9 <label class='edit-label' on-double-click="edit">{{value}}</label> |
| 16 </template> | 10 </template> |
| 17 <template bind if="{{editing}}"> | 11 <template bind if="{{editing}}"> |
| 18 <form on-submit="update"> | 12 <form on-submit="update"> |
| 19 <input id="edit" class="edit editing" | 13 <input id="edit" class="edit editing" |
| 20 on-blur="update" on-key-up="maybeCancel"> | 14 on-blur="update" on-key-up="maybeCancel"> |
| 21 </form> | 15 </form> |
| 22 </template> | 16 </template> |
| 23 </template> | 17 </template> |
| 24 <script type="application/dart" src="editable_label.dart"></script> | 18 <script type="application/dart" src="editable_label.dart"></script> |
| 25 </polymer-element> | 19 </polymer-element> |
| 26 </body> | |
| 27 </html> | |
| OLD | NEW |