From 52e5c6051142f9e5c7b8866e3c8eccda180831cf Mon Sep 17 00:00:00 2001 From: Jordan Wright Date: Wed, 20 Jan 2016 19:00:32 -0600 Subject: [PATCH] Changed button on campaign to say "Launch Campaign" - minor formatting fixes. --- static/js/app/campaigns.js | 9 ++++++--- templates/campaigns.html | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/static/js/app/campaigns.js b/static/js/app/campaigns.js index 6f009d1d..3c5e18a2 100644 --- a/static/js/app/campaigns.js +++ b/static/js/app/campaigns.js @@ -11,7 +11,10 @@ var labels = { var campaigns = [] // Save attempts to POST to /campaigns/ -function save() { +function launch() { + if (!confirm("This will launch the campaign. Are you sure?")) { + return false; + } groups = [] $.each($("#groupTable").DataTable().rows().data(), function(i, group) { groups.push({ @@ -58,7 +61,7 @@ function deleteCampaign(idx) { api.campaignId.delete(campaigns[idx].id) .success(function(data) { successFlash(data.message) - location.reload() + location.reload() }) } } @@ -102,7 +105,7 @@ function edit(campaign) { $(document).ready(function() { api.campaigns.get() .success(function(cs) { - campaigns = cs + campaigns = cs $("#loading").hide() if (campaigns.length > 0) { $("#campaignTable").show() diff --git a/templates/campaigns.html b/templates/campaigns.html index 8c8354c6..16732340 100644 --- a/templates/campaigns.html +++ b/templates/campaigns.html @@ -121,7 +121,7 @@