Improved styling performance for IE.

This commit is contained in:
Martin Edenhofer 2015-09-14 20:18:21 +02:00
parent 1062907dca
commit cf20e4f4a5
2 changed files with 28 additions and 14 deletions

View file

@ -98,23 +98,31 @@ class App.TicketZoom extends App.Controller
if @activeState
@scrollToBottom()
return
@activeState = true
# start autosave
@autosaveStart()
App.Event.trigger('ui::ticket::shown', { ticket_id: @ticket_id } )
# inital load of highlights
if @highligher && !@highlighed
@highlighed = true
@highligher.loadHighlights()
@positionPageHeaderStart()
if !@shown
# trigger shown to article
App.Event.trigger('ui::ticket::shown', { ticket_id: @ticket_id } )
# observe content header position
@positionPageHeaderStart()
hide: =>
@activeState = false
# stop observing content header position
@positionPageHeaderStop()
# stop autosave
@autosaveStop()
changed: =>
@ -352,15 +360,18 @@ class App.TicketZoom extends App.Controller
@scrollTo( 0, offset )
@delay( scrollTo, 100, false )
@scrollToBottom()
@positionPageHeaderStart()
@ticketLastAttributes = @ticket.attributes()
# trigger shown
if @activeState
App.Event.trigger('ui::ticket::shown', { ticket_id: @ticket.id } )
if @shown
# scroll to end of page
@scrollToBottom()
# observe content header position
@positionPageHeaderStart()
# trigger shown if init shown render
App.Event.trigger('ui::ticket::shown', { ticket_id: @ticket_id } )
scrollToBottom: =>
@main.scrollTop( @main.prop('scrollHeight') )
@ -636,6 +647,7 @@ class TicketZoomRouter extends App.ControllerPermanent
ticket_id: params.ticket_id
article_id: params.article_id
nav: params.nav
shown: true
App.TaskManager.execute(
key: 'Ticket-' + @ticket_id

View file

@ -38,12 +38,14 @@ class ArticleViewItem extends App.Controller
@render()
# set article type and expand text area
# set expand of text area only once
@bind(
'ui::ticket::shown'
(data) =>
if data.ticket_id.toString() is @ticket.id.toString()
@setSeeMore()
if !@shown
if data.ticket_id.toString() is @ticket.id.toString()
@setSeeMore()
@shown = true
)
# subscribe to changes