Fixed keep body on reply again.
This commit is contained in:
parent
02548e8051
commit
98db7a1899
3 changed files with 78 additions and 15 deletions
|
@ -190,7 +190,7 @@ class App.TicketZoomArticleActions extends App.Controller
|
||||||
articleNew.cc = addAddresses(articleNew.cc, article.cc)
|
articleNew.cc = addAddresses(articleNew.cc, article.cc)
|
||||||
|
|
||||||
# get current body
|
# get current body
|
||||||
body = @el.closest('[data-name="body"]').html() || ''
|
body = @el.closest('.ticketZoom').find('.article-add [data-name="body"]').html() || ''
|
||||||
|
|
||||||
# check if quote need to be added
|
# check if quote need to be added
|
||||||
selectedText = App.ClipBoard.getSelected()
|
selectedText = App.ClipBoard.getSelected()
|
||||||
|
|
|
@ -95,28 +95,28 @@ class App.TicketZoomArticleNew extends App.Controller
|
||||||
@bind(
|
@bind(
|
||||||
'ui::ticket::setArticleType'
|
'ui::ticket::setArticleType'
|
||||||
(data) =>
|
(data) =>
|
||||||
if data.ticket.id is @ticket.id
|
return if data.ticket.id isnt @ticket.id
|
||||||
#@setArticleType(data.type.name)
|
#@setArticleType(data.type.name)
|
||||||
|
|
||||||
@openTextarea(null, true)
|
@openTextarea(null, true)
|
||||||
for key, value of data.article
|
for key, value of data.article
|
||||||
if key is 'body'
|
if key is 'body'
|
||||||
@$('[data-name="' + key + '"]').html(value)
|
@$('[data-name="' + key + '"]').html(value)
|
||||||
else
|
else
|
||||||
@$('[name="' + key + '"]').val(value)
|
@$('[name="' + key + '"]').val(value)
|
||||||
|
|
||||||
# preselect article type
|
# preselect article type
|
||||||
@setArticleType( 'email' )
|
@setArticleType('email')
|
||||||
)
|
)
|
||||||
|
|
||||||
# reset new article screen
|
# reset new article screen
|
||||||
@bind(
|
@bind(
|
||||||
'ui::ticket::taskReset'
|
'ui::ticket::taskReset'
|
||||||
(data) =>
|
(data) =>
|
||||||
if data.ticket_id is @ticket.id
|
return if data.ticket_id isnt @ticket.id
|
||||||
@type = 'note'
|
@type = 'note'
|
||||||
@defaults = {}
|
@defaults = {}
|
||||||
@render()
|
@render()
|
||||||
)
|
)
|
||||||
|
|
||||||
isIE10: ->
|
isIE10: ->
|
||||||
|
|
63
test/browser/agent_ticket_actions_level7_test.rb
Normal file
63
test/browser/agent_ticket_actions_level7_test.rb
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
# encoding: utf-8
|
||||||
|
require 'browser_test_helper'
|
||||||
|
|
||||||
|
class AgentTicketActionLevel7Test < TestCase
|
||||||
|
def test_reply_message_keep_body
|
||||||
|
|
||||||
|
# merge ticket with closed tab
|
||||||
|
@browser = browser_instance
|
||||||
|
login(
|
||||||
|
username: 'agent1@example.com',
|
||||||
|
password: 'test',
|
||||||
|
url: browser_url,
|
||||||
|
)
|
||||||
|
tasks_close_all()
|
||||||
|
|
||||||
|
# create new ticket
|
||||||
|
ticket1 = ticket_create(
|
||||||
|
data: {
|
||||||
|
customer: 'nico',
|
||||||
|
group: 'Users',
|
||||||
|
title: 'some subject 123äöü - reply test',
|
||||||
|
body: 'some body 123äöü - reply test',
|
||||||
|
},
|
||||||
|
)
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
# fill body
|
||||||
|
ticket_update(
|
||||||
|
data: {
|
||||||
|
body: 'keep me',
|
||||||
|
},
|
||||||
|
do_not_submit: true,
|
||||||
|
)
|
||||||
|
|
||||||
|
# click reply
|
||||||
|
click( css: '.content.active [data-type="reply"]' )
|
||||||
|
|
||||||
|
# check body
|
||||||
|
watch_for(
|
||||||
|
css: '.content.active .js-reset',
|
||||||
|
value: '(Discard your unsaved changes.|Verwerfen der)',
|
||||||
|
no_quote: true,
|
||||||
|
)
|
||||||
|
|
||||||
|
# check body
|
||||||
|
ticket_verify(
|
||||||
|
data: {
|
||||||
|
body: 'keep me',
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
# click reply
|
||||||
|
click( css: '.content.active [data-type="reply"]' )
|
||||||
|
|
||||||
|
# check body
|
||||||
|
watch_for(
|
||||||
|
css: '.content.active .js-reset',
|
||||||
|
value: '(Discard your unsaved changes.|Verwerfen der)',
|
||||||
|
no_quote: true,
|
||||||
|
)
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue