From d13205bd3de9e40c0a35d0eb2e545e69dedda452 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Wed, 11 Nov 2015 11:39:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=AD=A3=E5=9C=A8=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/attachments/_form.html.erb | 1 + app/views/attachments/_form_course.html.erb | 1 + app/views/attachments/_form_project.html.erb | 2 ++ app/views/attachments/_new_form.html.erb | 1 + app/views/blog_comments/_blog_attachments.erb | 1 + app/views/files/_attachement_list.html.erb | 2 ++ app/views/files/_new_style_attachment_list.html.erb | 1 + app/views/forums/_file_form.html.erb | 1 + app/views/projects/_upload_project_files_list.html.erb | 1 + app/views/student_work/_student_work_attachment_form.html.erb | 1 + app/views/users/_attachment_list.html.erb | 1 + app/views/users/_user_homework_attachment.html.erb | 1 + config/locales/projects/zh.yml | 1 + public/javascripts/attachments.js | 4 ++-- 14 files changed, 17 insertions(+), 2 deletions(-) diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb index 3dbc8d8ba..ab8b80dcb 100644 --- a/app/views/attachments/_form.html.erb +++ b/app/views/attachments/_form.html.erb @@ -62,6 +62,7 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all) } %> diff --git a/app/views/attachments/_form_course.html.erb b/app/views/attachments/_form_course.html.erb index dddd0209e..ef5385647 100644 --- a/app/views/attachments/_form_course.html.erb +++ b/app/views/attachments/_form_course.html.erb @@ -61,6 +61,7 @@ :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), :delete_all_files => l(:text_are_you_sure_all), + :lebel_file_uploding => l(:lebel_file_uploding), :containerid => "#{container.id}" } %> <% if container.nil? %> diff --git a/app/views/attachments/_form_project.html.erb b/app/views/attachments/_form_project.html.erb index d1cdf8cc9..a9cb068ad 100644 --- a/app/views/attachments/_form_project.html.erb +++ b/app/views/attachments/_form_project.html.erb @@ -60,7 +60,9 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all), + :lebel_file_uploding => l(:lebel_file_uploding), :containerid => "#{container.id}" } %> <%= l(:label_no_file_uploaded)%> diff --git a/app/views/attachments/_new_form.html.erb b/app/views/attachments/_new_form.html.erb index 47f6fd202..75efb448e 100644 --- a/app/views/attachments/_new_form.html.erb +++ b/app/views/attachments/_new_form.html.erb @@ -42,6 +42,7 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all) } %> diff --git a/app/views/blog_comments/_blog_attachments.erb b/app/views/blog_comments/_blog_attachments.erb index 48fe91099..dd8be659b 100644 --- a/app/views/blog_comments/_blog_attachments.erb +++ b/app/views/blog_comments/_blog_attachments.erb @@ -62,6 +62,7 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all) } %> diff --git a/app/views/files/_attachement_list.html.erb b/app/views/files/_attachement_list.html.erb index 01e5dca5f..c5a3b9af0 100644 --- a/app/views/files/_attachement_list.html.erb +++ b/app/views/files/_attachement_list.html.erb @@ -17,6 +17,7 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all) } %> <% else %> @@ -35,6 +36,7 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all) } %> <% end %> diff --git a/app/views/files/_new_style_attachment_list.html.erb b/app/views/files/_new_style_attachment_list.html.erb index 7147769da..174a05047 100644 --- a/app/views/files/_new_style_attachment_list.html.erb +++ b/app/views/files/_new_style_attachment_list.html.erb @@ -17,6 +17,7 @@ :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), :delete_all_files => l(:text_are_you_sure_all), + :lebel_file_uploding => l(:lebel_file_uploding), :containerid => "#{container.id}" } %> diff --git a/app/views/forums/_file_form.html.erb b/app/views/forums/_file_form.html.erb index 560afc6d9..2510952f1 100644 --- a/app/views/forums/_file_form.html.erb +++ b/app/views/forums/_file_form.html.erb @@ -63,6 +63,7 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all) } %> diff --git a/app/views/projects/_upload_project_files_list.html.erb b/app/views/projects/_upload_project_files_list.html.erb index b072faa24..c399bf210 100644 --- a/app/views/projects/_upload_project_files_list.html.erb +++ b/app/views/projects/_upload_project_files_list.html.erb @@ -16,6 +16,7 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all), :containerid => "#{container.id}" } %> diff --git a/app/views/student_work/_student_work_attachment_form.html.erb b/app/views/student_work/_student_work_attachment_form.html.erb index 265ff9be7..d82aea7f9 100644 --- a/app/views/student_work/_student_work_attachment_form.html.erb +++ b/app/views/student_work/_student_work_attachment_form.html.erb @@ -19,6 +19,7 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all), :containerid => "#{work.id}" } %> diff --git a/app/views/users/_attachment_list.html.erb b/app/views/users/_attachment_list.html.erb index 33e944498..3d44fa267 100644 --- a/app/views/users/_attachment_list.html.erb +++ b/app/views/users/_attachment_list.html.erb @@ -18,6 +18,7 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all) } %> diff --git a/app/views/users/_user_homework_attachment.html.erb b/app/views/users/_user_homework_attachment.html.erb index 9b7c6c06a..24d37ae63 100644 --- a/app/views/users/_user_homework_attachment.html.erb +++ b/app/views/users/_user_homework_attachment.html.erb @@ -40,6 +40,7 @@ :field_is_public => l(:field_is_public), :are_you_sure => l(:text_are_you_sure), :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), :delete_all_files => l(:text_are_you_sure_all) } %> diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index 88a710633..1a18e5a14 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -183,6 +183,7 @@ zh: label_optional_description: 可选的描述 label_file_count: "个文件已上传" + lebel_file_uploding: "个文件正在上传" # diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js index 424e0e572..5718983fa 100644 --- a/public/javascripts/attachments.js +++ b/public/javascripts/attachments.js @@ -213,7 +213,7 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) { var containerid = $(inputEl).data('containerid'); if (containerid == undefined) { var count = $('#attachments_fields>span').length; - //$('#upload_file_count').html("" + count + "" + $(inputEl).data('fileCount')); + $('#upload_file_count').html("" + count + "" + $(inputEl).data('lebelFileUploding')); if (count >= 1) { var add_attachs = $('.add_attachment'); var delete_all = $('.remove_all'); @@ -227,7 +227,7 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) { } } else { var count = $('#attachments_fields' + containerid + '>span').length; - //$('#upload_file_count' + containerid).html("" + count + "" + $(inputEl).data('fileCount')); + $('#upload_file_count' + containerid).html("" + count + "" + $(inputEl).data('lebelFileUploding')); if (count >= 1) { var add_attachs = $('.add_attachment').filter(function(index) { return $(this).data('containerid') == containerid;