mirror of https://github.com/gophish/gophish
UI fixes to dashboard, campaign, and campaign_result views. fixes #76
parent
44852546e0
commit
e6a9848c20
|
@ -47,7 +47,7 @@ function deleteCampaign() {
|
|||
if (confirm("Are you sure you want to delete: " + campaign.name + "?")) {
|
||||
api.campaignId.delete(campaign.id)
|
||||
.success(function(msg) {
|
||||
console.log(msg)
|
||||
document.location.href = '/campaigns'
|
||||
})
|
||||
.error(function(e) {
|
||||
$("#modal\\.flashes").empty().append("<div style=\"text-align:center\" class=\"alert alert-danger\">\
|
||||
|
|
|
@ -58,7 +58,7 @@ function deleteCampaign(idx) {
|
|||
api.campaignId.delete(campaigns[idx].id)
|
||||
.success(function(data) {
|
||||
successFlash(data.message)
|
||||
load()
|
||||
location.reload()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -113,10 +113,10 @@ $(document).ready(function() {
|
|||
campaign.name,
|
||||
moment(campaign.created_date).format('MMMM Do YYYY, h:mm:ss a'),
|
||||
"<span class=\"label " + label + "\">" + campaign.status + "</span>",
|
||||
"<div class='pull-right'><a class='btn btn-primary' href='/campaigns/" + campaign.id + "'>\
|
||||
"<div class='pull-right'><a class='btn btn-primary' href='/campaigns/" + campaign.id + "' data-toggle='tooltip' data-placement='right' title='View Results'>\
|
||||
<i class='fa fa-bar-chart'></i>\
|
||||
</a>\
|
||||
<button class='btn btn-danger' onclick='deleteCampaign(" + i + ")'>\
|
||||
<button class='btn btn-danger' onclick='deleteCampaign(" + i + ")' data-toggle='tooltip' data-placement='right' title='Delete Campaign'>\
|
||||
<i class='fa fa-trash-o'></i>\
|
||||
</button></div>"
|
||||
]).draw()
|
||||
|
|
|
@ -14,6 +14,8 @@ function deleteCampaign(idx) {
|
|||
api.campaignId.delete(campaigns[idx].id)
|
||||
.success(function(data) {
|
||||
successFlash(data.message)
|
||||
load()
|
||||
//location.reload()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -58,10 +60,10 @@ $(document).ready(function() {
|
|||
campaign.name,
|
||||
campaign_date,
|
||||
"<span class=\"label " + label + "\">" + campaign.status + "</span>",
|
||||
"<div class='pull-right'><a class='btn btn-primary' href='/campaigns/" + campaign.id + "'>\
|
||||
"<div class='pull-right'><a class='btn btn-primary' href='/campaigns/" + campaign.id + "' data-toggle='tooltip' data-placement='right' title='View Results'>\
|
||||
<i class='fa fa-bar-chart'></i>\
|
||||
</a>\
|
||||
<button class='btn btn-danger' onclick='deleteCampaign(" + i + ")'>\
|
||||
<button class='btn btn-danger' onclick='deleteCampaign(" + i + ")' data-toggle='tooltip' data-placement='right' title='Delete Campaign'>\
|
||||
<i class='fa fa-trash-o'></i>\
|
||||
</button></div>"
|
||||
]).draw()
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
</div>
|
||||
-->
|
||||
<button type="button" class="btn btn-danger" data-toggle="tooltip" data-placement="right" title="Delete Campaign" onclick="deleteCampaign()">
|
||||
<i class="fa fa-times fa-lg"></i>
|
||||
<i class="fa fa-trash-o fa-lg"></i>
|
||||
</button>
|
||||
</div>
|
||||
<br />
|
||||
|
|
|
@ -127,7 +127,7 @@
|
|||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{define "scripts"}}
|
||||
{{define "scripts"}}i
|
||||
<script src="/js/hogan.js"></script>
|
||||
<script src="/js/typeahead.min.js"></script>
|
||||
<script src="/js/app/campaigns.js"></script>
|
||||
|
|
Loading…
Reference in New Issue