diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb index 872797d5c..496a3394e 100644 --- a/app/views/attachments/_form.html.erb +++ b/app/views/attachments/_form.html.erb @@ -61,7 +61,9 @@ :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)), :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i, :upload_path => uploads_path(:format => 'js',:project =>project), - :description_placeholder => l(:label_optional_description) + :description_placeholder => l(:label_optional_description), + :field_is_public => l(:field_is_public), + :are_you_sure => l(:text_are_you_sure) } %> <%= l(:label_no_file_uploaded)%> diff --git a/config/locales/projects/en.yml b/config/locales/projects/en.yml index 5aca81426..ce9f8bf28 100644 --- a/config/locales/projects/en.yml +++ b/config/locales/projects/en.yml @@ -33,7 +33,7 @@ en: # label_project_id: "Projcet ID:" - label_apply_project: Apply to Join + label_apply_project: "+Apply to Join" label_exit_project: Exit label_apply_project_waiting: "Application has been processed, please wait for administrator review." label_unapply_project: Cancel the application diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index bd547c37e..974dbb7ef 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -10,9 +10,8 @@ zh: # # 公共类 # - label_apply_project: 申请加入 - label_project_new: 新建项目 - label_join_project: 加入项目 + label_project_new: "新建项目" + label_join_project: "加入项目" # @@ -36,7 +35,7 @@ zh: # label_project_id: "项目ID:" - label_apply_project: 申请加入 + label_apply_project: "+申请加入" label_exit_project: 退出项目 label_apply_project_waiting: 已处理申请,请等待管理员审核 label_unapply_project: 取消申请 diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js index 8fbaa5981..190f226da 100644 --- a/public/javascripts/attachments.js +++ b/public/javascripts/attachments.js @@ -15,7 +15,9 @@ function postUpMsg(attachmentId) function addFile(inputEl, file, eagerUpload) { if ($('#attachments_fields').children().length < 10) { - + alert($(inputEl).data('description_placeholder')); + alert($(inputEl).data('label_public')); + alert($(inputEl).data('are_you_sure')); var attachmentId = addFile.nextAttachmentId++; var fileSpan = $('', { 'id': 'attachments_' + attachmentId, 'class':'attachment' }); @@ -23,7 +25,7 @@ function addFile(inputEl, file, eagerUpload) { fileSpan.append( $('', { 'type': 'text', 'class': 'filename readonly', 'name': 'attachments[' + attachmentId + '][filename]', 'readonly': 'readonly'} ).val(file.name), $('', { 'type': 'text', 'class': 'description', 'name': 'attachments[' + attachmentId + '][description]', 'maxlength': 254, 'placeholder': $(inputEl).data('description-placeholder') } ).toggle(!eagerUpload), - $('公开:').attr({ 'class': 'ispublic-label' }) , + $(''+$(inputEl).data('label_public')+'').attr({ 'class': 'ispublic-label' }) , $('', { 'type': 'checkbox', 'class': 'is_public_checkbox','value':1, 'name': 'attachments[' + attachmentId + '][is_public_checkbox]', checked:'checked' } ).toggle(!eagerUpload), $(' ').attr({ 'href': "#", 'class': 'remove-upload', 'data-confirm' : "您确定要删除吗?" }).click(removeFile).toggle(!eagerUpload), $('
', { 'class': 'div_attachments', 'name': 'div_'+'attachments_' + attachmentId} ) @@ -87,7 +89,6 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) { var count=$('#attachments_fields>span').length; $('#upload_file_count').html("已上传"+""+count+""+"个文件"); - if(count>=1){ var add_attachs=$('.add_attachment'); var delete_all=$('.remove_all');