Skip to content

Commit

Permalink
a little clean up of the testing fake todos app that doesnt do anythi…
Browse files Browse the repository at this point in the history
…ng really yet
  • Loading branch information
jayphelps committed Jul 13, 2012
1 parent 84c7699 commit 467ff76
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 27 deletions.
10 changes: 1 addition & 9 deletions test/todos/ApplicationDelegate.js
@@ -1,12 +1,4 @@
Handlebars.registerHelper("view", function(text) {
//text = Handlebars.Utils.escapeExpression(text);
//url = Handlebars.Utils.escapeExpression(url);

var result = "";
console.log(arguments)

return ""//new Handlebars.SafeString(result);
});
CBImport("ListViewController.js");

/**
* @class
Expand Down
4 changes: 2 additions & 2 deletions test/todos/ListItemView.js
Expand Up @@ -10,11 +10,11 @@ Todos.ListItemView = CB.View.extend({
taskName: "",

__taskNameDidChange: function (value) {
this.setInnerText(value);
this.innerText = value;
},

renderInContext: function (context) {
context.drawElement(this.getTagName(), function () {
context.drawElement(this.tagName, function () {
this.drawDiv(function () {
this.drawSpan()
.setClassName("TEST")
Expand Down
14 changes: 4 additions & 10 deletions test/todos/ListView.js
@@ -1,3 +1,5 @@
CBImport("ListItemView.js");

/**
* @class
* @extends CB.View
Expand All @@ -18,11 +20,10 @@ Todos.ListView = CB.View.extend({

var listItemView = new Todos.ListItemView();

listItemView.setTaskName(listItem.name);
listItem.view = listItemView;
listItemView.taskName = listItem.name;

this.appendChild(listItemView);

listItem.view = listItemView;
},

removeListItem: function (listItem) {
Expand All @@ -31,13 +32,6 @@ Todos.ListView = CB.View.extend({

listItem = listItems.splice(index, 1)[0];
this.removeChild(listItem.view);
},

_renderd: function (context) {
context.begin();
var layer = context.createElement(this.tagName);
context.push("Hello world");
context.end();
}

});
8 changes: 2 additions & 6 deletions test/todos/ListViewController.js
@@ -1,3 +1,5 @@
CBImport("ListView.js");

/**
* @class
* @extends CB.ViewController
Expand All @@ -18,12 +20,6 @@ Todos.ListViewController = CB.ViewController.extend({

listView.addListItem(item1);
listView.addListItem(item2);

CB.delay(function () {
//listView.removeListItem(item1);
}, 1000);


}

});
15 changes: 15 additions & 0 deletions test/todos/index.html
Expand Up @@ -6,8 +6,23 @@
}

</style>

<script src="../../tools/CBLoadApplication.js"></script>
<script> CBLoadApplication("Todos.js"); </script>
<script>

/*
Handlebars.registerHelper("view", function(text) {
//text = Handlebars.Utils.escapeExpression(text);
//url = Handlebars.Utils.escapeExpression(url);
var result = "";
console.log(arguments)
return ""//new Handlebars.SafeString(result);
});*/

</script>

<script id="template" type="text/x-handlebars-template">
<div class="entry">
Expand Down

0 comments on commit 467ff76

Please sign in to comment.