Activate task controller of init call.

This commit is contained in:
Martin Edenhofer 2013-04-23 21:00:31 +02:00
parent 062fe08215
commit 3feff9e70b
3 changed files with 12 additions and 4 deletions

View file

@ -12,7 +12,6 @@ class App.TicketCreate extends App.Controller
return if !@authenticate() return if !@authenticate()
# set title # set title
@title 'New Ticket'
@form_id = App.ControllerForm.formId() @form_id = App.ControllerForm.formId()
@edit_form = undefined @edit_form = undefined
@ -62,7 +61,7 @@ class App.TicketCreate extends App.Controller
activate: => activate: =>
@navupdate '#' @navupdate '#'
# @title 'Ticket Create ' + @ticket.number @title @article_attributes['title']
release: => release: =>
# @clearInterval( @key, 'ticket_zoom' ) # @clearInterval( @key, 'ticket_zoom' )

View file

@ -1,5 +1,3 @@
$ = jQuery.sub()
class App.UserInfo extends App.Controller class App.UserInfo extends App.Controller
events: events:
'focusout [data-type=update]': 'update', 'focusout [data-type=update]': 'update',

View file

@ -83,10 +83,14 @@ class _Singleton extends App.Controller
else else
$('#content_permanent_' + @task_count ).removeClass('active') $('#content_permanent_' + @task_count ).removeClass('active')
$('#content_permanent_' + @task_count ).hide() $('#content_permanent_' + @task_count ).hide()
# create new controller instanz
params_app = _.clone(params) params_app = _.clone(params)
params_app['el'] = $('#content_permanent_' + @task_count ) params_app['el'] = $('#content_permanent_' + @task_count )
params_app['task_key'] = @task_count params_app['task_key'] = @task_count
a = new App[callback]( params_app ) a = new App[callback]( params_app )
# remember new controller / prepare for task storage
task = task =
type: type type: type
type_id: type_id type_id: type_id
@ -95,7 +99,14 @@ class _Singleton extends App.Controller
worker: a worker: a
active: active active: active
@tasks[@task_count] = task @tasks[@task_count] = task
# activate controller
if !to_not_show
a.activate()
App.Event.trigger 'ui:rerender' App.Event.trigger 'ui:rerender'
# add new controller to task storage
if !to_not_show if !to_not_show
@syncAdd(task) @syncAdd(task)