From 2afdd57fb61406ae866ba6d66130e52305127721 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 29 Apr 2015 10:43:36 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E6=89=93=E5=8C=85=E4=B9=B1=E7=A0=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/zipdown_controller.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/controllers/zipdown_controller.rb b/app/controllers/zipdown_controller.rb index 94a5a8194..06d69f72e 100644 --- a/app/controllers/zipdown_controller.rb +++ b/app/controllers/zipdown_controller.rb @@ -180,17 +180,14 @@ class ZipdownController < ApplicationController def zipping(zip_name_refer, files_paths, output_path, is_attachment=false, not_exist_file=[]) - ic = Iconv.new('GBK//IGNORE', 'UTF-8//IGNORE') - rename_zipfile = zip_name_refer ||= "#{Time.now.to_i.to_s}.zip" zipfile_name = "#{output_path}/#{rename_zipfile}" - Zip.unicode_names = true Dir.mkdir(File.dirname(zipfile_name)) unless File.exist?(File.dirname(zipfile_name)) Zip::File.open(zipfile_name, Zip::File::CREATE) do |zipfile| files_paths.each do |filename| - rename_file = ic.iconv( (File.basename(filename)) ).to_s - rename_file = ic.iconv( filename_to_real( File.basename(filename))).to_s if is_attachment + rename_file = File.basename(filename) + rename_file = filename_to_real( File.basename(filename)) if is_attachment begin zipfile.add(rename_file, filename) From 33da5b4a44a458f8d0a6344945e87536a029cdc7 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 29 Apr 2015 11:18:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?1=E3=80=81=E4=BD=9C=E4=B8=9A=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E5=9B=9E=E5=A4=8D=E5=88=A0=E9=99=A4=E4=B8=8D=E5=8D=B3?= =?UTF-8?q?=E4=BD=BF=E5=88=B7=E6=96=B0=202=E3=80=81=E5=8C=BF=E8=AF=84?= =?UTF-8?q?=E5=BC=B9=E6=A1=86=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/bids/_alert_anonyoms.html.erb | 4 ++-- app/views/bids/alert_anonymous_comment.js.erb | 2 +- app/views/words/destroy.js.erb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/bids/_alert_anonyoms.html.erb b/app/views/bids/_alert_anonyoms.html.erb index 2f1c443f4..4da6e0a10 100644 --- a/app/views/bids/_alert_anonyoms.html.erb +++ b/app/views/bids/_alert_anonyoms.html.erb @@ -66,10 +66,10 @@
<% end %> diff --git a/app/views/bids/alert_anonymous_comment.js.erb b/app/views/bids/alert_anonymous_comment.js.erb index 5cb4018a6..66c36e223 100644 --- a/app/views/bids/alert_anonymous_comment.js.erb +++ b/app/views/bids/alert_anonymous_comment.js.erb @@ -1,6 +1,6 @@ $('#ajax-modal').html('<%= escape_javascript(render :partial => 'alert_anonyoms', locals: { bid: @bid, totle_size:@totle_size, cur_size:@cur_size, percent:@percent}) %>'); showModal('ajax-modal', '500px'); -$('#ajax-modal').css('height','180px'); +//$('#ajax-modal').css('height','180px'); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before("" + "