Small code cleanup.
This commit is contained in:
parent
b1e7c30178
commit
1481842b0b
3 changed files with 17 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
|||
class App.CTI extends App.Controller
|
||||
events:
|
||||
'click .js-check': 'done',
|
||||
'click .js-new-user': 'new_user'
|
||||
'click .js-userNew': 'userNew'
|
||||
|
||||
constructor: ->
|
||||
super
|
||||
|
@ -168,7 +168,7 @@ class App.CTI extends App.Controller
|
|||
data: JSON.stringify(done: done)
|
||||
)
|
||||
|
||||
new_user: (e) ->
|
||||
userNew: (e) ->
|
||||
e.preventDefault()
|
||||
phone = $(e.currentTarget).text()
|
||||
new App.ControllerGenericNew(
|
||||
|
@ -182,10 +182,10 @@ class App.CTI extends App.Controller
|
|||
item:
|
||||
phone: phone
|
||||
container: @el.closest('.content')
|
||||
callback: @new_ticket
|
||||
callback: @ticketNew
|
||||
)
|
||||
|
||||
new_ticket: (customer) ->
|
||||
ticketNew: (customer) ->
|
||||
@navigate "#ticket/create/customer/#{customer.id}"
|
||||
|
||||
show: (params) =>
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
<% if shown: %>
|
||||
<small><%= item.from %></small>
|
||||
<% else: %>
|
||||
<a class="js-new-user" href="#"><%= item.from %></a>
|
||||
<span class="js-userNew u-clickable" href="#"><%= item.from %></span>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
@ -215,6 +215,18 @@ example data, can be used for demo
|
|||
}
|
||||
)
|
||||
|
||||
Cti::Log.create(
|
||||
direction: 'in',
|
||||
from: '4930609854180',
|
||||
to: '4930609811112',
|
||||
call_id: '00008',
|
||||
comment: '',
|
||||
state: 'hangup',
|
||||
start: Time.zone.now - 20.seconds,
|
||||
'end': Time.zone.now,
|
||||
preferences: {}
|
||||
)
|
||||
|
||||
=end
|
||||
|
||||
=begin
|
||||
|
|
Loading…
Reference in a new issue