Extends
Constructor
new ve.ui.MWMediaInfoFieldWidget(content, [config])
#
Hierarchy
MWMediaInfoFieldWidget widget for displaying media information from the API.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content |
jQuery | string | OO.ui.HtmlSnippet | API response data from which to build the display |
|||||||||||||||||||||||||||||||
config |
Object |
optional |
Configuration options Properties:
|
Properties
thresholdstatic
#
Define a height threshold for the description fields. If the rendered field's height is under the defined limit (max-height + threshold) we should remove the max-height and display the field as-is. This prevents cases where "read more" appears but only exposes only a few pixels or a line extra.
Properties:
Name | Type | Description |
---|---|---|
Threshold |
number | in pixels |
Methods
getType() → {string}
#
Get field type; 'attribute' or 'description'
Returns:
Field type
- Type
- string
initialize()
#
Toggle the read more button according to whether it should be visible or not.
Toggle the read more button according to whether it should be visible or not.
onReadMoreClick()
#
Respond to read more button click event.