Namespace: utils

db.utils

Source:

Members

(static) idCounter

Generate a unique integer id (unique within the entire client session). Useful for temporary DOM ids.
Source:

Methods

(static) getCookie(name:)

Get cookie by specific name

Parameters:
Name Type Description
name: string, name of the cookie
Source:
Returns:
string|null, cookie or null

(static) initialized(el, name)

Flag a element as component has initialized

Parameters:
Name Type Description
el jQuery jQuery element to initialized
name string the name of the component
Source:

(static) isInitialized(el, name)

Check if a component is initialized

Parameters:
Name Type Description
el jQuery jQuery element to check
name string the name of the component
Source:

(static) jQueryPlugin(component)

Binds a component to jQuery as plugin. All methods exposed from the component is available as $(el).component('method');

Parameters:
Name Type Description
component object A module following the revealing module pattern
Source:

(static) userIsLoggedPluss()

Boolean to check if user logged into the Pluss user is logged into the Pluss if: - cookie 'dug-state' exists - cookie 'xavier_pluss' has structure like {"customer_number":16551368,"expiry":1533375908,"access":true} and field 'access' is true

Source:
Returns:
boolean