tool_lp/competencyruleconfig

Competency rule config.

Source:
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Methods

(protected, inner) _afterChange()

Source:

After change.

Triggered when a change occured.

(protected, inner) _afterRender()

Source:

After render hook.

(protected, inner) _afterRuleConfigChange(e, rule)

Source:

After change in rule's config.

Triggered when a change occured in a specific rule config.

Parameters:
Name Type Description
e Event
rule Rule

(protected, inner) _find(selector) → {JQuery}

Source:

Find a node in the dialogue.

Parameters:
Name Type Description
selector String
Returns:
Type
JQuery

(protected, inner) _getApplicableOutcomesOptions() → {Array}

Source:

Get the applicable outcome options.

Returns:
Type
Array

(protected, inner) _getApplicableRulesOptions() → {Array}

Source:

Get the applicable rules options.

Returns:
Type
Array

(protected, inner) _getConfig() → {Object}

Source:

Get the full config for the competency.

Returns:

Contains rule, ruleoutcome and ruleconfig.

Type
Object

(protected, inner) _getOutcome() → {String}

Source:

Get the selected outcome code.

Returns:
Type
String

(protected, inner) _getRule() → {null|Rule}

Source:

Get the selected rule.

Returns:
Type
null | Rule

(protected, inner) _getRuleName(type) → {String}

Source:

Return the name of a rule.

Parameters:
Name Type Description
type String

The type of a rule.

Returns:
Type
String

(protected, inner) _initOutcomes() → {Promise}

Source:

Initialise the outcomes.

Returns:
Type
Promise

(protected, inner) _initRules() → {Promise}

Source:

Initialise the rules.

Returns:
Type
Promise

(protected, inner) _isValid() → {Boolean}

Source:

Whether or not the current config is valid.

Returns:
Type
Boolean

(protected, inner) _preRender() → {Promise}

Source:

Hook to executed before render.

Returns:
Type
Promise

(protected, inner) _render() → {Promise}

Source:

Render the dialogue.

Returns:
Type
Promise

(protected, inner) _setUp()

Source:

Set up the instance.

(protected, inner) _switchedOutcome()

Source:

Called when the user switches outcome.

(protected, inner) _switchedRule()

Source:

Called when the user switches rule.

(protected, inner) _trigger(type, data)

Source:

Trigger an event.

Parameters:
Name Type Description
type String

The type of event.

data Object

The data to pass to the listeners.

(inner) canBeConfigured() → {Boolean}

Source:

Whether the current competency can be configured.

Returns:
Type
Boolean

(inner) close()

Source:

Close the dialogue.

(inner) display() → {Promise}

Source:

Opens the picker.

Returns:
Type
Promise

(inner) on(type, handler)

Source:

Register an event listener.

Parameters:
Name Type Description
type String

The event type.

handler function

The event listener.

(protected, inner) ready() → {Promise}

Source:

Returns a promise that is resolved when the module is ready.

Returns:
Type
Promise

(inner) setTargetCompetencyId(competencyId)

Source:

Set the target competency.

Parameters:
Name Type Description
competencyId Number

The target competency Id.