GUAC-932: Fully-working connection editor. Initial migration of users and connection groups to own edit pages. Add support for CSS classes on notification actions.

This commit is contained in:
Michael Jumper
2014-12-22 03:19:24 -08:00
parent 07a2a2da54
commit 8b53797b30
18 changed files with 477 additions and 473 deletions

View File

@@ -41,7 +41,7 @@
<!-- Buttons -->
<div ng-show="notification.actions.length" class="buttons">
<button ng-repeat="action in notification.actions" ng-click="action.callback()">{{action.name | translate}}</button>
<button ng-repeat="action in notification.actions" ng-click="action.callback()" ng-class="action.className">{{action.name | translate}}</button>
</div>
</div>

View File

@@ -35,8 +35,11 @@ angular.module('notification').factory('NotificationAction', [function defineNot
*
* @param {Function} callback
* The callback to call when the user elects to perform this action.
*
* @param {String} className
* The CSS class to associate with this action, if any.
*/
var NotificationAction = function NotificationAction(name, callback) {
var NotificationAction = function NotificationAction(name, callback, className) {
/**
* Reference to this NotificationAction.
@@ -45,6 +48,13 @@ angular.module('notification').factory('NotificationAction', [function defineNot
*/
var action = this;
/**
* The CSS class associated with this action.
*
* @type String
*/
this.className = className;
/**
* The name of this action.
*