renamed dialog and notification 'actions' to 'options'
This commit is contained in:
@@ -19,15 +19,15 @@
|
||||
ng-show="ngModel.progress !== undefined || ngModel.unknownProgress"></mct-include>
|
||||
</div>
|
||||
<div class="bottom-bar">
|
||||
<a ng-repeat="dialogAction in ngModel.actions"
|
||||
<a ng-repeat="dialogOption in ngModel.options"
|
||||
class="s-btn major"
|
||||
ng-click="dialogAction.action()">
|
||||
{{dialogAction.label}}
|
||||
ng-click="dialogOption.callback()">
|
||||
{{dialogOption.label}}
|
||||
</a>
|
||||
<a class="s-btn major"
|
||||
ng-if="ngModel.primaryAction"
|
||||
ng-click="ngModel.primaryAction.action()">
|
||||
{{ngModel.primaryAction.label}}
|
||||
ng-if="ngModel.primaryOption"
|
||||
ng-click="ngModel.primaryOption.callback()">
|
||||
{{ngModel.primaryOption.label}}
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -178,7 +178,7 @@ define(
|
||||
* A user action that can be performed from a blocking dialog. These
|
||||
* actions will be rendered as buttons within a blocking dialog.
|
||||
*
|
||||
* @typedef DialogAction
|
||||
* @typedef DialogOption
|
||||
* @property {string} label a label to be displayed as the button
|
||||
* text for this action
|
||||
* @property {function} action a function to be called when the
|
||||
@@ -207,12 +207,12 @@ define(
|
||||
* impossible to provide an estimate for. Providing a true value for
|
||||
* this attribute will indicate to the user that the progress and
|
||||
* duration cannot be estimated.
|
||||
* @property {DialogAction} primaryAction an action that will
|
||||
* @property {DialogOption} primaryOption an action that will
|
||||
* be added to the dialog as a button. The primary action can be
|
||||
* used as the suggested course of action for the user. Making it
|
||||
* distinct from other actions allows it to be styled differently,
|
||||
* and treated preferentially in banner mode.
|
||||
* @property {DialogAction[]} actions a list of actions that will
|
||||
* @property {DialogOption[]} options a list of actions that will
|
||||
* be added to the dialog as buttons.
|
||||
*/
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
ng-model="active.notification">
|
||||
</mct-include>
|
||||
</span>
|
||||
<a ng-hide="active.notification.primaryAction === undefined"
|
||||
<a ng-hide="active.notification.primaryOption === undefined"
|
||||
class="banner-elem l-action s-action"
|
||||
ng-click="action(active.notification.primaryAction.action, $event)">
|
||||
{{active.notification.primaryAction.label}}
|
||||
ng-click="action(active.notification.primaryOption.callback, $event)">
|
||||
{{active.notification.primaryOption.label}}
|
||||
</a>
|
||||
<a class="banner-elem ui-symbol close" ng-click="dismiss(active.notification, $event)">
|
||||
x</a>
|
||||
|
||||
@@ -37,13 +37,13 @@ define(
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* A representation of a user action. Actions are provided to
|
||||
* A representation of a user action. Options are provided to
|
||||
* dialogs and notifications and are shown as buttons.
|
||||
*
|
||||
* @typedef {object} NotificationAction
|
||||
* @typedef {object} NotificationOption
|
||||
* @property {string} label the label to appear on the button for
|
||||
* this action
|
||||
* @property {function} action a callback function to be invoked
|
||||
* @property {function} callback a callback function to be invoked
|
||||
* when the button is clicked
|
||||
*/
|
||||
|
||||
@@ -67,12 +67,12 @@ define(
|
||||
* be automatically minimized or dismissed (depending on severity).
|
||||
* Additionally, if the provided value is a number, it will be used
|
||||
* as the delay period before being dismissed.
|
||||
* @property {NotificationAction} primaryAction the default user
|
||||
* @property {NotificationOption} primaryOption the default user
|
||||
* response to
|
||||
* this message. Will be represented as a button with the provided
|
||||
* label and action. May be used by banner notifications to display
|
||||
* only the most important option to users.
|
||||
* @property {NotificationAction[]} actions any additional
|
||||
* @property {NotificationOption[]} options any additional
|
||||
* actions the user can take. Will be represented as additional buttons
|
||||
* that may or may not be available from a banner.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user