OLD | NEW |
1 Content-Type: text/plain | 1 Content-Type: text/plain |
2 <html lang="en"><head><style>template { display: none; }</style> | 2 <html lang="en"><head><style>template { display: none; }</style> |
3 <!-- | 3 <!-- |
4 This test runs the TodoMVC app and evaluates that it renders correctly. | 4 This test runs the TodoMVC app and evaluates that it renders correctly. |
5 --> | 5 --> |
6 <meta charset="utf-8"> | 6 <meta charset="utf-8"> |
7 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | 7 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
8 | 8 |
9 <link rel="stylesheet" href="../web/base.css"> | 9 <link rel="stylesheet" href="../web/base.css"> |
10 <script src="../../packages/polymer/testing/testing.js"></script> | 10 <script src="../../packages/polymer/testing/testing.js"></script> |
11 <title>Dart • TodoMVC</title> | 11 <title>Dart • TodoMVC</title> |
12 <link rel="stylesheet" type="text/css" href="todomvc_mainpage_test.html.css"><st
yle>template, | 12 <link rel="stylesheet" type="text/css" href="todomvc_mainpage_test.html.css"><st
yle>template, |
13 thead[template], | 13 thead[template], |
14 tbody[template], | 14 tbody[template], |
15 tfoot[template], | 15 tfoot[template], |
16 th[template], | 16 th[template], |
17 tr[template], | 17 tr[template], |
18 td[template], | 18 td[template], |
19 caption[template], | 19 caption[template], |
20 colgroup[template], | 20 colgroup[template], |
21 col[template], | 21 col[template], |
22 option[template] { | 22 option[template] { |
23 display: none; | 23 display: none; |
24 }</style></head><body> | 24 }</style></head><body><polymer-element name="todo-row" extends="li" attributes="
todo"> |
25 <span is="todo-app"><shadow-root> <section id="todoapp"> | 25 <template> |
| 26 |
| 27 <div class="todo-row_todo-item"> |
| 28 <input class="todo-row_toggle" type="checkbox" checked="{{todo.done}}"> |
| 29 <div is="editable-label" id="label" value="{{todo.task}}"></div> |
| 30 <button class="todo-row_destroy" on-click="removeTodo"></button> |
| 31 </div> |
| 32 </template> |
| 33 |
| 34 </polymer-element> |
| 35 <polymer-element name="todo-app"> |
| 36 <template> |
| 37 <section id="todoapp"> |
26 <header id="header"> | 38 <header id="header"> |
27 <h1 class="title">todos</h1> | 39 <h1 class="title">todos</h1> |
28 <form on-submit="addTodo"> | 40 <form on-submit="addTodo"> |
| 41 <input id="new-todo" placeholder="What needs to be done?" autofocus="" o
n-change="addTodo"> |
| 42 </form> |
| 43 </header> |
| 44 <section id="main"> |
| 45 <input id="toggle-all" type="checkbox" checked="{{app.allChecked}}"> |
| 46 <label for="toggle-all"></label> |
| 47 <ul id="todo-list"> |
| 48 <template repeat="{{app.visibleTodos}}"> |
| 49 <li is="todo-row" todo="{{}}"></li> |
| 50 </template> |
| 51 </ul> |
| 52 </section> |
| 53 <template bind="" if="{{app.hasTodos}}"> |
| 54 <footer id="footer"> |
| 55 <span id="todo-count"><strong>{{app.remaining}}</strong></span> |
| 56 <ul is="router-options" id="filters"> |
| 57 <li> <a href="#/">All</a> </li> |
| 58 <li> <a href="#/active">Active</a> </li> |
| 59 <li> <a href="#/completed">Completed</a> </li> |
| 60 </ul> |
| 61 <template bind="" if="{{app.hasCompleteTodos}}"> |
| 62 <button id="clear-completed" on-click="clear"> |
| 63 Clear completed ({{app.doneCount}}) |
| 64 </button> |
| 65 </template> |
| 66 </footer> |
| 67 </template> |
| 68 </section> |
| 69 <footer id="info"> |
| 70 <p>Double-click to edit a todo.</p> |
| 71 <p>Credits: the <a href="http://www.dartlang.org">Dart</a> team.</p> |
| 72 <p> |
| 73 Learn more about |
| 74 <a href="https://www.dartlang.org/articles/dart-web-components/">Dart + We
b Components</a> |
| 75 or |
| 76 <a href="https://github.com/dart-lang/web-ui/tree/master/example/todomvc">
view the source</a>. |
| 77 </p> |
| 78 <p>Part of <a href="http://todomvc.com">TodoMVC</a>.</p> |
| 79 </footer> |
| 80 </template> |
| 81 |
| 82 </polymer-element> |
| 83 <polymer-element name="router-options" extends="ul"> |
| 84 <template><content></content></template> |
| 85 |
| 86 </polymer-element> |
| 87 <polymer-element name="editable-label" extends="div" attributes="value"> |
| 88 <template> |
| 89 <template bind="" if="{{notEditing}}"> |
| 90 <label class="edit-label" on-double-click="edit">{{value}}</label> |
| 91 </template> |
| 92 <template bind="" if="{{editing}}"> |
| 93 <form on-submit="update"> |
| 94 <input id="edit" class="edit editing" on-blur="update" on-key-up="maybeC
ancel"> |
| 95 </form> |
| 96 </template> |
| 97 </template> |
| 98 |
| 99 </polymer-element> |
| 100 |
| 101 <span is="todo-app"><shadow-root> |
| 102 <section id="todoapp"> |
| 103 <header id="header"> |
| 104 <h1 class="title">todos</h1> |
| 105 <form on-submit="addTodo"> |
29 <input id="new-todo" placeholder="What needs to be done?" autofocus="" o
n-change="addTodo"> | 106 <input id="new-todo" placeholder="What needs to be done?" autofocus="" o
n-change="addTodo"> |
30 </form> | 107 </form> |
31 </header> | 108 </header> |
32 <section id="main"> | 109 <section id="main"> |
33 <input id="toggle-all" type="checkbox"> | 110 <input id="toggle-all" type="checkbox"> |
34 <label for="toggle-all"></label> | 111 <label for="toggle-all"></label> |
35 <ul id="todo-list"> | 112 <ul id="todo-list"> |
36 <template repeat="{{app.visibleTodos}}"> | 113 <template repeat="{{app.visibleTodos}}"> |
37 <li is="todo-row" todo="{{}}"></li> | 114 <li is="todo-row" todo="{{}}"></li> |
38 </template> | 115 </template> |
(...skipping 25 matching lines...) Expand all Loading... |
64 <a href="https://github.com/dart-lang/web-ui/tree/master/example/todomvc">
view the source</a>. | 141 <a href="https://github.com/dart-lang/web-ui/tree/master/example/todomvc">
view the source</a>. |
65 </p> | 142 </p> |
66 <p>Part of <a href="http://todomvc.com">TodoMVC</a>.</p> | 143 <p>Part of <a href="http://todomvc.com">TodoMVC</a>.</p> |
67 </footer> | 144 </footer> |
68 </shadow-root></span> | 145 </shadow-root></span> |
69 | 146 |
70 | 147 |
71 | 148 |
72 <script type="text/javascript" src="packages/shadow_dom/shadow_dom.debug.js"></s
cript> | 149 <script type="text/javascript" src="packages/shadow_dom/shadow_dom.debug.js"></s
cript> |
73 <script type="application/dart" src="todomvc_mainpage_test.html_bootstrap.dart">
</script></body></html> | 150 <script type="application/dart" src="todomvc_mainpage_test.html_bootstrap.dart">
</script></body></html> |
OLD | NEW |