socialforge/app/views/words/destroy.js.erb

12 lines
529 B
Plaintext
Raw Normal View History

2013-12-26 19:28:18 +08:00
<% if @journal_destroyed.nil? %>
alert('<%=l(:notice_failed_delete)%>');
2013-12-30 17:13:44 +08:00
<% elsif (['Principal','Project'].include? @journal_destroyed.jour_type)%>
2013-12-26 19:28:18 +08:00
var destroyedItem = $('#word_li_<%=@journal_destroyed.id%>')
destroyedItem.fadeOut(600,function(){
destroyedItem.remove();
});
<% else %>
$('#message').html('<%= escape_javascript(render(:partial => 'words/message', :locals => {:jour => @jour, :state => false, :user => @user, :feedback_pages => @feedback_pages})) %>');
$('#new_form_reference_user_id').val("");
<% end %>