Merge branch 'publication' of https://github.com/Rulingcom/orbit into publication

* 'publication' of https://github.com/Rulingcom/orbit:
  multiple file fixed
This commit is contained in:
Rueshyna 2012-11-29 12:33:17 +08:00
commit 57be3dbfbd
1 changed files with 3 additions and 3 deletions

View File

@ -237,18 +237,18 @@
<%= javascript_include_tag "archive_plugin_form" %> <%= javascript_include_tag "archive_plugin_form" %>
<script> <script>
$('#add_plugin_file a.add').live('click', function(){ $('#add_plugin_file a.add').click(function(){
var new_id = $(this).prev().attr('value'); var new_id = $(this).prev().attr('value');
var old_id = new RegExp("new_writing_journal_files", "g"); var old_id = new RegExp("new_writing_journal_files", "g");
$(this).prev().attr('value', parseInt(new_id) + 1); $(this).prev().attr('value', parseInt(new_id) + 1);
$(this).parents('table').append(("<%= escape_javascript(add_attribute 'form_file', f, :writing_journal_files) %>").replace(old_id, new_id)); $(this).parents('table').append(("<%= escape_javascript(add_attribute 'form_file', f, :writing_journal_files) %>").replace(old_id, new_id));
}); });
$('.action a.delete').live('click', function(){ $('.action a.delete').click(function(){
$(this).parents('.list_item').remove(); $(this).parents('.list_item').remove();
}); });
$('.action a.remove_existing_record').live('click', function(){ $('.action a.remove_existing_record').click(function(){
$(this).next('.should_destroy').attr('value', 1); $(this).next('.should_destroy').attr('value', 1);
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide(); $("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
}); });