 
     return identifier
 
+  update : (newValue) ->
+    self = this
+    return false if !newValue
+    @task = newValue
+    element = $('p', "##{@identifier}")
+    element.animate { opacity: 0 }, 250, ->
+      element.html self.task
+      element.animate { opacity: 1 }, 250
+
   display : ->
     $("##{@identifier}").slideDown()
 

currentStep = 0
yastapp = new Yastapp $('.yatapi-tasks')
$addTaskInput = $ '.yatapi-tasks .yatapi-addtask-input'
$addTaskInput.on 'keypress', (event) ->
  if currentStep is 1 and event.charCode is 13
    stepTwo()

stepOne = ->
  currentStep++


    @context.on 'dblclick', "##{@identifier}", (event) ->
      newValue = prompt 'New value'
      self.update newValue

  toString : ->
    @task
