Add todoapp benchmark
This commit is contained in:
parent
479db8c2cc
commit
02e7b40c07
218 changed files with 63168 additions and 0 deletions
1
bench/implementations/ember-2.6.3/app/templates/active.hbs
Executable file
1
bench/implementations/ember-2.6.3/app/templates/active.hbs
Executable file
|
|
@ -0,0 +1 @@
|
|||
{{todo-list todos=todos}}
|
||||
29
bench/implementations/ember-2.6.3/app/templates/application.hbs
Executable file
29
bench/implementations/ember-2.6.3/app/templates/application.hbs
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
<section id="todoapp">
|
||||
<header id="header">
|
||||
<h1>todos</h1>
|
||||
<input type="text" id="new-todo" class="new-todo" onkeydown={{action 'createTodo'}} placeholder="What needs to be done?" autofocus>
|
||||
</header>
|
||||
{{outlet}}
|
||||
{{#if (gt model.length 0)}}
|
||||
<footer id="footer">
|
||||
<span id="todo-count"><strong>{{remaining.length}}</strong> {{pluralize 'item' remaining.length}} left</span>
|
||||
<ul id="filters">
|
||||
<li>{{#link-to "index" activeClass="selected"}}All{{/link-to}}</li>
|
||||
<li>{{#link-to "active" activeClass="selected"}}Active{{/link-to}}</li>
|
||||
<li>{{#link-to "completed" activeClass="selected"}}Completed{{/link-to}}</li>
|
||||
</ul>
|
||||
{{#if completed.length}}
|
||||
<button id="clear-completed" onclick={{action 'clearCompleted'}}>Clear completed</button>
|
||||
{{/if}}
|
||||
</footer>
|
||||
{{/if}}
|
||||
</section>
|
||||
<footer id="info">
|
||||
<p>Double-click to edit a todo</p>
|
||||
<p>
|
||||
Created by
|
||||
<a href="http://github.com/cibernox">Miguel Camba</a>,
|
||||
<a href="http://github.com/addyosmani">Addy Osmani</a>
|
||||
</p>
|
||||
<p>Part of <a href="http://todomvc.com">TodoMVC</a></p>
|
||||
</footer>
|
||||
1
bench/implementations/ember-2.6.3/app/templates/completed.hbs
Executable file
1
bench/implementations/ember-2.6.3/app/templates/completed.hbs
Executable file
|
|
@ -0,0 +1 @@
|
|||
{{todo-list todos=todos}}
|
||||
6
bench/implementations/ember-2.6.3/app/templates/components/todo-item.hbs
Executable file
6
bench/implementations/ember-2.6.3/app/templates/components/todo-item.hbs
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
<div class="view">
|
||||
<input type="checkbox" class="toggle" checked={{todo.completed}} onchange={{action 'toggleCompleted'}}>
|
||||
<label ondblclick={{action 'startEditing'}}>{{todo.title}}</label>
|
||||
<button onclick={{action 'removeTodo'}} class="destroy"></button>
|
||||
</div>
|
||||
<input type="text" class="edit" value={{todo.title}} onblur={{action 'doneEditing' value='target.value'}} onkeydown={{action 'handleKeydown'}} autofocus>
|
||||
10
bench/implementations/ember-2.6.3/app/templates/components/todo-list.hbs
Executable file
10
bench/implementations/ember-2.6.3/app/templates/components/todo-list.hbs
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
{{#if todos.length}}
|
||||
{{#if canToggle}}
|
||||
<input type="checkbox" id="toggle-all" checked={{allCompleted}} onchange={{action 'toggleAll'}}>
|
||||
{{/if}}
|
||||
<ul id="todo-list" class="todo-list">
|
||||
{{#each todos as |todo|}}
|
||||
{{todo-item todo=todo onStartEdit=(action 'disableToggle') onEndEdit=(action 'enableToggle')}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
3
bench/implementations/ember-2.6.3/app/templates/index.hbs
Executable file
3
bench/implementations/ember-2.6.3/app/templates/index.hbs
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
{{#if model.length}}
|
||||
{{todo-list todos=model}}
|
||||
{{/if}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue