Skip to content

Commit

Permalink
Review and annotate BasicNotificationController
Browse files Browse the repository at this point in the history
  • Loading branch information
sethlu committed Oct 1, 2017
1 parent 1e3bda4 commit 1b9f3ff
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/notifications/BasicNotificationController.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@

var BasicNotificationController = NotificationController.createComponent("BasicNotificationController");
/**
* BasicNotificationController
* Concrete view controller for a notification.
* At view init this controller will register a time to automatically destroy the notification.
* @constructor
*/
let BasicNotificationController = NotificationController.createComponent("BasicNotificationController");

BasicNotificationController.createViewFragment = function () {
return cloneTemplate("#template-notification-basic");
Expand All @@ -12,6 +18,7 @@ BasicNotificationController.defineMethod("initView", function initView() {
delete this.notificationTimeout;
this.notification.destroy(true, true);
}.bind(this), this.notification.duration);

});

BasicNotificationController.defineMethod("uninitView", function uninitView() {
Expand All @@ -21,4 +28,5 @@ BasicNotificationController.defineMethod("uninitView", function uninitView() {
clearTimeout(this.notificationTimeout);
delete this.notificationTimeout;
}

});

0 comments on commit 1b9f3ff

Please sign in to comment.