diff --git a/static/js/app/campaign_results.js b/static/js/app/campaign_results.js index 002f0a57..b4c78c06 100644 --- a/static/js/app/campaign_results.js +++ b/static/js/app/campaign_results.js @@ -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("
\ diff --git a/static/js/app/campaigns.js b/static/js/app/campaigns.js index 1cf81a17..a4ebc0d1 100644 --- a/static/js/app/campaigns.js +++ b/static/js/app/campaigns.js @@ -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'), "" + campaign.status + "", - "
\ + "
\ \ \ -
" ]).draw() diff --git a/static/js/app/dashboard.js b/static/js/app/dashboard.js index 59a03c29..37a3f379 100644 --- a/static/js/app/dashboard.js +++ b/static/js/app/dashboard.js @@ -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, "" + campaign.status + "", - "
\ + "
\ \ \ -
" ]).draw() diff --git a/templates/campaign_results.html b/templates/campaign_results.html index 8bba8327..bad1058f 100644 --- a/templates/campaign_results.html +++ b/templates/campaign_results.html @@ -45,7 +45,7 @@
-->

diff --git a/templates/campaigns.html b/templates/campaigns.html index 8c8354c6..105b4c73 100644 --- a/templates/campaigns.html +++ b/templates/campaigns.html @@ -127,7 +127,7 @@
{{end}} -{{define "scripts"}} +{{define "scripts"}}i