Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
todomvc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sven Franck
todomvc
Commits
22ffae55
Commit
22ffae55
authored
Jun 20, 2012
by
Stas SUȘCOV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rewrite clear button view to use the new `action` helper.
parent
ae539e51
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
dependency-examples/emberjs_require/js/app/templates/clear_button.html
...amples/emberjs_require/js/app/templates/clear_button.html
+3
-1
dependency-examples/emberjs_require/js/app/views/clear_button.js
...ncy-examples/emberjs_require/js/app/views/clear_button.js
+1
-3
No files found.
dependency-examples/emberjs_require/js/app/templates/clear_button.html
View file @
22ffae55
Clear completed ({{completed}})
<button
{{
action
"
clearCompleted
"
target=
"controller"
}}
>
Clear completed ({{completed}})
</button>
dependency-examples/emberjs_require/js/app/views/clear_button.js
View file @
22ffae55
...
...
@@ -9,10 +9,8 @@ define('app/views/clear_button', [
* @returns Class
*/
function
(
button_html
)
{
return
Ember
.
Button
.
extend
({
return
Ember
.
View
.
extend
({
template
:
Ember
.
Handlebars
.
compile
(
button_html
),
target
:
'
controller
'
,
action
:
'
clearCompleted
'
,
completedBinding
:
'
controller.completed
'
,
elementId
:
'
clear-completed
'
,
classNameBindings
:
'
buttonClass
'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment