Class: EditCategories

EditCategories()

Handles the categories of the selected fileEntries inside a modal.

Members

description :String

Description
Type:
  • String
Source:

fileEntries :List.<String>

List of selected file entries.
Type:
  • List.<String>
Source:

folderId :String

Folder Id
Type:
  • String
Source:

loading :Boolean

Flag that indicate if loading icon must be shown.
Type:
  • Boolean
Source:

multiple :Boolean

Flag that indicate if multiple file entries has been selected.
Type:
  • Boolean
Source:

namespace :string

Portlet's namespace
Type:
  • string
Source:

repositoryId :String

RepositoryId
Type:
  • String
Source:

selectAll :Boolean

Flag that indicate if "select all" checkbox is checked.
Type:
  • Boolean
Source:

spritemap :String

Path to images.
Type:
  • String
Source:

urlCategories :String

Url to backend service that provides the common categories info.
Type:
  • String
Source:

urlUpdateCategories :String

Url to backend service that updates the categories.
Type:
  • String
Source:

Methods

_checkRequiredVocabulary(vocabularyId) → {Boolean}

Checks if the vocabulary is empty or not.
Parameters:
Name Type Description
vocabularyId String
Source:
Returns:
true if it has a category, false if is empty.
Type
Boolean

_fetchCategoriesRequest(url, bodyData, callback)

Creates the ajax request.
Parameters:
Name Type Description
url String Url of the request
bodyData Object The body of the request
callback function Callback function
Source:

_getFinalCategories() → {List.<Long>}

Get all the categoryIds selected for all the vocabularies.
Source:
Returns:
List of categoryIds.
Type
List.<Long>

_getVocabularyInputNode(vocabularyId) → {DOMElement}

Gets the input where categories are saved for a vocabulary.
Parameters:
Name Type Description
vocabularyId String [description]
Source:
Returns:
input node.
Type
DOMElement

_parseCategories(categories) → {List.<{label, value}>}

Transforms the categories list in the object needed for the ClayMultiSelect component.
Parameters:
Name Type Description
categories List.<Long, String>
Source:
Returns:
new commonItems object list
Type
List.<{label, value}>

attached()

Source:

close()

Close the modal.
Source:

created()

Source:

open()

Open the modal and get the commont categories.
Source: