From 4c4929c20aa4ef1e3a9a69789140d19077a2b8dc Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Wed, 27 Jun 2012 11:36:18 +0800 Subject: [PATCH] Fix js for news quick_edit and edit for files --- app/assets/javascripts/news_bulletin_form.js | 2 +- .../back_end/news_bulletins/_form_news_bulletin_file.html.erb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/news_bulletin_form.js b/app/assets/javascripts/news_bulletin_form.js index c6c98b68..9038cbb8 100644 --- a/app/assets/javascripts/news_bulletin_form.js +++ b/app/assets/javascripts/news_bulletin_form.js @@ -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(){ diff --git a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_form_news_bulletin_file.html.erb b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_form_news_bulletin_file.html.erb index d2c27125..61a96f42 100644 --- a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_form_news_bulletin_file.html.erb +++ b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_form_news_bulletin_file.html.erb @@ -62,6 +62,7 @@ <% else %> <%= f.hidden_field :id %> + <%= hidden_field_tag :tr, (dom_id form_news_bulletin_file) %> <%= f.hidden_field :should_destroy, :value => nil, :class => 'should_destroy' %> <% end %>