Merge branch 'develop' of git.znuny.com:zammad/zammad into develop
This commit is contained in:
commit
ddcd5e0dd5
4 changed files with 32 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -45,6 +45,7 @@
|
||||||
/public/assets/*.*
|
/public/assets/*.*
|
||||||
/public/assets/app
|
/public/assets/app
|
||||||
/public/assets/custom
|
/public/assets/custom
|
||||||
|
/public/assets/chat/node_modules
|
||||||
/tmp/*
|
/tmp/*
|
||||||
/tmp/pids/*
|
/tmp/pids/*
|
||||||
|
|
||||||
|
|
|
@ -1,6 +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'
|
||||||
|
|
||||||
constructor: ->
|
constructor: ->
|
||||||
super
|
super
|
||||||
|
@ -167,6 +168,26 @@ class App.CTI extends App.Controller
|
||||||
data: JSON.stringify(done: done)
|
data: JSON.stringify(done: done)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
new_user: (e) ->
|
||||||
|
e.preventDefault()
|
||||||
|
phone = $(e.currentTarget).text()
|
||||||
|
new App.ControllerGenericNew(
|
||||||
|
pageData:
|
||||||
|
title: 'Users'
|
||||||
|
home: 'users'
|
||||||
|
object: 'User'
|
||||||
|
objects: 'Users'
|
||||||
|
navupdate: '#users'
|
||||||
|
genericObject: 'User'
|
||||||
|
item:
|
||||||
|
phone: phone
|
||||||
|
container: @el.closest('.content')
|
||||||
|
callback: @new_ticket
|
||||||
|
)
|
||||||
|
|
||||||
|
new_ticket: (customer) ->
|
||||||
|
@navigate "#ticket/create/customer/#{customer.id}"
|
||||||
|
|
||||||
show: (params) =>
|
show: (params) =>
|
||||||
@title 'CTI', true
|
@title 'CTI', true
|
||||||
@navupdate '#cti'
|
@navupdate '#cti'
|
||||||
|
|
|
@ -212,7 +212,14 @@ class App extends Spine.Controller
|
||||||
if result
|
if result
|
||||||
result = result + ', '
|
result = result + ', '
|
||||||
if item.name
|
if item.name
|
||||||
result = result + App.Utils.htmlEscape(item.name) + ' '
|
item.name = item.name
|
||||||
|
.replace(',', '')
|
||||||
|
.replace(';', '')
|
||||||
|
.replace('"', '')
|
||||||
|
.replace('\'', '')
|
||||||
|
if item.name.match(/\@|,|;|\^|\+|#|§|\$|%|&|\/|\(|\)|=|\?|\*/)
|
||||||
|
item.name = "\"#{item.name}\""
|
||||||
|
result = "#{result}#{App.Utils.htmlEscape(item.name)} "
|
||||||
if item.address
|
if item.address
|
||||||
result = result + " <span class=\"text-muted\"><#{App.Utils.htmlEscape(item.address)}></span>"
|
result = result + " <span class=\"text-muted\"><#{App.Utils.htmlEscape(item.address)}></span>"
|
||||||
result
|
result
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
<% if shown: %>
|
<% if shown: %>
|
||||||
<small><%= item.from %></small>
|
<small><%= item.from %></small>
|
||||||
<% else: %>
|
<% else: %>
|
||||||
<%= item.from %>
|
<a class="js-new-user" href="#"><%= item.from %></a>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
Loading…
Reference in a new issue