21 lines
943 B
Plaintext
21 lines
943 B
Plaintext
<div>
|
|
<strong>{_.filter(this.state.todos, {done:true}).length}</strong>
|
|
done,
|
|
<strong>{_.filter(this.state.todos, {done:false}).length}</strong>
|
|
pending
|
|
<br/>
|
|
<div rt-repeat="todo in this.state.todos" key="{todo.key}">
|
|
<img src="img/samples/delete.png"
|
|
onClick="()=>this.remove(todo)"
|
|
title="Remove Todo"
|
|
style="cursor:pointer"/>
|
|
<input type="checkbox" checked="{todo.done}"
|
|
onChange="()=>this.toggleChecked(todoIndex)"/>
|
|
<span style="text-decoration: {todo.done ? 'line-through': 'none'}">{todo.value}</span>
|
|
</div>
|
|
<input key="myinput" style="width:130px" type="text"
|
|
onKeyDown="(e) => if (e.keyCode == 13) { e.preventDefault(); this.add(); }"
|
|
valueLink="{this.linkState('edited')}"/>
|
|
<button onClick="()=>this.add()">Add</button><br/>
|
|
<button onClick="()=>this.clearDone()">Clear done</button>
|
|
</div> |