Class: EMLEntityView

EMLEntityView()

An EMLEntityView shows the basic attributes of a DataONEObject, as described by EML

Screenshot

Constructor

new EMLEntityView()

Source:

Extends

  • Backbone.View

Members

fillableFormats :Array.<string>

A list of file formats that can be auto-filled with attribute information
Type:
  • Array.<string>
Since:
  • 2.15.0
Source:

Methods

clearOldDrafts()

Clear older drafts by iterating over the sorted list of drafts stored by LocalForage and removing any beyond a hardcoded limit.
Source:

disableFillButton()

Disable the Fill Attributes button
Since:
  • 2.15.0
Source:

enableFillButton()

Enable the Fill Attributes button
Since:
  • 2.15.0
Source:

handleFill(e)

Handle the click event on the fill button
Parameters:
Name Type Description
e Event The click event
Since:
  • 2.15.0
Source:

handleFillViaFetch()

Handle the fill event by fetching the object
Since:
  • 2.15.0
Source:

handleFillViaFile(file)

Handle the fill event using a File object
Parameters:
Name Type Description
file File A File object to fill from
Since:
  • 2.15.0
Source:

hide()

Hide the entity modal dialog
Source:

hideAttributeValidation()

Hide the attribute validation errors from the attribute navigation menu
Source:

previewAttrRemove()

Show the user what will be removed when this remove button is clicked
Source:

saveDraft()

Save a draft of the parent EML model
Source:

show()

Show the entity in a modal dialog
Source:

showAttribute(e)

Shows the attribute in the attribute editor
Parameters:
Name Type Description
e Event JS event or attribute model
Source:

showAttributeValidation(attr)

Show the attribute validation errors in the attribute navigation menu
Parameters:
Name Type Description
attr EMLAttribute
Source:

showTab(e)

Show the entity overview or attributes tab depending on the click target
Parameters:
Name Type Description
e Event
Source:

showValidation()

Will display validation styling and messaging. Should be called after this view's model has been validated and there are error messages to display
Source:

tryParseAndFillAttributeNames(content)

Attempt to parse header and fill attributes names
Parameters:
Name Type Description
content string Part of a file to attempt to parse
Since:
  • 2.15.0
Source:

updateAttributeNames(names)

Update attribute names from an array This will update existing attributes' names or create new attributes as needed. This also performs a full re-render.
Parameters:
Name Type Description
names Array.<string> A list of names to apply
Since:
  • 2.15.0
Source:

updateFillButton(messageHTML, disableTimeout)

Update the Fill button temporarily and set it back to the default Used to show success or failure of the filling operation
Parameters:
Name Type Description
messageHTML string HTML template string to set temporarily
disableTimeout boolean If true, the timeout will not be set
Since:
  • 2.15.0
Source: