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

12 lines
511 B
Plaintext
Raw Normal View History

2013-12-26 19:28:18 +08:00
<% if @journal_destroyed.nil? %>
alert('<%=l(:notice_failed_delete)%>');
<% elsif (@journal_destroyed.jour_type == 'Principal')%>
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 %>