Module: router_js

Methods

(inner) appGoto(card, tabopt, viewopt, offsetopt, limitopt, filteropt, sortopt, tagopt, searchopt, newScrollPosopt, appendopt) → {void}

Calculates the location hash and calls appRoute
Parameters:
Name Type Attributes Description
card string card element name
tab string <optional>
tab element name
view string <optional>
view element name
offset number <optional>
list offset
limit number <optional>
list limit
filter string | object <optional>
filter
sort object <optional>
sort object
tag string <optional>
tag name
search string | object <optional>
search object or string
newScrollPos number <optional>
new scrolling position
append boolean <optional>
Append the result to current result
Source:
Returns:
Type
void

(inner) appPrepare() → {void}

Shows the current view and highlights the navbar icon
Source:
Returns:
Type
void

(inner) appRoute(cardopt, tabopt, viewopt, offsetopt, limitopt, filteropt, sortopt, tagopt, searchopt, appendopt) → {void}

Executes the actions after the view is shown
Parameters:
Name Type Attributes Description
card string <optional>
card element name
tab string <optional>
tab element name
view string <optional>
view element name
offset number <optional>
list offset
limit number <optional>
list limit
filter string | object <optional>
filter
sort object <optional>
sort object
tag string <optional>
tag name
search string | object <optional>
search object or string
append boolean <optional>
Append the result to current result
Source:
Returns:
Type
void

(inner) defaultStartupView() → {string}

Returns the default startup view
Source:
Returns:
Default startup view
Type
string

(inner) historyBack() → {void}

Emulates the browser back button
Source:
Returns:
Type
void

(inner) isArrayOrString(obj) → {boolean}

Checks if obj is string or object
Parameters:
Name Type Description
obj string | object object to check
Source:
Returns:
true if obj is object or string, else false
Type
boolean

(inner) startupView() → {Array}

Checks and sets the startup view of myMPD
Source:
Returns:
Startup path (card/tab/view)
Type
Array