Removed debug and only scroll to article on initial open.
This commit is contained in:
parent
5dd9f4916d
commit
bff5dbb370
|
@ -431,14 +431,14 @@ class App.TicketZoom extends App.Controller
|
||||||
if @sidebar.linkWidget
|
if @sidebar.linkWidget
|
||||||
@sidebar.linkWidget.reload(@links)
|
@sidebar.linkWidget.reload(@links)
|
||||||
|
|
||||||
# scroll to article if given
|
|
||||||
if @article_id
|
|
||||||
scrollTo = =>
|
|
||||||
@scrollToArticle(@article_id)
|
|
||||||
@delay(scrollTo, 200)
|
|
||||||
|
|
||||||
if @shown
|
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
|
# scroll to end if new article has been added
|
||||||
if !@last_ticket_article_ids || !_.isEqual(_.sortBy(@last_ticket_article_ids), _.sortBy(@ticket_article_ids))
|
if !@last_ticket_article_ids || !_.isEqual(_.sortBy(@last_ticket_article_ids), _.sortBy(@ticket_article_ids))
|
||||||
@last_ticket_article_ids = @ticket_article_ids
|
@last_ticket_article_ids = @ticket_article_ids
|
||||||
|
@ -652,9 +652,6 @@ class App.TicketZoom extends App.Controller
|
||||||
@formEnable(e)
|
@formEnable(e)
|
||||||
return
|
return
|
||||||
|
|
||||||
# submit ticket & article
|
|
||||||
@log 'notice', 'update ticket', ticket
|
|
||||||
|
|
||||||
# stop autosave
|
# stop autosave
|
||||||
@autosaveStop()
|
@autosaveStop()
|
||||||
|
|
||||||
|
@ -673,8 +670,6 @@ class App.TicketZoom extends App.Controller
|
||||||
@autosaveStart()
|
@autosaveStart()
|
||||||
return
|
return
|
||||||
|
|
||||||
console.log('ticket validateion ok')
|
|
||||||
|
|
||||||
articleParams = @articleNew.params()
|
articleParams = @articleNew.params()
|
||||||
if articleParams && articleParams.body
|
if articleParams && articleParams.body
|
||||||
article = new App.TicketArticle
|
article = new App.TicketArticle
|
||||||
|
|
Loading…
Reference in a new issue