Move coffee to assets/project

This commit is contained in:
Ciro Santilli 2014-07-14 11:50:35 +02:00
parent c589029667
commit ecd771ccdf
2 changed files with 5 additions and 5 deletions

View file

@ -46,3 +46,8 @@ $ ->
$.cookie('hide_no_ssh_message', 'false', { path: path })
$(@).parents('.no-ssh-key-message').hide()
e.preventDefault()
$('.project-home-panel .star').on 'ajax:success', (e, data, status, xhr) ->
$(@).toggleClass('on').find('.count').html(data.star_count)
.on 'ajax:error', (e, xhr, status, error) ->
new Flash('Star toggle failed. Try again later.', 'alert')

View file

@ -44,11 +44,6 @@
title: 'Unstar this project.',
starred: true,
signed_in: true
:coffeescript
$('.star').on 'ajax:success', (e, data, status, xhr) ->
$(@).toggleClass('on').find('.count').html(data.star_count)
.on 'ajax:error', (e, xhr, status, error) ->
new Flash('Star toggle failed. Try again later.', 'alert')
- else
= render 'link_to_toggle_star',
title: 'You must sign in to star a project.',