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