Skip to content

Instantly share code, notes, and snippets.

@jeanfbrito
Created April 15, 2013 23:21
Show Gist options
  • Save jeanfbrito/5392113 to your computer and use it in GitHub Desktop.
Save jeanfbrito/5392113 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")
jQuery ->
$("li").not(":first").hover (->
$(this).css "background", "yellow"
), ->
$(this).css "background", ""
$(document).ready ->
$("#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