Methods
checkIncompatibility()
Checks if the user's browser is an outdated version that won't work with
MetacatUI well, and displays a warning message to the user..
The user agent is checked against the `unsupportedBrowsers` list in the AppModel.
- Source:
hideTemporaryMessage()
Hides the temporary message
- Source:
listenForActivity()
Listens to the focus event on the window to detect when a user switches back to this browser tab from somewhere else
When a user checks back, we want to check for log-in status
- Source:
listenForTimeout()
Will determine the length of time until the user's current token expires,
and will set a window timeout for that length of time. When the timeout
is triggered, the sign in modal window will be displayed so that the user
can sign in again (which happens in AppView.showTimeoutSignIn())
- Source:
showAlert(options)
Displays the given message to the user in a Bootstrap "alert" style.
Parameters:
Name | Type | Description |
---|---|---|
options |
object | A literal object of options for the alert message. |
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
options.message |
string | Element | A message string or HTML Element to display | |
options.classes |
string |
<optional> |
A string of HTML classes to set on the alert |
options.container |
string | Element |
<optional> |
The container to show the alert in |
options.replaceContents |
boolean |
<optional> |
If true, the alert will replace the contents of the container element. If false, the alert will be prepended to the container element. |
options.delay |
boolean | number |
<optional> |
Set to true or specify a number of milliseconds to display the alert temporarily |
options.remove |
boolean |
<optional> |
If true, the user will be able to remove the alert with a "close" icon. |
options.includeEmail |
boolean |
<optional> |
If true, the alert will include a link to the AppConfig#emailContact |
options.emailBody |
string |
<optional> |
Specify an email body to use in the email link. |
- Source:
showAlert_deprecated(msg, classesopt, containeropt, delayopt, optionsopt)
Previous to MetacatUI 2.14.0, the AppView#showAlert function allowed up to five parameters
to customize the alert message. As of 2.14.0, the function has condensed these options into
a single literal object. See the docs for AppView#showAlert. The old signature of five
parameters may soon be deprecated completely, but is still supported.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
msg |
string | Element | ||||||||||||||||||||||
classes |
string |
<optional> |
|||||||||||||||||||||
container |
string | Element |
<optional> |
|||||||||||||||||||||
delay |
boolean |
<optional> |
|||||||||||||||||||||
options |
object |
<optional> |
Properties
|
- Deprecated:
- Yes
- Source:
showTemporaryMessage()
Shows a temporary message at the top of the view
- Source:
showTimeoutSignIn()
If the user's auth token has expired, a new SignInView model window is
displayed so the user can sign back in. A listener is set on the appUserModel
so that when they do successfully sign back in, we set another timeout listener
via AppView.listenForTimeout()
- Source: