openmct/platform/commonUI/dialog
Charles Hacskaylo e8e7067993 Fix legacy messages (#2323)
* Fix legacy message styling

- Code cleanup;
- Enable constants-mobile;
- Add _legacy-messages.scss;
- Add status color fg colors to theme constants;

* CSS refactoring, significant migration for messages classes

- Many messages classes migrated;
- c-click-icon > c-icon-button;
- c-click-icon rewritten;
- __close-btn refined in dialogs;

* About and splash screen styling

- Fixed splash in About screen;

* Update _mixins.scss

* Convert c-overlay__close-button to button

- <a> -> <button>;
- Set color of button;
- Normalized naming from close-btn to close-button;

* Fixed brightness filter issue on elements in overlays in VISTA;

* Fix dismiss button
2019-03-21 15:07:16 -07:00
..
res/templates Fix legacy messages (#2323) 2019-03-21 15:07:16 -07:00
src update preview action to use new action registry 2018-12-11 19:25:20 -08:00
test Build refactor to webpack (#2139) 2018-08-07 14:47:50 -07:00
bundle.js small compatibility fix to make legacy dialogs (mostly) work (#2310) 2019-03-14 13:31:42 -07:00
README.md [Licenses] Update copyright year to 2017 2017-04-05 14:52:46 -07:00

This bundle provides dialogService, which can be used to prompt for user input.

getUserChoice

The getUserChoice method is useful for displaying a message and a set of buttons. This method returns a promise which will resolve to the user's chosen option (or, more specifically, its key), and will be rejected if the user closes the dialog with the X in the top-right;

The dialogModel given as an argument to this method should have the following properties.

  • title: The title to display at the top of the dialog.
  • hint: Short message to display below the title.
  • template: Identifying key (as will be passed to mct-include) for the template which will be used to populate the inner area of the dialog.
  • model: Model to pass in the ng-model attribute of mct-include.
  • parameters: Parameters to pass in the parameters attribute of mct-include.
  • options: An array of options describing each button at the bottom. Each option may have the following properties:
    • name: Human-readable name to display in the button.
    • key: Machine-readable key, to pass as the result of the resolved promise when clicked.
    • description: Description to show in tool tip on hover.