diff --git a/assets/css/extra.css b/assets/css/extra.css index c01a8ac..1e5a2b2 100644 --- a/assets/css/extra.css +++ b/assets/css/extra.css @@ -189,3 +189,54 @@ font-style: italic; } + +.trashedOrderBlock { + width: 100%; + float: left; + margin-bottom: -1px; + padding: 15px; + background-color: #F7F7F7; + border-top: 1px solid #72767C; + border-bottom: 1px solid #72767C; + position: relative; + cursor: pointer; + -webkit-transition: all 0.3s ease-out; + -moz-transition: all 0.3s ease-out; + transition: all 0.3s ease-out; +} + +.trashedOrderBlock:hover { + background-color: white; + border-top: 1px solid black; + border-bottom: 1px solid black; + -webkit-transform: scale(1.03); + -moz- transform: scale(1.03); + transform: scale(1.03); + box-shadow: 0 0 10px rgba(0,0,0,0.7); + z-index: 999; +} + + +.count-tab{ + margin-left: 10px; + width: 35px; + height: 35px; + border-radius: 100%; + line-height: 35px; + text-align: center; + font-size: 14px; + font-family: 'Arial-MT-Regular', sans-serif; + position: absolute; + top: 14px; + cursor: pointer; + -webkit-transition: all 0.3s ease-out; + -moz-transition: all 0.3s ease-out; + transition: all 0.3s ease-out; + background-color: #ebebeb; +} + +li a:active .count-tab, li a:hover .count-tab{ + background-color: #FF0027; + color: white; +} + diff --git a/assets/js/chat.js b/assets/js/chat.js index 3bb7d75..2f09eb5 100644 --- a/assets/js/chat.js +++ b/assets/js/chat.js @@ -64,7 +64,7 @@ var SocketHandler = function () { } else if (message.answer_type == 'approve_stages') { var resOrderId = message.order_id; $.jGrowl(message.msg, { - life: 4000 + life: 15000 }); setTimeout(function () { $("#orderBlock" + resOrderId).trigger('click'); @@ -185,51 +185,6 @@ function dialog (message, yesCallback, notCallback) { } - - $(".messageBlock").on('click','.trashedOrderBlock',function(){ - $("#chat-order-add").css("display", "none"); - $('.order-block, .trashedOrderBlock').each(function () { - $(this).removeClass('orAct'); - }); - $(this).addClass('orAct'); - var inbox = document.getElementById('message-chat-order-space'); - var docList = document.getElementById('documentOrderSpace'); - inbox.innerHTML = ''; - docList.innerHTML = ''; - var orderId = $(this).attr('data-id'); - location.hash = '#order' + orderId; - - $.ajax({ - url: '/api/message', - type: 'GET', - data: {csrfmiddlewaretoken: csrftoken, 'order': orderId, 'team__isnull': 'true'}, - dataType: 'json', - success: function (json) { - $.each(json.results, function (i, v) { - var senderName = 'Вы'; - var className = 'youChat'; - - if (v.sender.id !== userId) { - senderName = v.sender.username; - className = ''; - } - - inbox.innerHTML += '
' + senderName + '
' + v.created + '' + v.text + '
Этап
'; + ''; lastFormStage.after(addFormTemplate); } @@ -408,7 +409,7 @@ $(function () { } }); - + // Нажимаем на кнопку архивные сообщения $("#trashed-button").on('click',function(e){ e.preventDefault(); var state = $(this).attr('data-show'); @@ -452,6 +453,50 @@ $(function () { }); + // Нажимаем на заказ в архмвных заказах + $(".messageBlock").on('click','.trashedOrderBlock',function(){ + $("#chat-order-add").css("display", "none"); + $('.order-block, .trashedOrderBlock').each(function () { + $(this).removeClass('orAct'); + }); + $(this).addClass('orAct'); + var inbox = document.getElementById('message-chat-order-space'); + var docList = document.getElementById('documentOrderSpace'); + inbox.innerHTML = ''; + docList.innerHTML = ''; + var orderId = $(this).attr('data-id'); + location.hash = '#order' + orderId; + + $.ajax({ + url: '/api/message', + type: 'GET', + data: {csrfmiddlewaretoken: csrftoken, 'order': orderId, 'team__isnull': 'true'}, + dataType: 'json', + success: function (json) { + $.each(json.results, function (i, v) { + var senderName = 'Вы'; + var className = 'youChat'; + + if (v.sender.id !== userId) { + senderName = v.sender.username; + className = ''; + } + + inbox.innerHTML += '' + senderName + '
' + v.created + '' + v.text + '