@@ -11,8 +11,9 | |||
|
11 | 11 | <% end %> |
|
12 | 12 | </span> |
|
13 | 13 | <span class="add_attachment"> |
|
14 |
<%= file_field_tag 'attachments |
|
|
14 | <%= file_field_tag 'attachments[dummy][file]', | |
|
15 | 15 | :id => nil, |
|
16 | :class => 'file_selector', | |
|
16 | 17 | :multiple => true, |
|
17 | 18 | :onchange => 'addInputFiles(this);', |
|
18 | 19 | :data => { |
@@ -156,8 +156,7 function handleFileDropEvent(e) { | |||
|
156 | 156 | blockEventPropagation(e); |
|
157 | 157 | |
|
158 | 158 | if ($.inArray('Files', e.dataTransfer.types) > -1) { |
|
159 | ||
|
160 | uploadAndAttachFiles(e.dataTransfer.files, $('input:file[name=attachments_files]')); | |
|
159 | uploadAndAttachFiles(e.dataTransfer.files, $('input:file.file_selector')); | |
|
161 | 160 | } |
|
162 | 161 | } |
|
163 | 162 |
@@ -1000,7 +1000,7 class IssuesControllerTest < ActionController::TestCase | |||
|
1000 | 1000 | get :show, :id => 1 |
|
1001 | 1001 | |
|
1002 | 1002 | assert_select 'form#issue-form[method=post][enctype=multipart/form-data]' do |
|
1003 |
assert_select 'input[type=file][name=?]', 'attachments |
|
|
1003 | assert_select 'input[type=file][name=?]', 'attachments[dummy][file]' | |
|
1004 | 1004 | end |
|
1005 | 1005 | end |
|
1006 | 1006 | |
@@ -1569,7 +1569,7 class IssuesControllerTest < ActionController::TestCase | |||
|
1569 | 1569 | get :new, :project_id => 1, :tracker_id => 1 |
|
1570 | 1570 | |
|
1571 | 1571 | assert_select 'form[id=issue-form][method=post][enctype=multipart/form-data]' do |
|
1572 |
assert_select 'input[name=?][type=file]', 'attachments |
|
|
1572 | assert_select 'input[name=?][type=file]', 'attachments[dummy][file]' | |
|
1573 | 1573 | end |
|
1574 | 1574 | end |
|
1575 | 1575 |
General Comments 0
You need to be logged in to leave comments.
Login now