Fixed recent campaign status colors on the dashboard (regression from 80c68194a6)

This commit is contained in:
Jordan Wright 2017-06-19 12:34:45 -05:00
parent dd905ecb3a
commit ad45915aa2
2 changed files with 12 additions and 3 deletions

File diff suppressed because one or more lines are too long

View file

@ -9,13 +9,22 @@ var statuses = {
icon: "fa-envelope",
point: "ct-point-sent"
},
"Email Sent": {
"Emails Sent": {
slice: "ct-slice-donut-sent",
legend: "ct-legend-sent",
label: "label-success",
icon: "fa-envelope",
point: "ct-point-sent"
},
"In progress": {
label: "label-primary"
},
"Queued": {
label: "label-info"
},
"Completed": {
label: "label-success"
},
"Email Opened": {
slice: "ct-slice-donut-opened",
legend: "ct-legend-opened",
@ -199,7 +208,7 @@ $(document).ready(function() {
});
$.each(campaigns, function(i, campaign) {
var campaign_date = moment(campaign.created_date).format('MMMM Do YYYY, h:mm:ss a')
var label = statuses[campaign.status] || "label-default";
var label = statuses[campaign.status].label || "label-default";
//section for tooltips on the status of a campaign to show some quick stats
var launchDate;
if (moment(campaign.launch_date).isAfter(moment())) {