 
 Template.assignment_item.editing = -> Session.equals("editing_itemname", this._id)
 
-Template.assignment_item.editing_due_date = -> Session.equals("editing_due_date", @_id)
-
 Template.assignment_item.color_class = ->
     if @done
         return "list-group-item-success"

                newAssignment.text = dueDateMatch[1]
                newAssignment.due = parsedDate
        Offline.smart.assignments().insert newAssignment
        Offline.save()
        evt.target.value = ""
    dirty: (text, evt) ->
        $("#new-assignment").parent().removeClass("has-error")

    ok: (value) ->
        Offline.smart.assignments().update this._id, $set: text: value
        Session.set "editing_itemname", null
    cancel: -> Session.set "editing_itemname", null

Template.assignment_item.events okCancelEvents "#due-date-input",
    ok: (value) ->
        Offline.smart.assignments().update this._id, $set: due: DateOMatic.destringify(value)
        Session.set "editing_itemname", null
    cancel: -> Session.set "editing_itemname", null

# Tracking selected class in URL #

