diff --git a/app/assets/javascripts/app/controllers/cti.coffee b/app/assets/javascripts/app/controllers/cti.coffee index 9914a4482..329b0066d 100644 --- a/app/assets/javascripts/app/controllers/cti.coffee +++ b/app/assets/javascripts/app/controllers/cti.coffee @@ -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) => diff --git a/app/assets/javascripts/app/views/cti/index.jst.eco b/app/assets/javascripts/app/views/cti/index.jst.eco index 99c4d0121..bd557d94a 100644 --- a/app/assets/javascripts/app/views/cti/index.jst.eco +++ b/app/assets/javascripts/app/views/cti/index.jst.eco @@ -46,7 +46,7 @@ <% if shown: %> <%= item.from %> <% else: %> - <%= item.from %> + <%= item.from %> <% end %> diff --git a/app/models/cti/log.rb b/app/models/cti/log.rb index 37866c3df..c5cdc7519 100644 --- a/app/models/cti/log.rb +++ b/app/models/cti/log.rb @@ -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