Commit 22ffae55 authored by Stas SUȘCOV's avatar Stas SUȘCOV

Rewrite clear button view to use the new `action` helper.

parent ae539e51
Clear completed ({{completed}}) <button {{action "clearCompleted" target="controller"}}>
Clear completed ({{completed}})
</button>
...@@ -9,10 +9,8 @@ define('app/views/clear_button', [ ...@@ -9,10 +9,8 @@ define('app/views/clear_button', [
* @returns Class * @returns Class
*/ */
function( button_html ) { function( button_html ) {
return Ember.Button.extend({ return Ember.View.extend({
template: Ember.Handlebars.compile( button_html ), template: Ember.Handlebars.compile( button_html ),
target: 'controller',
action: 'clearCompleted',
completedBinding: 'controller.completed', completedBinding: 'controller.completed',
elementId: 'clear-completed', elementId: 'clear-completed',
classNameBindings: 'buttonClass', classNameBindings: 'buttonClass',
......
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