From 8c29423d6ddbd24b6fa3d8de63beb115ca88589f Mon Sep 17 00:00:00 2001 From: jkaplon <jody@kaplon.us> Date: Fri, 7 Aug 2015 12:00:08 -0400 Subject: [PATCH] Rows turning red...finally, might want to pick a less blinding red. --- server.js | 4 ++-- views/core.hbs | 2 +- views/default.hbs | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/server.js b/server.js index bb10574..0653318 100644 --- a/server.js +++ b/server.js @@ -179,8 +179,8 @@ app.get('/core/:id', function(req, res){ row.pubDate = alertmonUtils.getLocDateFromUTC(row.published_at); row.pubTime = alertmonUtils.getLocTimeFromUTC(row.published_at); if(row.status.toLowerCase().indexOf('alert') > -1){ - row.isAlert = 1; - } + row.rowClass = 'alert-row'; + } else { row.rowClass = 'non-alert-row'; } }); res.render('core', {alerts: rows}, function(err, html) { diff --git a/views/core.hbs b/views/core.hbs index 4b17dbd..9ad6751 100644 --- a/views/core.hbs +++ b/views/core.hbs @@ -23,7 +23,7 @@ </thead> <tbody> {{#each alerts}} - <tr class=\"{{this.isAlert}}\"> + <tr class="{{this.rowClass}}"> <td>{{this.pubDate}}</td> <td>{{this.pubTime}}</td> <td>{{this.status}}</td> diff --git a/views/default.hbs b/views/default.hbs index 512e66a..16e2668 100644 --- a/views/default.hbs +++ b/views/default.hbs @@ -13,6 +13,8 @@ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <!-- Optional theme --> <!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css"> --> + + <style type="text/css">tr.alert-row {background-color:#FF0000 !important;} </style> </head> <body class="container-fluid">