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

o_O app: Cleanup

parent 5763d113
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
</div> </div>
<input class="edit" data-bind="value: title; enterKey: stopEditing; blur: stopEditing" /> <input class="edit" data-bind="value: title; enterKey: stopEditing; blur: stopEditing" />
</li> </li>
</ul> </ul>
</section> </section>
<footer id="footer" data-bind="visible: todos.count"> <footer id="footer" data-bind="visible: todos.count">
...@@ -39,8 +38,7 @@ ...@@ -39,8 +38,7 @@
<li><a href="#/completed">Completed</a></li> <li><a href="#/completed">Completed</a></li>
</ul> </ul>
<button id="clear-completed" data-bind="click: removeCompleted; visible: completedCount"> <button id="clear-completed" data-bind="click: removeCompleted; visible: completedCount">
Clear completed Clear completed (<span data-bind='text: completedCount'></span>)
(<span data-bind='text: completedCount'></span>)
</button> </button>
</footer> </footer>
</section> </section>
...@@ -49,8 +47,8 @@ ...@@ -49,8 +47,8 @@
<p>Created by <a href="http://weepy.github.com">weepy (Jonah Fox)</a></p> <p>Created by <a href="http://weepy.github.com">weepy (Jonah Fox)</a></p>
</footer> </footer>
<script src="../../../assets/jquery.min.js"></script> <script src="../../../assets/jquery.min.js"></script>
<script src="js/lib/o_O.js" type="text/javascript"></script> <script src="js/lib/o_O.js" ></script>
<script src="js/lib/o_O.router.js" type="text/javascript"></script> <script src="js/lib/o_O.router.js"></script>
<script src="js/app.js"></script> <script src="js/app.js"></script>
</body> </body>
</html> </html>
\ No newline at end of file
//a custom binding to handle the enter key //a custom binding to handle the enter key
o_O.bindings.enterKey = function( func, $el ) { o_O.bindings.enterKey = function( func, $el ) {
var ENTER_KEY = 13; var ENTER_KEY = 13;
var context = this var context = this;
$el.keyup(function(e) { $el.keyup(function(e) {
if( e.keyCode === ENTER_KEY ) if( e.keyCode === ENTER_KEY )
func.call(context); func.call(context);
...@@ -61,7 +61,7 @@ var Todo = o_O.model.extend({ ...@@ -61,7 +61,7 @@ var Todo = o_O.model.extend({
// main application // main application
var TodoApp = o_O.model.extend({ var TodoApp = o_O.model.extend({
current: "", current: '',
completedCount: 0, completedCount: 0,
filter: '' 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