Reduced dom operations.
This commit is contained in:
parent
f17b69bc9e
commit
f0b37a4fa9
1 changed files with 18 additions and 10 deletions
|
@ -340,10 +340,9 @@ class App.TicketZoom extends App.Controller
|
||||||
el: elLocal.find('.ticket-article')
|
el: elLocal.find('.ticket-article')
|
||||||
ui: @
|
ui: @
|
||||||
highligher: @highligher
|
highligher: @highligher
|
||||||
|
ticket_article_ids: @ticket_article_ids
|
||||||
)
|
)
|
||||||
|
|
||||||
@html elLocal
|
|
||||||
|
|
||||||
# rerender whole sidebar if customer or organization has changed
|
# rerender whole sidebar if customer or organization has changed
|
||||||
if @ticketLastAttributes.customer_id isnt @ticket.customer_id || @ticketLastAttributes.organization_id isnt @ticket.organization_id
|
if @ticketLastAttributes.customer_id isnt @ticket.customer_id || @ticketLastAttributes.organization_id isnt @ticket.organization_id
|
||||||
new App.WidgetAvatar(
|
new App.WidgetAvatar(
|
||||||
|
@ -351,8 +350,12 @@ class App.TicketZoom extends App.Controller
|
||||||
user_id: @ticket.customer_id
|
user_id: @ticket.customer_id
|
||||||
size: 50
|
size: 50
|
||||||
)
|
)
|
||||||
|
if elLocal
|
||||||
|
el = elLocal
|
||||||
|
else
|
||||||
|
el = @el
|
||||||
@sidebar = new App.TicketZoomSidebar(
|
@sidebar = new App.TicketZoomSidebar(
|
||||||
el: @$('.tabsSidebar')
|
el: el.find('.tabsSidebar')
|
||||||
sidebarState: @sidebarState
|
sidebarState: @sidebarState
|
||||||
ticket: @ticket
|
ticket: @ticket
|
||||||
taskGet: @taskGet
|
taskGet: @taskGet
|
||||||
|
@ -362,7 +365,12 @@ class App.TicketZoom extends App.Controller
|
||||||
formMeta: @formMeta
|
formMeta: @formMeta
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# render init page
|
||||||
|
if elLocal
|
||||||
|
@html elLocal
|
||||||
|
|
||||||
# show article
|
# show article
|
||||||
|
else
|
||||||
@articleView.execute(
|
@articleView.execute(
|
||||||
ticket_article_ids: @ticket_article_ids
|
ticket_article_ids: @ticket_article_ids
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue