Browse Source

Step 11.7: Add private button event handler to Task.

Frederic G. MARAND 8 years ago
parent
commit
6c50328fc4
1 changed files with 5 additions and 0 deletions
  1. 5 0
      Task.jsx

+ 5 - 0
Task.jsx

@@ -16,6 +16,11 @@ Task = React.createClass({
     Meteor.call("removeTask", this.props.task._id);
   },
 
+  togglePrivate() {
+    Meteor._debug('Toggling private on task', this.props.task._id);
+    Meteor.call("setPrivate", this.props.task._id, ! this.props.task.private);
+  },
+
   render() {
     // Give tasks a different clasSName when they are checked off,
     // so that we can style them nicely in CSS.