Skip to content

2.11.4

Compare
Choose a tag to compare
@laurenwalker laurenwalker released this 18 May 23:09

Improvements

  • You can now easily add a temporary message to any part of the application by configuring a few AppModel settings. This is useful when you need to show an important timely message to your users, such as a warning about a planned outage, an announcement about new features, etc. You can specify a start and end time during which the message should appear, a container element in which to insert the message, and additional HTML classes to assign to the message element.

2 11 4-screenshot

https://github.com/NCEAS/metacatui/blob/8b93d5835155385c5b76c56877541cc3264648c8/src/js/models/AppModel.js#L47-L81

      /**
      * Add a message that will display during a certain time period. This is useful when
      * displaying a warning message about planned outages/maintenance, or alert users to other
      * important information.
      * If this attribute is left blank, no message will display, even if there is a start and end time specified.
      * If there are is no start or end time specified, this message will display until you remove it here.
      * @type {string}
      */
      temporaryMessage: null,


      /**
      * If there is a temporaryMessage specified, it will display after this start time.
      * Remember that Dates are in GMT time!
      * @type {Date}
      */
      temporaryMessageStartTime: null,


      /**
      * If there is a temporaryMessage specified, it will display before this end time.
      * Remember that Dates are in GMT time!
      * @type {Date}
      */
      temporaryMessageEndTime: null,


      /**
      * Additional HTML classes to give the temporary message element. Use these to style the message.
      * @type {string}
      */
      temporaryMessageClasses: "warning",


      /**
      * A jQuery selector for the element that the temporary message will be displayed in.
      * @type {string}
      */
      temporaryMessageContainer: "#Navbar",