Added jsdoc and moved MessageController to dialogs from notifications

This commit is contained in:
Henry
2015-10-22 15:10:53 -07:00
parent 0053989de8
commit 109ae3323d
5 changed files with 55 additions and 16 deletions

View File

@@ -25,10 +25,29 @@ define(
['../../../notification/src/MessageSeverity'],
function (MessageSeverity) {
"use strict";
/**
* A controller for banner notifications. Banner notifications are a
* non-blocking way of drawing the user's attention to an event such
* as system errors, or the progress or successful completion of an
* ongoing task. This controller provides scoped functions for
* dismissing and 'maximizing' notifications. See {@link NotificationService}
* for more details on Notifications.
*
* @param $scope
* @param notificationService
* @param dialogService
* @constructor
*/
function BannerController($scope, notificationService, dialogService) {
$scope.active = notificationService.active;
$scope.MessageSeverity = MessageSeverity;
$scope.action = function (action, $event){
/*
Prevents default 'maximize' behaviour when clicking on
notification button
*/
$event.stopPropagation();
return action();
};