multiple file fixed
This commit is contained in:
parent
ead3a47243
commit
5272f20bea
|
@ -237,18 +237,18 @@
|
|||
|
||||
<%= javascript_include_tag "archive_plugin_form" %>
|
||||
<script>
|
||||
$('#add_plugin_file a.add').live('click', function(){
|
||||
$('#add_plugin_file a.add').click(function(){
|
||||
var new_id = $(this).prev().attr('value');
|
||||
var old_id = new RegExp("new_writing_journal_files", "g");
|
||||
$(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));
|
||||
});
|
||||
|
||||
$('.action a.delete').live('click', function(){
|
||||
$('.action a.delete').click(function(){
|
||||
$(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);
|
||||
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue