tool_lp/competencytree

Description:
  • Handle selection changes on the competency tree.

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

Handle selection changes on the competency tree.

Members

(inner) competencies :Array.<Object>

Description:
  • Cached list of competencies

Source:

Cached list of competencies

Type:
  • Array.<Object>

(inner) competencyFrameworkId :Number

Description:
  • The current framework id

Source:

The current framework id

Type:
  • Number

(inner) competencyFrameworkShortName :String

Description:
  • The current framework short name

Source:

The current framework short name

Type:
  • String

(inner) competencyFramworkCanManage :Boolean

Description:
  • Can manage the competencies framework

Source:

Can manage the competencies framework

Type:
  • Boolean

(inner) currentNodeId :String

Description:
  • The data-id of the current node in the tree.

Source:

The data-id of the current node in the tree.

Type:
  • String

(inner) treeSelector :String

Description:
  • The selector for the root of the tree.

Source:

The selector for the root of the tree.

Type:
  • String

Methods

(static) getCompetency(id) → {Object}

Description:
  • Get a competency by id

Source:
Parameters:
Name Type Description
id Number

The competency id

Returns:
Type
Object

(static) getCompetencyFrameworkId() → {Number}

Description:
  • Get the competency framework id this model was initiliased with.

Source:
Returns:
Type
Number

(static) getCompetencyLevel(id) → {Number}

Description:
  • Get the competency level.

Source:
Parameters:
Name Type Description
id Number

The competency ID.

Returns:
Type
Number

(static) hasRule(id) → {Boolean}

Description:
  • Does the competency have a rule?

Source:
Parameters:
Name Type Description
id Number

The competency ID.

Returns:
Type
Boolean

(static) init(id, shortname, search, selector, canmanage, competencyid)

Description:
  • Initialise the tree.

Source:
Parameters:
Name Type Description
id Number

The competency framework id.

shortname String

The framework shortname

search String

The current search string

selector String

The selector for the tree div

canmanage Boolean

Can manage the competencies

competencyid Number

The id of the competency to show first

(static) listCompetencies() → {Array.<Object>}

Description:
  • Get all competencies for this framework.

Source:
Returns:
Type
Array.<Object>

(static) on(eventname, handler)

Description:
  • Add an event handler for custom events emitted by the tree.

Source:
Parameters:
Name Type Description
eventname String

The name of the event - only "selectionchanged" for now

handler function

The handler for the event.

(inner) getChildren(id) → {Array}

Description:
  • Get the children of a competency.

Source:
Parameters:
Name Type Description
id Number

The competency ID.

Returns:
Type
Array

(inner) hasChildren(id) → {Boolean}

Description:
  • Whether a competency has children.

Source:
Parameters:
Name Type Description
id Number

The competency ID.

Returns:
Type
Boolean

(inner) reloadCompetencies() → {Promise}

Description:
  • Reload all the page competencies framework competencies.

Source:
Returns:
Type
Promise