diff --git a/static/css/main.css b/static/css/main.css index 8e748e37..4c6c4656 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -420,12 +420,16 @@ table.dataTable thead .sorting_desc:after { height:36px; text-align:center; border-radius:50%; - background-color:#f05b4f; } .timeline-icon>i{ - margin-top:8px; + margin-top:10px; color:#ffffff; } .timeline-message { padding-left:30px; } +.timeline-date { + float:right; + color:#999999; + font-style:italic; +} diff --git a/static/js/app/campaign_results.js b/static/js/app/campaign_results.js index 27331b9a..82dc22d3 100644 --- a/static/js/app/campaign_results.js +++ b/static/js/app/campaign_results.js @@ -5,32 +5,42 @@ var statuses = { "Email Sent": { slice: "ct-slice-donut-sent", legend: "ct-legend-sent", - label: "label-success" + label: "label-success", + icon: "fa-envelope" }, "Email Opened": { slice: "ct-slice-donut-opened", legend: "ct-legend-opened", - label: "label-warning" + label: "label-warning", + icon: "fa-envelope" }, "Clicked Link": { slice: "ct-slice-donut-clicked", legend: "ct-legend-clicked", - label: "label-danger" + label: "label-danger", + icon: "fa-mouse-pointer" }, "Success": { slice: "ct-slice-donut-clicked", legend: "ct-legend-clicked", - label: "label-danger" + label: "label-danger", + icon: "fa-exclamation" }, "Error": { slice: "ct-slice-donut-error", legend: "ct-legend-error", - label: "label-default" + label: "label-default", + icon: "fa-times" }, "Unknown": { slice: "ct-slice-donut-error", legend: "ct-legend-error", - label: "label-default" + label: "label-default", + icon: "fa-question" + }, + "Campaign Created": { + label: "label-success", + icon: "fa-rocket" } } @@ -76,32 +86,28 @@ function exportAsCSV() { $("#exportButton").html(exportHTML) } -/*function eventToHtml(e, r) { - if !(event.email) { - - } -}*/ - function renderTimeline(data) { record = { - "first_name": data[1], - "last_name": data[2], - "email": data[3], - "position": data[4] - } - //the Email is index 3 - results = '
' + + "first_name": data[1], + "last_name": data[2], + "email": data[3], + "position": data[4] + } + results = '
' + '
Timeline for ' + record.first_name + ' ' + record.last_name + '
Email: ' + record.email + '' + - '
' + '
' $.each(campaign.timeline, function(i, event) { if (!event.email || event.email == record.email) { + // Add the event results += '
' + - '
' + - '
' + - '
' + event.message + '
' - results += '
' - //results += eventToHtml(event, record) + '
' + results += + '
' + + '
' + + '
' + event.message + + ' ' + moment(event.time).format('MMMM Do YYYY h:mm') + '
' + results += '
' } }) results += '
' @@ -193,8 +199,12 @@ $(document).ready(function() { // This row is already open - close it row.child.hide(); tr.removeClass('shown'); + $(this).find("i").removeClass("fa-caret-down") + $(this).find("i").addClass("fa-caret-right") } else { // Open this row + $(this).find("i").removeClass("fa-caret-right") + $(this).find("i").addClass("fa-caret-down") row.child(renderTimeline(row.data())).show(); tr.addClass('shown'); } diff --git a/templates/campaign_results.html b/templates/campaign_results.html index 66df1283..f1877273 100644 --- a/templates/campaign_results.html +++ b/templates/campaign_results.html @@ -85,7 +85,7 @@ - +
First Name Last Name Email