This commit is contained in:
whimlex 2015-03-20 11:37:57 +08:00
parent 93838f604d
commit 5924cd6432
1 changed files with 2 additions and 2 deletions

View File

@ -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(
$('<input>', { 'type': 'text', 'class': 'filename readonly', 'name': 'attachments[' + attachmentId + '][filename]', 'readonly': 'readonly'} ).val(file.name),
$('<input>', { 'type': 'text', 'class': 'description', 'name': 'attachments[' + attachmentId + '][description]', 'maxlength': 254, 'placeholder': $(inputEl).data('description-placeholder') } ).toggle(!eagerUpload),
$('<span >'+$(inputEl).data('label_public')+'</span>').attr({ 'class': 'ispublic-label' }) ,
$('<span >'+$(inputEl).data('field_is_public')+'</span>').attr({ 'class': 'ispublic-label' }) ,
$('<input>', { 'type': 'checkbox', 'class': 'is_public_checkbox','value':1, 'name': 'attachments[' + attachmentId + '][is_public_checkbox]', checked:'checked' } ).toggle(!eagerUpload),
$('<a>&nbsp</a>').attr({ 'href': "#", 'class': 'remove-upload', 'data-confirm' : "您确定要删除吗?" }).click(removeFile).toggle(!eagerUpload),
$('<div>', { 'class': 'div_attachments', 'name': 'div_'+'attachments_' + attachmentId} )