daily pastebin goal
19%
SHARE
TWEET

Untitled

a guest Oct 20th, 2018 65 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1.   Template.task_form.events = () ->
  2.     'click #creation': () ->
  3.       console.log("hello")
  4.       hours = document.getElementById("task_hours").value * 60 * 60
  5.       minutes = document.getElementById("task_minutes").value * 60
  6.       seconds = document.getElementById("task_seconds").value
  7.       Tasks.insert({title: document.getElementById("task_title").value, total: hours + minutes + seconds})
  8.  
  9.  
  10.  
  11. <template name="task_form">
  12.   <div id="task_from">
  13.     <legend>Create Task</legend>
  14.     <label>Title</label>
  15.     <input id="task_title" type="text"/>
  16.     <label>Hours</label>
  17.     <input id="task_hours" type="text" value="0"/>
  18.     <label>Minutes</label>
  19.     <input id="task_minutes" type"text" value="0"/>
  20.     <label>Seconds</label>
  21.     <input id="task_seconds" type"text" value="0"/>
  22.     <input type="button" id="creation" class="button btn-primary" value="Create"/>
  23.   </div>
  24. </template>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top