LayoutRouter Class
_controllers\LayoutRouter.js:1
Application router and layout router responsible for kick starting the application as well as management for sizing events
Constructor
LayoutRouter
()
Object
Returns:
instantiated AppRouter
Methods
_initCampaignWizardPage
()
Use the previously created CampaignSliderStackView to add new views for campaign wizard slider animation which include CampaignSelector, Screen Orientation, Screen Resolution and Campaign
_initContentPage
()
Use the previously created m_appContentFaderView to add list of views including campaign, stations, logout etc so navigation can be switched between each content div. Also we create one special view called CampaignSliderStackView that it itself is a StackView.Slider that will later allow for Campaign wizard slider animated selections.
_initCustomer
()
Setup customer account
_initLoginPage
()
Create two StackView views: AppEntryFaderView and AppContentFaderView AppEntryFaderView allows for page selection between login page and main app content page AppContentFaderView serves as dual purpose view. On one hand it serves as simple show/hide div for main login page / content page, on the other hand it itself is a StackView.Fader that allows for show/hide between main content sections including campaigns, stations, resources, settings etc
_initModal
()
Create a popup modal view that's used for About Us and properties content on small screens
_initProperties
()
Create properties panel view
_listenLogoHover
()
Listen logo mouse hover
_listenSizeChanges
()
Listen to application size changes and lazy update when so
_updateLayout
()
Update key element height changes on size change and notify event subscribers
app
()
On successful authentication load main application StackViews per this route App
authenticate
-
i_user
-
i_pass
Initiate user credential route authentication
Parameters:
-
i_user
String -
i_pass
String
authenticating
()
No authentication passed, load Login page route
authenticating
()
Authentication passed, load app page route
authenticating
()
In process of route authentication
authenticationFailed
()
Failed user authentication route
disableBack
()
Disable browser back button
initialize
()
Constructor
routes
()
Router definition to function maps
Update
()
Update the general dashboard with stats
Events
APP_SIZED
final
static
Event fired when app resized