From 1cd2984c05ac2dfeef74fb03964356114a806929 Mon Sep 17 00:00:00 2001 From: z9hang Date: Fri, 20 Mar 2015 15:11:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?#2066=20=E7=BD=91=E7=AB=99=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E5=9B=BE=E7=89=87=E9=99=84=E4=BB=B6=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=EF=BC=8C=E8=83=BD=E5=90=A6=E7=82=B9=E5=87=BB=E5=90=8E=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E5=9C=A8=E6=B5=8F=E8=A7=88=E5=99=A8=E4=B8=AD=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=EF=BC=8C=E8=80=8C=E4=B8=8D=E6=98=AF=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=EF=BC=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/application.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 9e9bc9859..2b9d1586f 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -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'}); } From eebcccd4bbc39b8f2195a08db87a6bc7ca0ec283 Mon Sep 17 00:00:00 2001 From: z9hang Date: Fri, 20 Mar 2015 15:20:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=BC=96=E8=BE=91=E8=B4=B4=E5=90=A7?= =?UTF-8?q?=E7=AD=89=E4=B8=8D=E6=98=BE=E7=A4=BA=E9=99=84=E4=BB=B6=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/attachments/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb index 39ef47b1b..18f641c7f 100644 --- a/app/views/attachments/_form.html.erb +++ b/app/views/attachments/_form.html.erb @@ -1,6 +1,6 @@ <% if defined?(container) && container && container.saved_attachments %> - <% container.saved_attachments.each_with_index do |attachment, i| %> + <% container.attachments.each_with_index do |attachment, i| %> <%= 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;") %>