Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Side by Side Diff: samples/third_party/todomvc/web/todo_row.dart

Issue 24149003: Port of github.com/polymer/polymer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library todo_row; 5 library todomvc.web.todo_row;
6 6
7 import 'package:polymer/polymer.dart'; 7 import 'package:polymer/polymer.dart';
8 import 'model.dart'; 8 import 'model.dart';
9 9
10 @CustomTag('todo-row') 10 @CustomTag('todo-row')
11 class TodoRow extends PolymerElement with ObservableMixin { 11 class TodoRow extends PolymerElement {
12 @observable Todo todo; 12 @published Todo todo;
13 13
14 bool get applyAuthorStyles => true; 14 bool get applyAuthorStyles => true;
15 15
16 // TODO(sigmund,terry): bring back scoped-css polyfills
17
18 void created() { 16 void created() {
19 super.created(); 17 super.created();
20 var root = getShadowRoot("todo-row"); 18 var root = getShadowRoot("todo-row");
21 var label = root.query('#label').xtag; 19 var label = root.query('#label').xtag;
22 var item = root.query('.todo-item'); 20 var item = root.query('.todo-item');
23 21
24 bindCssClass(item, 'completed', this, 'todo.done'); 22 bindCssClass(item, 'completed', this, 'todo.done');
25 bindCssClass(item, 'editing', label, 'editing'); 23 bindCssClass(item, 'editing', label, 'editing');
26 } 24 }
27 25
28 void removeTodo() => appModel.todos.remove(todo); 26 void removeTodo() => appModel.todos.remove(todo);
29 } 27 }
OLDNEW
« no previous file with comments | « samples/third_party/todomvc/web/router_options.dart ('k') | samples/third_party/todomvc/web/todo_row.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698