Constructor
new DiffVersionComparator()
Members
availableLocales :Array.<Object>
List of locales that are available for the current asset. Used to render
locale selector.
Type:
- Array.<Object>
- Source:
diffHtmlResults :String|Object
HTML diff results that have been calculated by the server.
Type:
- String | Object
- Source:
diffVersions :Array.<Object>
Array of diffVersion objects used for rendering dropdown menus and target
list.
Type:
- Array.<Object>
- Source:
languageId :String
Currently selected language id.
Type:
- String
- Source:
portletNamespace :String
Portlet namespace.
Type:
- String
- Source:
resourceURL :String
Portlet resource URL.
Type:
- String
- Source:
resultsLength :number
Total length of results after search input is used.
Type:
- number
- Source:
selectedVersion :Object
Currently selected version. Used for version filter header.
Type:
- Object
- Source:
showVersionFilter :boolean
Determines if version filter should display.
Type:
- boolean
- Default Value:
- false
- Source:
sourceVersion :String
Currently selected source version.
Type:
- String
- Source:
targetVersion :String
Currently selected target version.
Type:
- String
- Source:
Methods
(protected) findDiffVersion_(version) → {Object}
Returns diffVerson object of passed version.
Parameters:
Name | Type | Description |
---|---|---|
version |
String |
- Source:
Returns:
- Type
- Object
(protected) handleCloseFilterClick_()
Handles click event of close button on version filter header.
- Source:
(protected) handleLanguageChange_()
Handles change event of language select element. Submits form to change
language.
- Source:
(protected) handleSearchChange_(event)
Handles change event of search input. Filters results based on input.
Parameters:
Name | Type | Description |
---|---|---|
event |
Event |
- Source:
(protected) handleVersionItemClick_(event)
Handles click event of version items. Sets `selectedVersion` and loads
new `diffHtmlResults` value based on newly selected version.
Parameters:
Name | Type | Description |
---|---|---|
event |
Event |
- Source:
(protected) loadDiffHtmlResults_(targetVersion)
Submits Ajax request for new `htmlDiffResults` value that will show the
diff between the `targetVersion` argument and currently selected
`sourceVersion`.
Parameters:
Name | Type | Description |
---|---|---|
targetVersion |
String |
- Source:
(protected) setterDiffHtmlResults_(value)
Setter for the `diffHtmlResults` STATE property. Necessary because server
returns html values as object.
Parameters:
Name | Type | Description |
---|---|---|
value |
Object | String |