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
93a7b965
Commit
93a7b965
authored
Apr 30, 2012
by
Sindre Sorhus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
o_O app: Cleanup
parent
5763d113
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
39 deletions
+37
-39
labs/architecture-examples/o_O/index.html
labs/architecture-examples/o_O/index.html
+22
-24
labs/architecture-examples/o_O/js/app.js
labs/architecture-examples/o_O/js/app.js
+15
-15
No files found.
labs/architecture-examples/o_O/index.html
View file @
93a7b965
...
...
@@ -25,7 +25,6 @@
</div>
<input
class=
"edit"
data-bind=
"value: title; enterKey: stopEditing; blur: stopEditing"
/>
</li>
</ul>
</section>
<footer
id=
"footer"
data-bind=
"visible: todos.count"
>
...
...
@@ -39,8 +38,7 @@
<li><a
href=
"#/completed"
>
Completed
</a></li>
</ul>
<button
id=
"clear-completed"
data-bind=
"click: removeCompleted; visible: completedCount"
>
Clear completed
(
<span
data-bind=
'text: completedCount'
></span>
)
Clear completed (
<span
data-bind=
'text: completedCount'
></span>
)
</button>
</footer>
</section>
...
...
@@ -49,8 +47,8 @@
<p>
Created by
<a
href=
"http://weepy.github.com"
>
weepy (Jonah Fox)
</a></p>
</footer>
<script
src=
"../../../assets/jquery.min.js"
></script>
<script
src=
"js/lib/o_O.js"
type=
"text/javascript"
></script>
<script
src=
"js/lib/o_O.router.js"
type=
"text/javascript
"
></script>
<script
src=
"js/lib/o_O.js"
></script>
<script
src=
"js/lib/o_O.router.js
"
></script>
<script
src=
"js/app.js"
></script>
</body>
</html>
\ No newline at end of file
labs/architecture-examples/o_O/js/app.js
View file @
93a7b965
//a custom binding to handle the enter key
o_O
.
bindings
.
enterKey
=
function
(
func
,
$el
)
{
var
ENTER_KEY
=
13
;
var
context
=
this
var
context
=
this
;
$el
.
keyup
(
function
(
e
)
{
if
(
e
.
keyCode
===
ENTER_KEY
)
func
.
call
(
context
);
...
...
@@ -61,7 +61,7 @@ var Todo = o_O.model.extend({
// main application
var
TodoApp
=
o_O
.
model
.
extend
({
current
:
""
,
current
:
''
,
completedCount
:
0
,
filter
:
''
},
{
...
...
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