Constructor
new EMLAttributeView()
- Source:
Extends
Members
className :string
The className to add to the view container
Type:
- Source:
events :Object
The events this view will listen to and the associated function to
call.
Type:
- Source:
template :Underscore.template
The HTML template for an attribute
Type:
- Source:
Methods
hideValidation(e)
Hides validation errors on this view
Parameters:
Name |
Type |
Description |
e |
Event
|
The event that was triggered by the user |
- Source:
initialize(options)
Creates a new EMLAttributeView
Parameters:
Name |
Type |
Description |
options |
Object
|
A literal object with options to pass to the
view
Properties
Name |
Type |
Attributes |
Default |
Description |
model |
EMLAttribute
|
<optional>
|
|
The EMLAttribute model to
display. If none is provided, an empty EMLAttribute will be created. |
isNew |
boolean
|
<optional>
|
false
|
Set to true if this is a new
attribute |
|
- Source:
postRender()
After this view has been rendered, add the MeasurementTypeView and
render the MeasurementScaleView
- Source:
Renders this view
- Source:
Returns:
A reference to this view
-
Type
-
EMLAttributeView
renderMeasurementTypeView()
Render and insert the MeasurementTypeView for this view.
This is separated out into its own method so it can be called from
`postRender()` which is called after the user switches to the
EntityView tab for this attribute. We do this to avoid loading as many
MeasurementTypeViews as there are Attributes which would get us rate
limited by BioPortal because every MeasurementTypeView hits BioPortal's
API on render.
- Source:
showValidation()
Shows validation errors on this view
- Source:
updateModel(e)
Updates the model with the new value from the DOM element that was
changed.
Parameters:
Name |
Type |
Description |
e |
Event
|
The event that was triggered by the user |
- Source: