Commit 0a385ce2 authored by Pascal Hartig's avatar Pascal Hartig

Closure: Fixed rendering of completed items

Class name is now set in the template rather than at the view layer, because
todomvc.view.ToDoItemControlRenderer#setState is called on the old element
before it's removed from the DOM, so modifications don't persist.
parent 3cd9430f
......@@ -47,7 +47,6 @@ todomvc.view.ToDoItemControlRenderer.prototype.setState =
if (element) {
switch (state) {
case goog.ui.Component.State.CHECKED:
this.enableClassName(control, 'done', enable);
this.getCheckboxElement(element).checked = enable;
break;
case goog.ui.Component.State.SELECTED:
......
......@@ -6,7 +6,7 @@
* @param checked whether the item is checked
*/
{template .toDoItem}
<li>
<li {if $checked}class="completed"{/if}>
<div class="view">
<input class="toggle" type="checkbox" {if $checked}checked{/if}>
<label>{$content}</label>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment