Changed button on campaign to say "Launch Campaign" - minor formatting fixes.

This commit is contained in:
Jordan Wright 2016-01-20 19:00:32 -06:00
parent 1b5fb638ea
commit 52e5c60511
2 changed files with 7 additions and 4 deletions

View file

@ -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()

View file

@ -121,7 +121,7 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" onclick="save()">Save changes</button>
<button type="button" class="btn btn-primary" onclick="launch()"><i class="fa fa-envelope"></i> Launch Campaign</button>
</div>
</div>
</div>