diff --git a/.gitignore b/.gitignore index b7f1121..5ac6b08 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ env/ ar/ archilance/settings/local.py media/ +chat/settings.py todo/ diff --git a/assets/js/chat.js b/assets/js/chat.js index 1a91812..b7fca99 100644 --- a/assets/js/chat.js +++ b/assets/js/chat.js @@ -19,10 +19,10 @@ var SocketHandler = function () { inbox = document.getElementById('message-chat-order-space'); } else if (message.answer_type == 'add_message_team') { inbox = document.getElementById('message-chat-team-space'); - }else if (message.answer_type == 'approve_stages') { + } else if (message.answer_type == 'approve_stages') { alert('approve stages'); } - if(inbox) { + if (inbox) { inbox.innerHTML += '
ВЫ
Сейчас' + message.msg + '
Этап ' + v.pos + '' + v.name + '
' + diff --git a/chat/templates/chat_customer.html b/chat/templates/chat_customer.html index 6b3ad27..12c4df7 100644 --- a/chat/templates/chat_customer.html +++ b/chat/templates/chat_customer.html @@ -48,7 +48,7 @@ class="conMess">Контакты 0 - + Удалить контакт3 / Выполнение работы
@@ -290,6 +267,20 @@ var form = document.getElementById('message_form'); var csrftoken = getCookie('csrftoken'); + $("#reserve-button").on("click",function(e) { + e.preventDefault(); + var orderId = $(this).attr('data-order-id'); + $.ajax({ + url: '/api/stages/', + type: 'GET', + data: {csrfmiddlewaretoken: csrftoken, 'order': orderId}, + dataType: 'json', + success: function (json) { + console.log(json.results); + } + }); + }); + function getStages(orderId, senderId, recipentId) { $.ajax({ @@ -318,6 +309,7 @@ '' + '' + '' + + '' + 'Этап ' + v.pos + '' + v.name + '
' + 'Результаты этапа:' + v.result + '
до 16.03.2015
' + v.cost + 'до Дата
' + v.cost + ''; } }); @@ -430,15 +422,17 @@ if (countStage > currentCountStage){ for(var jj=currentCountStage; jj