Now use own templates (not from layout ref).
This commit is contained in:
parent
b654c4d34b
commit
02470aa78a
6 changed files with 36 additions and 6 deletions
|
@ -220,7 +220,7 @@ class chatWindow extends App.Controller
|
|||
)
|
||||
|
||||
render: ->
|
||||
@html App.view('layout_ref/customer_chat_window')
|
||||
@html App.view('customer_chat/chat_window')
|
||||
name: @options.name
|
||||
|
||||
@el.one 'transitionend', @onTransitionend
|
||||
|
@ -353,7 +353,7 @@ class chatWindow extends App.Controller
|
|||
|
||||
@lastAddedType = sender
|
||||
|
||||
@body.append App.view('layout_ref/customer_chat_message')
|
||||
@body.append App.view('customer_chat/chat_message')
|
||||
message: message
|
||||
sender: sender
|
||||
isNew: isNew
|
||||
|
@ -365,7 +365,7 @@ class chatWindow extends App.Controller
|
|||
if !@isTyping
|
||||
@isTyping = true
|
||||
@maybeAddTimestamp()
|
||||
@body.append App.view('layout_ref/customer_chat_loader')()
|
||||
@body.append App.view('customer_chat/chat_loader')()
|
||||
@scrollToBottom()
|
||||
|
||||
# clear old delay, set new
|
||||
|
@ -397,7 +397,7 @@ class chatWindow extends App.Controller
|
|||
@lastAddedType = 'timestamp'
|
||||
|
||||
addTimestamp: (label, time) =>
|
||||
@body.append App.view('layout_ref/customer_chat_timestamp')
|
||||
@body.append App.view('customer_chat/chat_timestamp')
|
||||
label: label
|
||||
time: time
|
||||
|
||||
|
@ -405,12 +405,12 @@ class chatWindow extends App.Controller
|
|||
@body
|
||||
.find('.js-timestamp')
|
||||
.last()
|
||||
.replaceWith App.view('layout_ref/customer_chat_timestamp')
|
||||
.replaceWith App.view('customer_chat/chat_timestamp')
|
||||
label: label
|
||||
time: time
|
||||
|
||||
addStatusMessage: (message) ->
|
||||
@body.append App.view('layout_ref/customer_chat_status_message')
|
||||
@body.append App.view('customer_chat/chat_status_message')
|
||||
message: message
|
||||
|
||||
@scrollToBottom()
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<div class="chat-message chat-message--customer chat-message--loader js-loader">
|
||||
<div class="chat-loader">
|
||||
<%- @Icon('loading') %>
|
||||
<%- @Icon('loading') %>
|
||||
<%- @Icon('loading') %>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1 @@
|
|||
<div class="chat-message chat-message--<%= @sender %><%= ' chat-message--new' if @isNew %>"><%- @message %></div>
|
|
@ -0,0 +1 @@
|
|||
<div class="chat-status-message"><%- @message %></div>
|
|
@ -0,0 +1 @@
|
|||
<div class="chat-timestamp js-timestamp"><span class="chat-timestamp-label"><%= @label %></span> <%= @time %></div>
|
|
@ -0,0 +1,20 @@
|
|||
<div class="chat-header">
|
||||
<div class="chat-status js-status" data-status="online">
|
||||
<div class="chat-status-holder">
|
||||
<%- @Icon('status') %>
|
||||
<%- @Icon('status-modified-outer-circle') %>
|
||||
<%- @Icon('status-modified-inner-circle') %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chat-name"><%- @name %></div>
|
||||
<div class="chat-close js-close">
|
||||
<%- @Icon('diagonal-cross') %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chat-body-holder js-scrollHolder">
|
||||
<div class="chat-body js-body"></div>
|
||||
</div>
|
||||
<div class="chat-controls">
|
||||
<div class="chat-input form-control form-control--small form-control--multiline js-customerChatInput" contenteditable="true"></div>
|
||||
<div class="btn btn--primary btn--slim btn--small js-send"><%= @T('Send') %></div>
|
||||
</div>
|
Loading…
Reference in a new issue