Constructor
new MetricModalView()
- Source:
Extends
Members
className :string
Classes to add to the modal
Type:
- Source:
events :Object
Type:
- Source:
id :string
An ID for this view
Type:
- Source:
metricName :string
The name of the metric currently being displayed
Type:
- Source:
The metrics to include in the modal, in the order they will be
displayed.
Type:
- Source:
metricsModel :MetricsModel
The model that contains the metrics data
Type:
- Source:
subviews :Array.<Backbone.View>
Views that are subviews of this view
Type:
- Source:
template :Underscore.Template
The underscore template for this view
Type:
- Source:
Methods
drawMetricsChart()
Draw the metrics chart
- Source:
getMetricAtOffset(n) → {string}
Get the metric name at the given offset from the current metric
Parameters:
Name |
Type |
Description |
n |
number
|
The offset from the current metric |
- Since:
- Source:
Returns:
The name of the metric at the given offset
-
Type
-
string
getNextMetric() → {string}
Get the previous metric name in the circular queue
- Source:
Returns:
The name of the previous metric
-
Type
-
string
getPreviousMetric() → {string}
Get the next metric name in the circular queue
- Source:
Returns:
The name of the next metric
-
Type
-
string
initialize(options)
Initialize a new MetricModalView
Parameters:
Name |
Type |
Description |
options |
Object
|
A literal object with options to pass to the
view. The options can include:
Properties
Name |
Type |
Description |
metricName |
string
|
The name of the metric to display
in the modal |
metricsModel |
MetricsModel
|
The model that contains
the metrics data |
pid |
string
|
The DataONE PID of the dataset that the
metrics are for |
|
- Source:
onClose()
Cleans up and removes all artifacts created for view
- Source:
render()
Set a listener that will render the view when the modal is shown
- Source:
Render the view
- Source:
Returns:
- Returns this view
-
Type
-
MetricModalView
show()
Make the modal visible
- Source:
Display the Citation registration form
- Source:
showCitations()
Show the citations in the modal. Replace current content.
- Source:
showNextMetricModal()
Show the next metric in the modal
- Source:
showPreviousMetricModal()
Show the previous metric in the modal
- Source:
showSignIn()
Show Sign In buttons
- Source:
Handle the sign in click event
- Source:
teardown()
Remove the modal from the DOM
- Source: