tool_lp/competencypicker

Description:
  • 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

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.

Methods

(inner) _afterRender()

Description:
  • Hook to executed after the view is rendered.

Source:

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

Description:
  • Fetch the competencies.

Source:
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}

Description:
  • Find a node in the dialogue.

Source:
Parameters:
Name Type Description
selector String
Returns:
Type
JQuery

(inner) _getFramework(fid) → {Object}

Description:
  • Convenience method to get a framework object.

Source:
Parameters:
Name Type Description
fid Number

The framework ID.

Returns:
Type
Object

(inner) _loadCompetencies() → {Promise}

Description:
  • Load the competencies.

Source:
Returns:
Type
Promise

(inner) _loadFrameworks() → {Promise}

Description:
  • Load the frameworks.

Source:
Returns:
Type
Promise

(inner) _preRender() → {Promise}

Description:
  • Hook to executed before render.

Source:
Returns:
Type
Promise

(inner) _refresh() → {Promise}

Description:
  • Refresh the view.

Source:
Returns:
Type
Promise

(inner) _render() → {Promise}

Description:
  • Render the dialogue.

Source:
Returns:
Type
Promise

(inner) _reset()

Description:
  • Reset the dialogue properties.

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

Source:

(inner) _reset(type, data)

Description:
  • Trigger an event.

Source:
Parameters:
Name Type Description
type String

The type of event.

data Object

The data to pass to the listeners.

(inner) _setDisallowedCompetencyIDs(ids)

Description:
  • Set what competencies cannot be picked.

    This needs to be set after reset/close.

Source:
Parameters:
Name Type Description
ids Array.<Number>

The IDs.

(inner) close()

Description:
  • Close the dialogue.

Source:

(inner) display() → {Promise}

Description:
  • Opens the picker.

Source:
Returns:
Type
Promise

(inner) on(type, handler)

Description:
  • Register an event listener.

Source:
Parameters:
Name Type Description
type String

The event type.

handler function

The event listener.