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