Browse Source

Commit 11.7: Add event handler to call the setPrivate method.

Frederic G. MARAND 8 years ago
parent
commit
dd106e52b6
1 changed files with 4 additions and 0 deletions
  1. 4 0
      simple-todos.js

+ 4 - 0
simple-todos.js

@@ -66,6 +66,10 @@ if (Meteor.isClient) {
 
 
     'click .toggle-checked' : function (e) {
     'click .toggle-checked' : function (e) {
       Meteor.call('setChecked', this._id, !this.checked);
       Meteor.call('setChecked', this._id, !this.checked);
+    },
+
+    'click .toggle-private': function (e) {
+      Meteor.call('setPrivate', this._id, ! this.private);
     }
     }
   });
   });