Skip to content

Commit

Permalink
Removed references to sprout core and made a few tweaks to the todo ui.
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfeidau committed Jan 3, 2012
1 parent d806e60 commit b893e67
Show file tree
Hide file tree
Showing 6 changed files with 7,265 additions and 6,190 deletions.
9 changes: 9 additions & 0 deletions assets/examples/todos/css/todos.css
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,12 @@ body {
text-decoration: line-through; }
body ul li:nth-child(odd) {
background-color: #F7F7F7; }

label > input[type="checkbox"] {
margin-right: 8px;
}

.ember-button {
padding: 8px;
margin: 5px 5px 5px 0;
}
8 changes: 4 additions & 4 deletions assets/examples/todos/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<title>SproutCore Todos</title>
<title>Ember Todos</title>
<meta name="description" content="">
<meta name="author" content="">

Expand All @@ -27,7 +27,7 @@ <h1>Todos</h1>

<!-- Insert this after the CreateTodoView and before the collection. -->
{{#view Todos.StatsView id="stats"}}
{{#view SC.Button classBinding="isActive"
{{#view Em.Button classBinding="isActive"
target="Todos.todosController"
action="clearCompletedTodos"}}
Clear Completed Todos
Expand All @@ -40,15 +40,15 @@ <h1>Todos</h1>
valueBinding="Todos.todosController.allAreDone"}}

{{#collection contentBinding="Todos.todosController" tagName="ul" itemClassBinding="content.isDone"}}
{{view SC.Checkbox titleBinding="content.title"
{{view Em.Checkbox titleBinding="content.title"
valueBinding="content.isDone"}}
{{/collection}}
</script>


<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="js/libs/jquery-1.6.1.min.js"%3E%3C/script%3E'))</script>
<script src="../lib/ember.min.js"></script>
<script src="js/libs/ember-0.9.3.js"></script>
<script src="js/app.js"></script>
</body>
</html>
10 changes: 5 additions & 5 deletions assets/examples/todos/js/app.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Todos = SC.Application.create();
Todos = Ember.Application.create();

Todos.Todo = SC.Object.extend({
Todos.Todo = Em.Object.extend({
title: null,
isDone: false
});

Todos.todosController = SC.ArrayProxy.create({
Todos.todosController = Em.ArrayProxy.create({
content: [],

createTodo: function(title) {
Expand All @@ -32,7 +32,7 @@ Todos.todosController = SC.ArrayProxy.create({
}.property('@each.isDone')
});

Todos.StatsView = SC.View.extend({
Todos.StatsView = Em.View.extend({
remainingBinding: 'Todos.todosController.remaining',

remainingString: function() {
Expand All @@ -41,7 +41,7 @@ Todos.StatsView = SC.View.extend({
}.property('remaining')
});

Todos.CreateTodoView = SC.TextField.extend({
Todos.CreateTodoView = Em.TextField.extend({
insertNewline: function() {
var value = this.get('value');

Expand Down
Loading

0 comments on commit b893e67

Please sign in to comment.