Removed debug and only scroll to article on initial open.

This commit is contained in:
Martin Edenhofer 2016-06-29 11:49:42 +02:00
parent 5dd9f4916d
commit bff5dbb370

View file

@ -431,14 +431,14 @@ class App.TicketZoom extends App.Controller
if @sidebar.linkWidget
@sidebar.linkWidget.reload(@links)
# scroll to article if given
if @article_id
scrollTo = =>
@scrollToArticle(@article_id)
@delay(scrollTo, 200)
if @shown
# scroll to article if given
if @article_id
scrollTo = =>
@scrollToArticle(@article_id)
@delay(scrollTo, 300)
# scroll to end if new article has been added
if !@last_ticket_article_ids || !_.isEqual(_.sortBy(@last_ticket_article_ids), _.sortBy(@ticket_article_ids))
@last_ticket_article_ids = @ticket_article_ids
@ -652,9 +652,6 @@ class App.TicketZoom extends App.Controller
@formEnable(e)
return
# submit ticket & article
@log 'notice', 'update ticket', ticket
# stop autosave
@autosaveStop()
@ -673,8 +670,6 @@ class App.TicketZoom extends App.Controller
@autosaveStart()
return
console.log('ticket validateion ok')
articleParams = @articleNew.params()
if articleParams && articleParams.body
article = new App.TicketArticle