Reduced dom operations at loading time.
This commit is contained in:
parent
1439588581
commit
b102e75aaa
3 changed files with 44 additions and 39 deletions
|
@ -45,20 +45,22 @@ class App.OrganizationProfile extends App.Controller
|
|||
@doNotLog = 1
|
||||
@recentView('Organization', @organization_id)
|
||||
|
||||
@html App.view('organization_profile/index')(
|
||||
elLocal = $(App.view('organization_profile/index')(
|
||||
organization: organization
|
||||
)
|
||||
))
|
||||
|
||||
new Object(
|
||||
el: @$('.js-object-container')
|
||||
el: elLocal.find('.js-object-container')
|
||||
organization: organization
|
||||
)
|
||||
|
||||
new App.TicketStats(
|
||||
el: @$('.js-ticket-stats')
|
||||
el: elLocal.find('.js-ticket-stats')
|
||||
organization: organization
|
||||
)
|
||||
|
||||
@html elLocal
|
||||
|
||||
new App.UpdateTastbar(
|
||||
genericObject: organization
|
||||
)
|
||||
|
|
|
@ -6,21 +6,23 @@ class App.TicketOverview extends App.Controller
|
|||
@render()
|
||||
|
||||
render: ->
|
||||
@html App.view('ticket_overview')()
|
||||
elLocal = $(App.view('ticket_overview')())
|
||||
|
||||
@navBarControllerVertical = new Navbar
|
||||
el: @$('.overview-header')
|
||||
el: elLocal.find('.overview-header')
|
||||
view: @view
|
||||
vertical: true
|
||||
|
||||
@navBarController = new Navbar
|
||||
el: @$('.sidebar')
|
||||
el: elLocal.first()
|
||||
view: @view
|
||||
|
||||
@contentController = new Table
|
||||
el: @$('.overview-table')
|
||||
el: elLocal.find('.overview-table')
|
||||
view: @view
|
||||
|
||||
@html elLocal
|
||||
|
||||
active: (state) =>
|
||||
@activeState = state
|
||||
|
||||
|
|
|
@ -47,20 +47,22 @@ class App.UserProfile extends App.Controller
|
|||
@doNotLog = 1
|
||||
@recentView('User', @user_id)
|
||||
|
||||
@html App.view('user_profile/index')(
|
||||
elLocal = $(App.view('user_profile/index')(
|
||||
user: user
|
||||
)
|
||||
))
|
||||
|
||||
new Object(
|
||||
el: @$('.js-object-container')
|
||||
el: elLocal.find('.js-object-container')
|
||||
user: user
|
||||
)
|
||||
|
||||
new App.TicketStats(
|
||||
el: @$('.js-ticket-stats')
|
||||
el: elLocal.find('.js-ticket-stats')
|
||||
user: user
|
||||
)
|
||||
|
||||
@html elLocal
|
||||
|
||||
new App.UpdateTastbar(
|
||||
genericObject: user
|
||||
)
|
||||
|
@ -174,5 +176,4 @@ class Router extends App.ControllerPermanent
|
|||
show: true
|
||||
)
|
||||
|
||||
|
||||
App.Config.set('user/profile/:user_id', Router, 'Routes')
|
||||
|
|
Loading…
Reference in a new issue