新建,编辑issue时,上传附件尽课程展示全

This commit is contained in:
daiao 2016-11-07 17:08:24 +08:00
parent b6a58d9bea
commit e57e439210
2 changed files with 6 additions and 6 deletions

View File

@ -7,15 +7,15 @@
<% if defined?(container) && container && container.saved_attachments %>
<% container.attachments.each_with_index do |attachment, i| %>
<span id="attachments_p<%= i %>" class="attachment">
<%#= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'upload_filename readonly hidden', :readonly => 'readonly', :style=>'border:none;max-width:460px;width:initial;') %>
<span class="upload_filename hidden" style="border:none; max-width:460px; width:inherit; display:inline-block;" id=<%= "attachments[p#{i}][filename]" %> ><%= attachment.filename %></span>
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'upload_filename readonly hidden', :readonly => 'readonly', :style=>'border:none; width:460px;') %>
<%#= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style => "display: inline-block;") %>
<!--<span class="ispublic-label"><%#= l(:field_is_public) %>:</span>-->
<%#= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public, attachment.is_public == 1 ? true : false, :class => 'is_public') %>
<%= if attachment.id.nil?
#待补充代码
else
link_to('&nbsp;'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload', :style => 'vertical-align:top;')
link_to('&nbsp;'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload')
end
%>
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>

View File

@ -101,13 +101,13 @@ function addFile(inputEl, file, eagerUpload,btnId) {
});
fileSpan.append(
$('<span></span>', {
$('<input>', {
'type': 'text',
'class': 'upload_filename readonly hidden',
'name': 'attachments[' + attachmentId + '][filename]',
'readonly': 'readonly',
'style': 'border:none;max-width:460px;display:inline-block;width:initial;'
}).text(file.name),
'style': 'border:none; width:464px;'
}).val(file.name),
// $('<input>', {
// 'type': 'text',
// 'class': 'description',