-
Notifications
You must be signed in to change notification settings - Fork 4
Core
renaming pending
OGX.MobileCore as its name indicates, is the core of the mobile application. It can hold multi stages, add/remove windows into stages, add/remove views into stages and windows as well as some other base functions.
let config = {
scopes:_ARRAY_ //List of current permissions the user has - Defaults to ['public']
};
let app = new OGX.MobileCore(config);
Add a stage to the app
app.addStage(_STAGE_NAME_, _STAGE_OBJECT, _CONFIG_);
Remove that stage from the app
app.removeStage(_STAGE_NAME_);
Use another stage (to add/remove views for instance)
app.useStage(_STAGE_NAME_);
Snooze a stage (all views, windows of this stage)
app.snoozeStage(_STAGE_NAME_);
Wake a stage (all views, windows of this stage)
app.wakeStage(_STAGE_NAME_);
Show a stage (and hide the current one if any)
app.showStage(_STAGE_NAME_, _ANIMATION_);
Add a view to the stage in use
app.addToStage(_SELECTOR_, _VIEW_, _VIEW_CONFIG_);
Remove a view from the stage in use app.removeFromStage(SELECTOR);
Add a window to the current stage
app.addWindow(_WINDOW_NAME_, _CONFIG_, _ANIMATION_, _ZINDEX_);
Get a window of the current stage
app.getWindow(_WINDOW_NAME_);
Check if a window exists in the current stage
app.windowExists(_WINDOW_NAME_);
Show a window in the current stage
app.showWindow(_WINDOW_NAME_, _ANIMATION_, _ANIMATION_PARAMS_);
Hide it
app.hideWindow(_WINDOW_NAME_, _CALLBACK_, _ANIMATION_, _ANIMATION_PARAMS_);
Snooze it (and all its views)
app.snoozeWindow(_WINDOW_NAME_);
Wake a window and its views
app.wakeWindow(_WINDOW_NAME_);
Blur a window (fires the blur method of a view)
app.blurWindow(_WINDOW_NAME_);
Focus a window (fires the focus method of a view)
app.focusWindow(_WINDOW_NAME_);
remove a window
app.removeWindow(_WINDOW_NAME_);
Add a view to a window
app.addToWindow(_WINDOW_NAME_, _VIEW_, _VIEW_CONFIG_, _SELECTOR_);
Remove a view from a window
app.removeFromWindow(_WINDOW_NAME_, _SELECTOR_);
Get the default view for a window if the window uses the default template (no html passed)
app.getWindowView(_WINDOW_NAME_, _SELECTOR_);
By default, a window has a view element. If SELECTOR is not specified, app will use the default view element to display the view. But you can also create a custom window that holds 2 views (or more - #view1 and #view2 DIVs) and assign a view to each of these elements.
For more information, see Windows
OGX.MobileCore has popups and overlays embedded in its core. A popup is a centered and detached view that can or cannot be placed over an overlay. Overlays can also be used under windows, to create for instance, a sliding menu.
app.addPopup(_WIDTH_, _HEIGHT_, _VIEW_, _VIEW_CONFIG_, _ANIMATION_, _LISTEN_OVERLAY_);
app.removePopup(_ANIMATION_);
For more information about popups, see Popups
To easily add an overlay to the display, do
app.addOverlay(_CLOSE_ON_CLICK, _ANIMATION_);
This way, it is possible to have different behaviors when it comes to popups and windows. For more information about overlays, see Overlays
- Welcome
- Changelog
- Structure
- Configuration
- Getting started
- CLI
- Poly
- Core
- Templating
- Routing
- Controllers
- Components
- Extra Components
- Helpers
- Styling
- Debugging