Commit 4f72c6e6 authored by Sindre Sorhus's avatar Sindre Sorhus

Merge pull request #443 from kendo-labs/gh-pages

Remove edit state persistance in Kendo UI sample
parents 4dba8cf9 afa8269f
......@@ -46,7 +46,7 @@
</section>
<div id="info">
<p>Double-click to edit a todo</p>
<p>Credits <a href="https://github.com/bsatrom">Brandon Satrom</a>, <a href="https://github.com/burkeholland">Burke Holland</a> &nbsp; <a href="https://github.com/akorchev">Atanas Korchev</a></p>
<p>Credits <a href="https://github.com/bsatrom">Brandon Satrom</a>, <a href="https://github.com/burkeholland">Burke Holland</a> &amp; <a href="https://github.com/akorchev">Atanas Korchev</a></p>
<p>Part of <a href="http://todomvc.com">TodoMVC</a></p>
</div>
<script type="text/template" id="item-template">
......
......@@ -43,7 +43,6 @@ var app = app || {};
// Implementation in js/lib/kendo.data.localstoragedatasource.ds
app.todoData = new kendo.data.extensions.LocalStorageDataSource({
itemBase: 'todos-kendo',
autoSync: true,
schema: {
model: app.Todo
}
......@@ -77,6 +76,7 @@ var app = app || {};
});
todos.add(todo);
todos.sync();
newTodo.val('');
},
toggleAll: function () {
......@@ -106,14 +106,17 @@ var app = app || {};
}
editData.set('edit', false);
this.todos.sync();
},
destroy: function (e) {
this.todos.remove(e.data);
this.todos.sync();
},
destroyCompleted: function () {
$.each(this.completedTodos(), function (index, value) {
this.todos.remove(value);
}.bind(this));
this.todos.sync();
},
// Methods for retrieving filtered todos and count values
......
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