Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

enhancement to highlight all alerts not seen #297

Benjamin3360029398e9
diff --git a/web/js/notifications/wv.notifications.ui.js b/web/js/notifications/wv.notifications.ui.js
index 3ff9f388f..5bde471ce 100644
--- a/web/js/notifications/wv.notifications.ui.js
+++ b/web/js/notifications/wv.notifications.ui.js
@@ -432,10 +432,13 @@ wv.notifications.ui = wv.notifications.ui || function(models, config) {
* @returns {Object} Jquery ul element
*/
var create$block = function(arra, title) {
- var $li, date, activeClass, $ul = $('<ul></ul>');
+ var $li, date, numNotSeen, activeClass, $ul = $('<ul></ul>');
+
+ numNotSeen = getNumberOfTypeNotseen(title, sortedNotifications[title + 's']);
+
for(var i = 0, len = arra.length; i < len; i++) {
activeClass = '';
- if(activeNotifications[title] && i === 0) {
+ if(activeNotifications[title] && i < numNotSeen) {
activeClass = title;
}
date = new Date(arra[i].created_at);