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
|
class App.CTI extends App.Controller
|
||||||
events:
|
events:
|
||||||
'click .js-check': 'done',
|
'click .js-check': 'done',
|
||||||
'click .js-new-user': 'new_user'
|
'click .js-userNew': 'userNew'
|
||||||
|
|
||||||
constructor: ->
|
constructor: ->
|
||||||
super
|
super
|
||||||
|
@ -168,7 +168,7 @@ class App.CTI extends App.Controller
|
||||||
data: JSON.stringify(done: done)
|
data: JSON.stringify(done: done)
|
||||||
)
|
)
|
||||||
|
|
||||||
new_user: (e) ->
|
userNew: (e) ->
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
phone = $(e.currentTarget).text()
|
phone = $(e.currentTarget).text()
|
||||||
new App.ControllerGenericNew(
|
new App.ControllerGenericNew(
|
||||||
|
@ -182,10 +182,10 @@ class App.CTI extends App.Controller
|
||||||
item:
|
item:
|
||||||
phone: phone
|
phone: phone
|
||||||
container: @el.closest('.content')
|
container: @el.closest('.content')
|
||||||
callback: @new_ticket
|
callback: @ticketNew
|
||||||
)
|
)
|
||||||
|
|
||||||
new_ticket: (customer) ->
|
ticketNew: (customer) ->
|
||||||
@navigate "#ticket/create/customer/#{customer.id}"
|
@navigate "#ticket/create/customer/#{customer.id}"
|
||||||
|
|
||||||
show: (params) =>
|
show: (params) =>
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
<% if shown: %>
|
<% if shown: %>
|
||||||
<small><%= item.from %></small>
|
<small><%= item.from %></small>
|
||||||
<% else: %>
|
<% else: %>
|
||||||
<a class="js-new-user" href="#"><%= item.from %></a>
|
<span class="js-userNew u-clickable" href="#"><%= item.from %></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<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
|
=end
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
Loading…
Reference in a new issue