core_contentbank/sort

Content bank UI actions.

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

Methods

(inner) init()

Source:

Set up the contentbank views.

(inner) registerListenerEvents(contentBank)

Source:

Register contentbank related event listeners.

Parameters:
Name Type Description
contentBank HTMLElement

The DOM node of the content bank

(inner) setViewListPreference(viewList) → {Promise}

Source:

Set the contentbank user preference in list view

Parameters:
Name Type Description
viewList Bool

view ContentBank as list.

Returns:

Repository promise.

Type
Promise

(inner) updateButtonTitle(button, ascending) → {Promise}

Source:

Update the button title.

Parameters:
Name Type Description
button HTMLElement

Button to update

ascending Bool

Sort direction

Returns:

string promise

Type
Promise

(inner) updateSortButtons(contentBank, sortButton) → {Bool}

Source:

Update the sort button view.

Parameters:
Name Type Description
contentBank HTMLElement

The DOM node of the contentbank button

sortButton HTMLElement

The DOM node of the sort button

Returns:

sort ascending

Type
Bool

(inner) updateSortOrder(fileArea, itemList, attribute, ascending)

Source:

Update the sort order of the itemlist and update the DOM

Parameters:
Name Type Description
fileArea HTMLElement

the Dom container for the itemlist

itemList Array

Nodelist of Dom elements

attribute String

the attribut to sort on

ascending Bool

Sort Ascending