$(function () { function dialog(message, yesCallback, notCallback) { $("#dialog_delete .modal-title").html(message); $("#dialog_delete").modal('show'); $("#btnYes").click(function (e) { e.preventDefault(); yesCallback(); $("#dialog_delete").modal('hide'); }); $("#btnNot").click(function (e) { e.preventDefault(); notCallback(); $("#dialog_delete").modal('hide'); }); } var form = document.getElementById('message_form'); var url = '/chat/create/'; $("#upload-document-team").bind('fileuploadsubmit', function (e, data) { data.formData = { sender: $("#team-chat-form #senderTeamId").val(), recipent: $("#team-chat-form #recipentTeamId").val(), order: $("#team-chat-form #orderTeamId").val(), team: $("#team-chat-form #teamId").val(), } console.log(data.formData); }); //Загрузка документов $('#upload-document-team').fileupload({ url: url, crossDomain: false, beforeSend: function (xhr, settings) { $('#progress .progress-bar').css( 'width', '0%' ); if (!csrfSafeMethod(settings.type)) { xhr.setRequestHeader("X-CSRFToken", csrftoken); } }, dataType: 'json', done: function (e, data) { $.each(data.result.files, function (index, file) { var currentValue = $("#documentSendIds").val(); currentValue += file.id + ';'; $("#documentSendIds").val(currentValue); var htmlImg = '
' + senderName + '
' + v.created + '' + v.text + '
' + senderName + '
' + v.created + '' + v.text + '
' + senderName + '
' + v.created + '' + v.text + '
Этап ' + v.pos + '' + v.name + '
' + 'Результаты этапа:' + v.result + '
Срок до ' + v.term + '
' + v.cost + ' ' + 'Cрок этапа рассчитывается с момента резервирования средств
' + '' + statusName + '
В работе ' + stage.name + '
Результат этапа : ' + stage.result + '
Срок сдачи ' + stage.term + ' ' + stage.cost + '
Этап ожидает завершения статуса от заказчика