Skip to content

Instantly share code, notes, and snippets.

@josemarluedke
Forked from jeanfbrito/gist:5392113
Last active December 16, 2015 06:29
Show Gist options
  • Save josemarluedke/5392125 to your computer and use it in GitHub Desktop.
Save josemarluedke/5392125 to your computer and use it in GitHub Desktop.
Tasker.Projects = {} if Tasker.Projects is undefined
Tasker.Projects.Show = ->
$('.new-task-button').click ->
url = $(this).data('url')
$.ajax
url: url
type: "GET"
success: (data)->
$('#newTask .modal-body').html(data)
error: ->
$('#newTask .modal-body').html("ERROR")
$('.edit-project-button').click ->
url = $(this).data('url')
$.ajax
url: url
type: "GET"
success: (data)->
$('#editProject .modal-body').html(data)
error: ->
$('#editProject .modal-body').html("ERROR")
$('.new-document-button').click ->
url = $(this).data('url')
$.ajax
url: url
type: "GET"
success: (data)->
$('#newDocument .modal-body').html(data)
error: ->
$('#newDocument .modal-body').html("ERROR")
$("li").not(":first").hover (->
$(this).css "background", "yellow"
), ->
$(this).css "background", ""
$("#subtasks li").click ->
$(".task-details").html "My text is changed!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment