mirror of
https://github.com/gophish/gophish
synced 2024-11-15 00:37:14 +00:00
Changed default sorting order in campaign tables to show most recent campaigns first. Fixes #426
This commit is contained in:
parent
b5100156f9
commit
22834c75a6
2 changed files with 10 additions and 4 deletions
|
@ -241,14 +241,14 @@ function copy(idx) {
|
|||
})
|
||||
// Set our initial values
|
||||
api.campaignId.get(campaigns[idx].id)
|
||||
.success(function(campaign){
|
||||
.success(function(campaign) {
|
||||
$("#name").val("Copy of " + campaign.name)
|
||||
$("#template").val(campaign.template.name)
|
||||
$("#page").val(campaign.page.name)
|
||||
$("#profile").val(campaign.smtp.name)
|
||||
$("#url").val(campaign.url)
|
||||
})
|
||||
.error(function(data){
|
||||
.error(function(data) {
|
||||
$("#modal\\.flashes").empty().append("<div style=\"text-align:center\" class=\"alert alert-danger\">\
|
||||
<i class=\"fa fa-exclamation-circle\"></i> " + data.responseJSON.message + "</div>")
|
||||
})
|
||||
|
@ -312,7 +312,10 @@ $(document).ready(function() {
|
|||
columnDefs: [{
|
||||
orderable: false,
|
||||
targets: "no-sort"
|
||||
}]
|
||||
}],
|
||||
order: [
|
||||
[1, "desc"]
|
||||
]
|
||||
});
|
||||
$.each(campaigns, function(i, campaign) {
|
||||
label = labels[campaign.status] || "label-default";
|
||||
|
|
|
@ -56,7 +56,10 @@ $(document).ready(function() {
|
|||
columnDefs: [{
|
||||
orderable: false,
|
||||
targets: "no-sort"
|
||||
}]
|
||||
}],
|
||||
order: [
|
||||
[1, "desc"]
|
||||
]
|
||||
});
|
||||
$.each(campaigns, function(i, campaign) {
|
||||
var campaign_date = moment(campaign.created_date).format('MMMM Do YYYY, h:mm:ss a')
|
||||
|
|
Loading…
Reference in a new issue