Merge branch 'develop' of git.znuny.com:zammad/zammad into develop

This commit is contained in:
André Bauer 2017-01-10 00:17:19 +01:00
commit ddcd5e0dd5
4 changed files with 32 additions and 3 deletions

1
.gitignore vendored
View file

@ -45,6 +45,7 @@
/public/assets/*.*
/public/assets/app
/public/assets/custom
/public/assets/chat/node_modules
/tmp/*
/tmp/pids/*

View file

@ -1,6 +1,7 @@
class App.CTI extends App.Controller
events:
'click .js-check': 'done'
'click .js-check': 'done',
'click .js-new-user': 'new_user'
constructor: ->
super
@ -167,6 +168,26 @@ class App.CTI extends App.Controller
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) =>
@title 'CTI', true
@navupdate '#cti'

View file

@ -212,7 +212,14 @@ class App extends Spine.Controller
if result
result = result + ', '
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
result = result + " <span class=\"text-muted\">&lt;#{App.Utils.htmlEscape(item.address)}&gt</span>"
result

View file

@ -46,7 +46,7 @@
<% if shown: %>
<small><%= item.from %></small>
<% else: %>
<%= item.from %>
<a class="js-new-user" href="#"><%= item.from %></a>
<% end %>
</td>
<td>