|
|
|
@ -178,6 +178,17 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) {
|
|
|
|
|
})
|
|
|
|
|
.done(function(result) {
|
|
|
|
|
progressSpan.progressbar('value', 100).remove();
|
|
|
|
|
var containerid = $(inputEl).data('containerid');
|
|
|
|
|
console.log($(inputEl))
|
|
|
|
|
if(containerid == undefined ){
|
|
|
|
|
var count = $('#attachments_fields>span').length;
|
|
|
|
|
$('#upload_file_count').html("<span id=\"count\">" + count + "</span>" + $(inputEl).data('fileCount'));
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
var count = $('#attachments_fields' + containerid + '>span').length;
|
|
|
|
|
$('#upload_file_count' + containerid).html("<span id=\"count\">" + count + "</span>" + $(inputEl).data('fileCount'));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fileSpan.find('input.description, a').css('display', 'inline-block');
|
|
|
|
|
fileSpan.find('input.is_public_checkbox, a').css('display', 'inline-block');
|
|
|
|
|
})
|
|
|
|
@ -202,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("<span id=\"count\">" + count + "</span>" + $(inputEl).data('fileCount'));
|
|
|
|
|
$('#upload_file_count').html("<span id=\"count\">" + count + "</span>" + $(inputEl).data('lebelFileUploding'));
|
|
|
|
|
if (count >= 1) {
|
|
|
|
|
var add_attachs = $('.add_attachment');
|
|
|
|
|
var delete_all = $('.remove_all');
|
|
|
|
@ -216,7 +227,7 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) {
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
var count = $('#attachments_fields' + containerid + '>span').length;
|
|
|
|
|
$('#upload_file_count' + containerid).html("<span id=\"count\">" + count + "</span>" + $(inputEl).data('fileCount'));
|
|
|
|
|
$('#upload_file_count' + containerid).html("<span id=\"count\">" + count + "</span>" + $(inputEl).data('lebelFileUploding'));
|
|
|
|
|
if (count >= 1) {
|
|
|
|
|
var add_attachs = $('.add_attachment').filter(function(index) {
|
|
|
|
|
return $(this).data('containerid') == containerid;
|
|
|
|
@ -240,7 +251,7 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var progressSpan = $('<div>').insertAfter(fileSpan.find('input.filename'));
|
|
|
|
|
var progressSpan = $('<div>').insertAfter(fileSpan.find('input.upload_filename'));
|
|
|
|
|
progressSpan.progressbar();
|
|
|
|
|
fileSpan.addClass('ajax-waiting');
|
|
|
|
|
|
|
|
|
|