Constructor
new AppModel()
- Source:
Extends
Methods
addCSS(css, id)
Given a string of CSS and an associated unique ID, check whether that CSS file
was already added to the document head, and add it if not. Prevents adding the
CSS file multiple times if the view is loaded more than once. The first time each
CSS path is added, we need to save a record of the event. It doesn't work to just
search the document head for the style element to determine if the CSS has
already been added, because views may be initialized too quickly, before the
previous instance has had a chance to add the stylesheet element.
Parameters:
Name |
Type |
Description |
css |
string
|
A string containing CSS styles |
id |
string
|
A unique ID for the CSS styles which has not been used
anywhere else in the app. |
- Source:
getActiveAltRepo() → {object}
Gets the currently-active alternative repository that is configured in this AppModel.
- Source:
Returns:
-
Type
-
object
getDataONEMNAPIs(baseUrlopt) → {object}
Constructs the DataONE API URLs for the given baseUrl
Parameters:
Name |
Type |
Attributes |
Description |
baseUrl |
string
|
<optional>
|
The baseUrl to use in the URLs. If not specified, it uses the AppModel attributes. |
- Source:
Returns:
-
Type
-
object
removeCSS(id)
Parameters:
Name |
Type |
Description |
id |
string
|
A unique ID for the CSS styles which has not been used
anywhere else in the app. The same ID used to add the CSS with
AppModel#addCSS |
- Source:
setActiveAltRepo()
- Source:
Fires:
- AppModel#change:activeAlternateRepositoryId