From e3b395960c7089a16efb8cc7c51367ed2ffa5354 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 25 Dec 2015 17:46:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?base64=E7=9A=84+=E5=8F=B7=E8=A6=81=E5=A4=84?= =?UTF-8?q?=E7=90=86=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/zipdown_controller.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/controllers/zipdown_controller.rb b/app/controllers/zipdown_controller.rb index 2a4430935..d66c6a30d 100644 --- a/app/controllers/zipdown_controller.rb +++ b/app/controllers/zipdown_controller.rb @@ -17,6 +17,7 @@ class ZipdownController < ApplicationController begin if params[:base64file] file = Base64.decode64(params[:base64file]) + file = file.sub('*', '+') send_file "#{OUTPUT_FOLDER}/#{file}", :filename => filename_for_content_disposition(file), :type => detect_content_type(file) else send_file "#{OUTPUT_FOLDER}/#{params[:file]}", :filename => filename_for_content_disposition(params[:filename]), :type => detect_content_type(params[:file]) @@ -118,11 +119,15 @@ class ZipdownController < ApplicationController [{files:[out_file.file_path], count: 1, index: 1, real_file: out_file.file_path, file: File.basename(out_file.file_path), - base64file: Base64.encode64(File.basename(out_file.file_path)), + base64file: encode64(File.basename(out_file.file_path)), size:(out_file.pack_size / 1024.0 / 1024.0).round(2) }] end + def encode64(str) + Base64.encode64(str).sub('+', '*') + end + def zip_homework_common homework_common bid_homework_path = [] digests = [] @@ -142,7 +147,7 @@ class ZipdownController < ApplicationController [{files:[out_file.file_path], count: 1, index: 1, real_file: out_file.file_path, file: File.basename(out_file.file_path), - base64file: Base64.encode64(File.basename(out_file.file_path)), + base64file: encode64(File.basename(out_file.file_path)), size:(out_file.pack_size / 1024.0 / 1024.0).round(2) }] end From cd36a6874ed96a4f3db7c4157cd731d9f9226d1c Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 25 Dec 2015 18:03:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9issue=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E9=94=99=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_project_issue.html.erb | 1 + public/stylesheets/public.css | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index 7767fedc7..cd9704186 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -81,6 +81,7 @@ <%= format_time(attachment.created_on) %> +
<% end %> <% end %> diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 7047316c6..5f2fc0820 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -581,7 +581,8 @@ a.postReplyCancel:hover {color:#ffffff;} .homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;} .table_maxWidth table {max-width: 642px;} .homepagePostProjectState {width:42px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;} -.homepagePostAssignTo {float:left; font-size:14px; color:#15bccf; height:30px; line-height:30px; vertical-align:middle;} +.homepagePostAssignTo {float:left; font-size:14px; color:#15bccf;} +.homepagePostAssignToAct {float:left; font-size:14px; color:#15bccf;} .homepagePostFileAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/homepage_icon.png) -85px -150px no-repeat; padding-left:35px; font-size:14px;} .homepagePostImageAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/homepage_icon.png) -86px -195px no-repeat; padding-left:35px; font-size:14px; margin-right:25px;} .postAttSize {color:#888888; font-size:12px; margin-left: 5px;}