', { 'id': 'attachments_' + attachmentId, 'class':'attachment' });
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),
- $(''+$(inputEl).data('field_is_public')+'').attr({ 'class': 'ispublic-label' }) ,
+ $('', { 'type': 'text', 'class': 'description', 'name': 'attachments[' + attachmentId + '][description]', 'maxlength': 254, 'placeholder': $(inputEl).data('descriptionPlaceholder') } ).toggle(!eagerUpload),
+ $(''+$(inputEl).data('fieldIsPublic')+':').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),
+ $(' ').attr({ 'href': "#", 'class': 'remove-upload', 'data-confirm' : $(inputEl).data('areYouSure') }).click(removeFile).toggle(!eagerUpload),
$('', { 'class': 'div_attachments', 'name': 'div_'+'attachments_' + attachmentId} )
).appendTo('#attachments_fields');
@@ -88,7 +86,7 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) {
//gcm files count and add delete_all link
var count=$('#attachments_fields>span').length;
- $('#upload_file_count').html("已上传"+""+count+""+"个文件");
+ $('#upload_file_count').html(""+count+""+"个文件已上传");
if(count>=1){
var add_attachs=$('.add_attachment');
var delete_all=$('.remove_all');
@@ -122,7 +120,7 @@ function removeFile() {
//gcm delete all file
function removeAll(){
- if(confirm("您确定要删除所有文件吗?")){
+ if(confirm("您确定要删除所有文件吗")){
$(".remove-upload").removeAttr("data-confirm");
$(".remove-upload").click();
}