|
@@ -46,13 +46,11 @@ if (Meteor.isClient) {
|
|
|
|
|
|
Template.task.events({
|
|
|
'click .delete': function (e) {
|
|
|
- Tasks.remove(this._id);
|
|
|
+ Meteor.call('deleteTask', this._id);
|
|
|
},
|
|
|
|
|
|
'click .toggle-checked' : function (e) {
|
|
|
- Tasks.update(this._id, {
|
|
|
- $set: { checked: !this.checked }
|
|
|
- });
|
|
|
+ Meteor.call('setChecked', this._id, !this.checked);
|
|
|
}
|
|
|
});
|
|
|
|