 
 
 ready = ->
-    $('.project-tile .panel-body, .project-tile .panel-heading, .project-tile .panel-footer').click ->
-      # Turbolinks.visit( $(@).parent().data('url') )  
-      window.location = $(@).parent().data('url')
+    add_action_to_project_tiles()
 
     $('.project-tile').hover ->
       $(@).toggleClass( 'project-tile-active' )

          if proj.queued == 'false' and project_is_updated(p_id, proj.tested_at)
            update_project_tile(p_id)

        $('.panel-body, .panel-heading, .panel-footer').click ->
          # Turbolinks.visit( $(@).parent().data('url') )  
          window.location = $(@).parent().data('url')

        )



POLL_FREQUENCY = 5000  # milliseconds


add_action_to_project_tiles = ->
    $('.project-tile .panel-body, .project-tile .panel-heading, .project-tile .panel-footer').click ->
      # Turbolinks.visit( $(@).parent().data('url') )  
      window.location = $(@).parent().data('url')  

set_icon = (project_id, is_working) ->
  button = $("#test-button-#{project_id}")
