Fix js for news quick_edit and edit for files

This commit is contained in:
Christophe Vilayphiou 2012-06-27 11:36:18 +08:00
parent 6a4abc6c43
commit 4c4929c20a
2 changed files with 2 additions and 1 deletions

View File

@ -11,7 +11,7 @@ $('.news_bulletin_files_block a.delete').live('click', function(){
$(document).on('click', '.action a.remove_existing_record', function(){
$(this).next('.should_destroy').attr('value', 1);
$("tr #" + $(this).prev().attr('value')).hide();
$("tr#" + $(this).prev().attr('value')).hide();
});
$(document).on('click', '.quick_edit_cancel', function(){

View File

@ -62,6 +62,7 @@
<a class="delete"><i class="icon-remove"></i></a>
<% else %>
<%= f.hidden_field :id %>
<%= hidden_field_tag :tr, (dom_id form_news_bulletin_file) %>
<a class="remove_existing_record"><i class="icon-remove"></i></a>
<%= f.hidden_field :should_destroy, :value => nil, :class => 'should_destroy' %>
<% end %>