Commit 93a7b965 authored by Sindre Sorhus's avatar Sindre Sorhus

o_O app: Cleanup

parent 5763d113
......@@ -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
//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: ''
}, {
......
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