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
09734912
Commit
09734912
authored
Jul 01, 2012
by
addyosmani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding ENTER_KEY const
parent
a3d93c06
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
architecture-examples/backbone/js/init.js
architecture-examples/backbone/js/init.js
+4
-0
architecture-examples/backbone/js/views/appView.js
architecture-examples/backbone/js/views/appView.js
+1
-1
architecture-examples/backbone/js/views/todoView.js
architecture-examples/backbone/js/views/todoView.js
+1
-1
No files found.
architecture-examples/backbone/js/init.js
View file @
09734912
// Constants
var
ENTER_KEY
=
13
;
// Setup namespace for the app
window
.
app
=
window
.
app
||
{};
\ No newline at end of file
architecture-examples/backbone/js/views/appView.js
View file @
09734912
...
...
@@ -108,7 +108,7 @@ $(function( $ ) {
// persisting it to *localStorage*.
createOnEnter
:
function
(
e
)
{
if
(
e
.
keyCode
!==
13
){
if
(
e
.
keyCode
!==
ENTER_KEY
){
return
;
}
...
...
architecture-examples/backbone/js/views/todoView.js
View file @
09734912
...
...
@@ -65,7 +65,7 @@ $(function() {
// If you hit `enter`, we're through editing the item.
updateOnEnter
:
function
(
e
)
{
if
(
e
.
keyCode
===
13
){
if
(
e
.
keyCode
===
ENTER_KEY
){
this
.
close
();
}
},
...
...
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