Check if task title need to be updated.

This commit is contained in:
Martin Edenhofer 2016-03-24 10:29:17 +01:00
parent eceb1d3894
commit e3ea9a8ce2
2 changed files with 11 additions and 2 deletions

View file

@ -135,6 +135,13 @@ class App.TicketCreate extends App.Controller
@autosaveLast = data @autosaveLast = data
@log 'debug', 'form hash changed', diff, data @log 'debug', 'form hash changed', diff, data
App.TaskManager.update(@task_key, { 'state': data }) App.TaskManager.update(@task_key, { 'state': data })
# check it task title in task need to be updated
title = @$('[name=title]').val()
if @latestTitle isnt title
@latestTitle = title
@metaTaskUpdate()
@interval(update, 3000, @id) @interval(update, 3000, @id)
# get data / in case also ticket data for split # get data / in case also ticket data for split
@ -146,9 +153,9 @@ class App.TicketCreate extends App.Controller
# fetch split ticket data # fetch split ticket data
@ajax( @ajax(
id: 'ticket_split' + @task_key id: "ticket_split#{@task_key}"
type: 'GET' type: 'GET'
url: @apiPath + '/ticket_split' url: "#{@apiPath}/ticket_split"
data: data:
ticket_id: params.ticket_id ticket_id: params.ticket_id
article_id: params.article_id article_id: params.article_id

View file

@ -201,7 +201,9 @@ class _taskManagerSingleton extends App.Controller
$('.nav-tab.task').each( (_index, element) => $('.nav-tab.task').each( (_index, element) =>
localElement = $(element) localElement = $(element)
key = localElement.data('key') key = localElement.data('key')
return if !key
task = @get(key) task = @get(key)
return if !task
if task.active if task.active
localElement.addClass('is-active') localElement.addClass('is-active')
else else