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
Eugene Shen
todomvc
Commits
1abb3cc2
Commit
1abb3cc2
authored
May 04, 2012
by
Sindre Sorhus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Funnyface.js: Indentation
parent
158848fb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
99 additions
and
100 deletions
+99
-100
labs/architecture-examples/o_O/js/app.js
labs/architecture-examples/o_O/js/app.js
+99
-100
No files found.
labs/architecture-examples/o_O/js/app.js
View file @
1abb3cc2
...
...
@@ -2,8 +2,8 @@
(
function
(
window
)
{
'
use strict
'
;
// represents a single todo item
var
Todo
=
o_O
.
model
.
extend
({
// represents a single todo item
var
Todo
=
o_O
.
model
.
extend
({
title
:
''
,
completed
:
false
},
...
...
@@ -56,10 +56,10 @@ var Todo = o_O.model.extend({
}
}
}
);
);
// main application
var
TodoApp
=
o_O
.
model
.
extend
({
// main application
var
TodoApp
=
o_O
.
model
.
extend
({
current
:
''
,
completedCount
:
0
,
filter
:
''
...
...
@@ -123,10 +123,9 @@ var TodoApp = o_O.model.extend({
pluralize
:
function
(
word
,
count
)
{
return
word
+
(
count
===
1
?
''
:
'
s
'
);
}
}
);
});
function
main
()
{
function
main
()
{
// load todos
var
i
,
l
,
todos
=
[];
...
...
@@ -159,10 +158,10 @@ function main() {
.
addClass
(
'
selected
'
);
})
.
start
();
}
}
// a custom binding to handle the enter key
o_O
.
bindings
.
enterKey
=
function
(
func
,
$el
)
{
// a custom binding to handle the enter key
o_O
.
bindings
.
enterKey
=
function
(
func
,
$el
)
{
var
ENTER_KEY
=
13
,
context
=
this
;
...
...
@@ -171,11 +170,11 @@ o_O.bindings.enterKey = function( func, $el ) {
func
.
call
(
context
);
}
});
};
};
o_O
.
bindingTypes
.
enterKey
=
'
outbound
'
;
o_O
.
bindingTypes
.
enterKey
=
'
outbound
'
;
// kick it off
main
();
// kick it off
main
();
})(
window
);
\ No newline at end of file
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