Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: notification.js

Issue 29326181: Issue 3022 - Implemented new notification type for normal messages (Closed)
Patch Set: Created Sept. 9, 2015, 1:12 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« lib/notificationHelper.js ('K') | « lib/notificationHelper.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: notification.js
===================================================================
--- a/notification.js
+++ b/notification.js
@@ -63,7 +63,9 @@
window.addEventListener("load", function()
{
var notification = getActiveNotification();
- if (!notification)
+ if (!notification
+ || notification.type == "question"
+ || notification.type == "normal")
return;
var texts = Notification.getLocalizedTexts(notification);
@@ -86,28 +88,6 @@
ext.pages.open(link.href);
});
- if (notification.type == "question")
- {
- document.getElementById("notification-question").addEventListener("click", function(event)
- {
- event.preventDefault();
- event.stopPropagation();
-
- var approved = false;
- switch (event.target.id)
- {
- case "notification-yes":
- approved = true;
- case "notification-no":
- Notification.triggerQuestionListeners(notification.id, approved);
- Notification.markAsShown(notification.id);
- notification.onClicked();
- break;
- }
- window.close();
- }, true);
- }
-
var notificationElement = document.getElementById("notification");
notificationElement.className = notification.type;
notificationElement.hidden = false;
« lib/notificationHelper.js ('K') | « lib/notificationHelper.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld