From 5924cd6432d27d0ea83edaabee31e020b3678cab Mon Sep 17 00:00:00 2001 From: whimlex Date: Fri, 20 Mar 2015 11:37:57 +0800 Subject: [PATCH] commit --- public/javascripts/attachments.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js index 190f226da..4ae3278b1 100644 --- a/public/javascripts/attachments.js +++ b/public/javascripts/attachments.js @@ -16,7 +16,7 @@ function addFile(inputEl, file, eagerUpload) { if ($('#attachments_fields').children().length < 10) { alert($(inputEl).data('description_placeholder')); - alert($(inputEl).data('label_public')); + alert($(inputEl).data('field_is_public')); alert($(inputEl).data('are_you_sure')); var attachmentId = addFile.nextAttachmentId++; @@ -25,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), - $(''+$(inputEl).data('label_public')+'').attr({ 'class': 'ispublic-label' }) , + $(''+$(inputEl).data('field_is_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} )