瀏覽代碼

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

Frederic G. MARAND 8 年之前
父節點
當前提交
dd106e52b6
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      simple-todos.js

+ 4 - 0
simple-todos.js

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