CategoryManager

qbank_managecategories/categorymanager~ CategoryManager

Reactive instance for the category manager.

Constructor

new CategoryManager()

Source:

Methods

getSave(isEdit) → {String}

Description:
  • Return save button label for the add/edit modal.

Source:
Parameters:
Name Type Description
isEdit boolean

is 'add' or 'edit' form

Returns:

save string

Type
String

getTitle(isEdit) → {String}

Description:
  • Return title for the add/edit modal.

Source:
Parameters:
Name Type Description
isEdit boolean

is 'add' or 'edit' form

Returns:

title string

Type
String

moveCategory(categoryId, targetParentId, precedingSiblingId)

Description:
  • Move a category to a new position within the given parent.

    This will call the move_category web service function to re-order the categories, then update the state with the returned updates.

Source:
Parameters:
Name Type Default Description
categoryId Number

The ID of the category being moved.

targetParentId Number

The ID of the destination parent category (this may not have changed).

precedingSiblingId Number null

The ID of the category to put the moved category after. This may be null if moving to the top of a list.

showEditModal(e)

Description:
  • Function handling display of modal form.

Source:
Parameters:
Name Type Description
e Event

The click event triggering the modal.