Competency rule config.
- Source:
- Copyright:
- 2015 Frédéric Massart - FMCorz.net
- License:
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Methods
(protected, inner) _afterChange()
After change.
Triggered when a change occured.
(protected, inner) _afterRender()
After render hook.
(protected, inner) _afterRuleConfigChange(e, rule)
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}
Find a node in the dialogue.
Parameters:
Name | Type | Description |
---|---|---|
selector |
String |
Returns:
- Type
- JQuery
(protected, inner) _getApplicableOutcomesOptions() → {Array}
Get the applicable outcome options.
Returns:
- Type
- Array
(protected, inner) _getApplicableRulesOptions() → {Array}
Get the applicable rules options.
Returns:
- Type
- Array
(protected, inner) _getConfig() → {Object}
Get the full config for the competency.
Returns:
Contains rule, ruleoutcome and ruleconfig.
- Type
- Object
(protected, inner) _getOutcome() → {String}
Get the selected outcome code.
Returns:
- Type
- String
(protected, inner) _getRule() → {null|Rule}
Get the selected rule.
Returns:
- Type
- null | Rule
(protected, inner) _getRuleName(type) → {String}
Return the name of a rule.
Parameters:
Name | Type | Description |
---|---|---|
type |
String | The type of a rule. |
Returns:
- Type
- String
(protected, inner) _initOutcomes() → {Promise}
Initialise the outcomes.
Returns:
- Type
- Promise
(protected, inner) _initRules() → {Promise}
Initialise the rules.
Returns:
- Type
- Promise
(protected, inner) _isValid() → {Boolean}
Whether or not the current config is valid.
Returns:
- Type
- Boolean
(protected, inner) _preRender() → {Promise}
Hook to executed before render.
Returns:
- Type
- Promise
(protected, inner) _render() → {Promise}
Render the dialogue.
Returns:
- Type
- Promise
(protected, inner) _setUp()
Set up the instance.
(protected, inner) _switchedOutcome()
Called when the user switches outcome.
(protected, inner) _switchedRule()
Called when the user switches rule.
(protected, inner) _trigger(type, data)
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}
Whether the current competency can be configured.
Returns:
- Type
- Boolean
(inner) close()
Close the dialogue.
(inner) display() → {Promise}
Opens the picker.
Returns:
- Type
- Promise
(inner) on(type, handler)
Register an event listener.
Parameters:
Name | Type | Description |
---|---|---|
type |
String | The event type. |
handler |
function | The event listener. |
(protected, inner) ready() → {Promise}
Returns a promise that is resolved when the module is ready.
Returns:
- Type
- Promise
(inner) setTargetCompetencyId(competencyId)
Set the target competency.
Parameters:
Name | Type | Description |
---|---|---|
competencyId |
Number | The target competency Id. |