Changed default sorting order in campaign tables to show most recent campaigns first. Fixes #426

pull/446/merge
Jordan Wright 2017-01-06 17:58:36 -06:00
parent b5100156f9
commit 22834c75a6
2 changed files with 10 additions and 4 deletions

View File

@ -312,7 +312,10 @@ $(document).ready(function() {
columnDefs: [{ columnDefs: [{
orderable: false, orderable: false,
targets: "no-sort" targets: "no-sort"
}] }],
order: [
[1, "desc"]
]
}); });
$.each(campaigns, function(i, campaign) { $.each(campaigns, function(i, campaign) {
label = labels[campaign.status] || "label-default"; label = labels[campaign.status] || "label-default";

View File

@ -56,7 +56,10 @@ $(document).ready(function() {
columnDefs: [{ columnDefs: [{
orderable: false, orderable: false,
targets: "no-sort" targets: "no-sort"
}] }],
order: [
[1, "desc"]
]
}); });
$.each(campaigns, function(i, campaign) { $.each(campaigns, function(i, campaign) {
var campaign_date = moment(campaign.created_date).format('MMMM Do YYYY, h:mm:ss a') var campaign_date = moment(campaign.created_date).format('MMMM Do YYYY, h:mm:ss a')