2013-12-26 19:28:18 +08:00
|
|
|
<% if @journal_destroyed.nil? %>
|
|
|
|
alert('<%=l(:notice_failed_delete)%>');
|
2014-06-12 11:34:47 +08:00
|
|
|
<% elsif (['Principal','Project','Course', 'Bid', 'Contest', 'Softapplication'].include? @journal_destroyed.jour_type)%>
|
2015-07-18 16:19:43 +08:00
|
|
|
<% if @is_user%>
|
2015-07-29 17:41:10 +08:00
|
|
|
var destroyedItem = $('#<%=@journal_destroyed.id%>');
|
|
|
|
destroyedItem.fadeOut(600,function(){
|
|
|
|
destroyedItem.remove();
|
|
|
|
});
|
2015-07-09 15:27:49 +08:00
|
|
|
<% else %>
|
2015-07-18 16:19:43 +08:00
|
|
|
<% if @bid && @jours_count %>
|
|
|
|
$('#jours_count').html("<%= @jours_count %>");
|
|
|
|
<% elsif @course && @jours_count%>
|
|
|
|
$('#course_jour_count').html("(<%= @jours_count %>)");
|
|
|
|
<% elsif @user && @jours_count%>
|
|
|
|
$('#jour_count').html("<%= @jours_count %>");
|
|
|
|
<% end %>
|
|
|
|
var destroyedItem = $('#word_li_<%=@journal_destroyed.id%>')
|
|
|
|
destroyedItem.fadeOut(600,function(){
|
|
|
|
destroyedItem.remove();
|
|
|
|
});
|
2015-07-09 15:27:49 +08:00
|
|
|
|
|
|
|
<% end %>
|
2013-12-26 19:28:18 +08:00
|
|
|
<% 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 %>
|
2015-07-18 16:19:43 +08:00
|
|
|
|