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
|
@doNotLog = 1
|
||||||
@recentView('Organization', @organization_id)
|
@recentView('Organization', @organization_id)
|
||||||
|
|
||||||
@html App.view('organization_profile/index')(
|
elLocal = $(App.view('organization_profile/index')(
|
||||||
organization: organization
|
organization: organization
|
||||||
)
|
))
|
||||||
|
|
||||||
new Object(
|
new Object(
|
||||||
el: @$('.js-object-container')
|
el: elLocal.find('.js-object-container')
|
||||||
organization: organization
|
organization: organization
|
||||||
)
|
)
|
||||||
|
|
||||||
new App.TicketStats(
|
new App.TicketStats(
|
||||||
el: @$('.js-ticket-stats')
|
el: elLocal.find('.js-ticket-stats')
|
||||||
organization: organization
|
organization: organization
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@html elLocal
|
||||||
|
|
||||||
new App.UpdateTastbar(
|
new App.UpdateTastbar(
|
||||||
genericObject: organization
|
genericObject: organization
|
||||||
)
|
)
|
||||||
|
|
|
@ -6,21 +6,23 @@ class App.TicketOverview extends App.Controller
|
||||||
@render()
|
@render()
|
||||||
|
|
||||||
render: ->
|
render: ->
|
||||||
@html App.view('ticket_overview')()
|
elLocal = $(App.view('ticket_overview')())
|
||||||
|
|
||||||
@navBarControllerVertical = new Navbar
|
@navBarControllerVertical = new Navbar
|
||||||
el: @$('.overview-header')
|
el: elLocal.find('.overview-header')
|
||||||
view: @view
|
view: @view
|
||||||
vertical: true
|
vertical: true
|
||||||
|
|
||||||
@navBarController = new Navbar
|
@navBarController = new Navbar
|
||||||
el: @$('.sidebar')
|
el: elLocal.first()
|
||||||
view: @view
|
view: @view
|
||||||
|
|
||||||
@contentController = new Table
|
@contentController = new Table
|
||||||
el: @$('.overview-table')
|
el: elLocal.find('.overview-table')
|
||||||
view: @view
|
view: @view
|
||||||
|
|
||||||
|
@html elLocal
|
||||||
|
|
||||||
active: (state) =>
|
active: (state) =>
|
||||||
@activeState = state
|
@activeState = state
|
||||||
|
|
||||||
|
|
|
@ -47,20 +47,22 @@ class App.UserProfile extends App.Controller
|
||||||
@doNotLog = 1
|
@doNotLog = 1
|
||||||
@recentView('User', @user_id)
|
@recentView('User', @user_id)
|
||||||
|
|
||||||
@html App.view('user_profile/index')(
|
elLocal = $(App.view('user_profile/index')(
|
||||||
user: user
|
user: user
|
||||||
)
|
))
|
||||||
|
|
||||||
new Object(
|
new Object(
|
||||||
el: @$('.js-object-container')
|
el: elLocal.find('.js-object-container')
|
||||||
user: user
|
user: user
|
||||||
)
|
)
|
||||||
|
|
||||||
new App.TicketStats(
|
new App.TicketStats(
|
||||||
el: @$('.js-ticket-stats')
|
el: elLocal.find('.js-ticket-stats')
|
||||||
user: user
|
user: user
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@html elLocal
|
||||||
|
|
||||||
new App.UpdateTastbar(
|
new App.UpdateTastbar(
|
||||||
genericObject: user
|
genericObject: user
|
||||||
)
|
)
|
||||||
|
@ -174,5 +176,4 @@ class Router extends App.ControllerPermanent
|
||||||
show: true
|
show: true
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
App.Config.set('user/profile/:user_id', Router, 'Routes')
|
App.Config.set('user/profile/:user_id', Router, 'Routes')
|
||||||
|
|
Loading…
Reference in a new issue