Mute task on click in .main.

This commit is contained in:
Martin Edenhofer 2016-02-22 11:59:08 +01:00
parent 1ce6bd18e1
commit 50971e4425
3 changed files with 34 additions and 3 deletions

View file

@ -8,6 +8,7 @@ class App.TicketZoom extends App.Controller
'click .js-submit': 'submit' 'click .js-submit': 'submit'
'click .js-bookmark': 'bookmark' 'click .js-bookmark': 'bookmark'
'click .js-reset': 'reset' 'click .js-reset': 'reset'
'click .main': 'muteTask'
constructor: (params) -> constructor: (params) ->
super super
@ -213,6 +214,9 @@ class App.TicketZoom extends App.Controller
) )
muteTask: =>
App.TaskManager.mute(@task_key)
load: (data, force) => load: (data, force) =>
# remember article ids # remember article ids
@ -637,9 +641,7 @@ class App.TicketZoom extends App.Controller
return return
@autosaveStart() @autosaveStart()
@muteTask()
App.TaskManager.mute(@task_key)
@fetch(ticket.id, true) @fetch(ticket.id, true)
# enable form # enable form

View file

@ -322,6 +322,7 @@ class _taskManagerSingleton extends App.Controller
task = @get(key) task = @get(key)
if !task if !task
throw "No such task with '#{key}' to mute" throw "No such task with '#{key}' to mute"
return if !task.notify
task.notify = false task.notify = false
@taskUpdate(task) @taskUpdate(task)

View file

@ -244,5 +244,33 @@ class AgentTicketActionsLevel2Test < TestCase
body: 'some level 2 <b>body</b> in instance 2', body: 'some level 2 <b>body</b> in instance 2',
}, },
) )
# modify ticket again and erase modified via mouse click on .active.content
ticket_update(
browser: browser1,
data: {
body: 'some update 4711',
},
)
sleep 4
verify_task(
browser: browser2,
data: {
title: 'TTTsome level 2 <b>subject<\/b> 123äöü',
modified: true,
}
)
click(
browser: browser2,
css: '.active.content',
)
sleep 4
verify_task(
browser: browser2,
data: {
title: 'TTTsome level 2 <b>subject<\/b> 123äöü',
modified: false,
}
)
end end
end end