This commit is contained in:
huang 2015-03-20 15:52:49 +08:00
commit 885b2092e4
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
<% if defined?(container) && container && container.saved_attachments %>
<% container.saved_attachments.each_with_index do |attachment, i| %>
<% 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 => 'filename readonly', :readonly=>'readonly')%>
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>

View File

@ -629,7 +629,7 @@ function img_thumbnails() {
$('.thumbnails a').colorbox({rel:'nofollow'});
$('.attachments').find('a').each(function(index, element) {
var href_value = $(element).attr('href');
if (/\.(jpg|png|gif|bmp)$/.test(href_value)) {
if (/\.(jpg|png|gif|bmp|PNG|BMP|GIF|JPG)$/.test(href_value)) {
$(element).colorbox({rel:'nofollow'});
}