openmct/platform/commonUI/dialog
Charles Hacskaylo 954fdd5906 [Frontend] Sanding/positioning and Cancel button added to Messasges dialog
open #159
open #170
Added Cancel button to Messages dialog in DialogService.js;
Important tweaks to layout of messages to allow
bottom-bar to align to bottom in singleton dialog view;
Revised status colors in theme's constants files;
2015-10-08 19:10:26 -07:00
..
res/templates [Frontend] Sanding/positioning and Cancel button added to Messasges dialog 2015-10-08 19:10:26 -07:00
src [Frontend] Sanding/positioning and Cancel button added to Messasges dialog 2015-10-08 19:10:26 -07:00
test [Licenses] Add license headers 2015-05-13 16:43:30 -07:00
bundle.json [Frontend] Messages major work 2015-10-08 13:09:41 -07:00
README.md [Dialog] Add options dialog 2015-03-20 12:11:19 -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.