| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2013, 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 | |
| 5 library todomvc.web.todo_row; | |
| 6 | |
| 7 import 'dart:html'; | |
| 8 import 'package:polymer/polymer.dart'; | |
| 9 import 'model.dart'; | |
| 10 | |
| 11 @CustomTag('todo-row') | |
| 12 class TodoRow extends LIElement with Polymer, Observable { | |
| 13 @published Todo todo; | |
| 14 | |
| 15 bool get applyAuthorStyles => true; | |
| 16 | |
| 17 factory TodoRow() => new Element.tag('todo-row'); | |
| 18 | |
| 19 TodoRow.created() : super.created() { | |
| 20 polymerCreated(); | |
| 21 } | |
| 22 | |
| 23 void ready() { | |
| 24 var root = getShadowRoot("todo-row"); | |
| 25 var label = root.querySelector('#label'); | |
| 26 var item = root.querySelector('.todo-item'); | |
| 27 | |
| 28 bindCssClass(item, 'completed', this, 'todo.done'); | |
| 29 bindCssClass(item, 'editing', label, 'editing'); | |
| 30 } | |
| 31 | |
| 32 void removeTodo() { appModel.todos.remove(todo); } | |
| 33 } | |
| OLD | NEW |