Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed Jun 13, 2012
1 parent b4982d8 commit 389e7d0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
6 changes: 2 additions & 4 deletions components/TodosPage/AddForm/index.js
Expand Up @@ -2,16 +2,14 @@

var Presenter = require("WinningJS/lib/ui/Presenter");
var template = require("./template.jade");
var AddFormViewModel = require("./ViewModel");
var makeEmitter = require("pubit").makeEmitter;
var ViewModel = require("./ViewModel");

module.exports = function TodosPageAddForm(todos) {
var that = this;

var publish = makeEmitter(that, ["add"]);
var presenter = new Presenter({
template: template,
viewModel: new AddFormViewModel(todos)
viewModel: new ViewModel(todos)
});

presenter.element.then(function (element) {
Expand Down
2 changes: 0 additions & 2 deletions components/TodosPage/TodoList/index.js
Expand Up @@ -2,11 +2,9 @@
/*global WinJS: false */

var Q = require("q");
var $ = require("jquery");
var Presenter = require("WinningJS/lib/ui/Presenter");
var template = require("./template.jade");
var itemTemplate = require("./itemTemplate.jade");
var makeEmitter = require("pubit").makeEmitter;

module.exports = function TodosPageTodoList(todos, showCommands) {
var that = this;
Expand Down
2 changes: 1 addition & 1 deletion lib/TodosModel.js
Expand Up @@ -30,7 +30,7 @@ module.exports = function TodosModel(initialItems) {
that.complete = function (key) {
// TODO we can update the property if we want, but how to reflect it in UI? Probably need to make
// `completed` model property a `ko.observable`.
var item = bindingList.getItemFromKey(key);
// var item = bindingList.getItemFromKey(key);
console.log("completing!", key);
};
};

0 comments on commit 389e7d0

Please sign in to comment.