ticket zoom: auto-scroll to bottom when rendering
This commit is contained in:
parent
540aeed8ad
commit
4a123b7a75
1 changed files with 8 additions and 0 deletions
|
@ -1,4 +1,7 @@
|
||||||
class App.TicketZoom extends App.Controller
|
class App.TicketZoom extends App.Controller
|
||||||
|
elements:
|
||||||
|
'.main': 'main'
|
||||||
|
|
||||||
events:
|
events:
|
||||||
'click .js-submit': 'submit'
|
'click .js-submit': 'submit'
|
||||||
|
|
||||||
|
@ -385,6 +388,11 @@ class App.TicketZoom extends App.Controller
|
||||||
|
|
||||||
@bindScrollPageHeader()
|
@bindScrollPageHeader()
|
||||||
|
|
||||||
|
@scrollToBottom()
|
||||||
|
|
||||||
|
scrollToBottom: ->
|
||||||
|
@main.scrollTop( @main.prop('scrollHeight') )
|
||||||
|
|
||||||
bindScrollPageHeader: ->
|
bindScrollPageHeader: ->
|
||||||
pageHeader = @$('.page-header')
|
pageHeader = @$('.page-header')
|
||||||
scrollHolder = pageHeader.scrollParent()
|
scrollHolder = pageHeader.scrollParent()
|
||||||
|
|
Loading…
Reference in a new issue