tool_lp/competencypicker

Competency picker.

To handle 'save' events use: picker.on('save') This will receive a object with either a single 'competencyId', or an array in 'competencyIds' depending on the value of multiSelect.

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

Methods

(inner) _afterRender()

Source:

Hook to executed after the view is rendered.

(inner) _fetchCompetencies(frameworkId, searchText) → {Promise}

Source:

Fetch the competencies.

Parameters:
Name Type Description
frameworkId Number

The frameworkId.

searchText String

Limit the competencies to those matching the text.

Returns:
Type
Promise

(inner) _find(selector) → {JQuery}

Source:

Find a node in the dialogue.

Parameters:
Name Type Description
selector String
Returns:
Type
JQuery

(inner) _getFramework(fid) → {Object}

Source:

Convenience method to get a framework object.

Parameters:
Name Type Description
fid Number

The framework ID.

Returns:
Type
Object

(inner) _loadCompetencies() → {Promise}

Source:

Load the competencies.

Returns:
Type
Promise

(inner) _loadFrameworks() → {Promise}

Source:

Load the frameworks.

Returns:
Type
Promise

(inner) _preRender() → {Promise}

Source:

Hook to executed before render.

Returns:
Type
Promise

(inner) _refresh() → {Promise}

Source:

Refresh the view.

Returns:
Type
Promise

(inner) _render() → {Promise}

Source:

Render the dialogue.

Returns:
Type
Promise

(inner) _reset()

Source:

Reset the dialogue properties.

This does not reset everything, just enough to reset the UI.

(inner) _reset(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) _setDisallowedCompetencyIDs(ids)

Source:

Set what competencies cannot be picked.

This needs to be set after reset/close.

Parameters:
Name Type Description
ids Array.<Number>

The IDs.

(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.