working on campaign results page
pull/24/head
unknown 2015-07-07 22:31:21 -05:00
parent 4685b36928
commit a2252c1b5b
7 changed files with 24 additions and 19 deletions

View File

@ -68,7 +68,7 @@ table.dataTable th {
table.dataTable { table.dataTable {
clear: both; clear: both;
margin-top: 6px !important; margin-top: 6px !important;
margin-bottom: 6px !important; margin-bottom: 12px !important;
max-width: none !important; max-width: none !important;
} }

View File

@ -57,10 +57,10 @@ $(document).ready(function(){
campaignTable = $("#campaignTable").DataTable(); campaignTable = $("#campaignTable").DataTable();
$.each(campaigns, function(i, campaign){ $.each(campaigns, function(i, campaign){
campaignTable.row.add([ campaignTable.row.add([
moment(campaign.created_date).format('MMMM Do YYYY, h:mm:ss a'),
campaign.name, campaign.name,
campaign.status, moment(campaign.created_date).format('MMMM Do YYYY, h:mm:ss a'),
"<div class='pull-right'><button class='btn btn-success' onclick='alert(\"test\")'>\ "<span class=\"label label-primary\">" + campaign.status + "</span>",
"<div class='pull-right'><button class='btn btn-primary' onclick='alert(\"test\")'>\
<i class='fa fa-bar-chart'></i>\ <i class='fa fa-bar-chart'></i>\
</button>\ </button>\
<button class='btn btn-danger' onclick='alert(\"test\")'>\ <button class='btn btn-danger' onclick='alert(\"test\")'>\

View File

@ -93,7 +93,7 @@ function load(){
templateTable.row.add([ templateTable.row.add([
template.name, template.name,
moment(template.modified_date).format('MMMM Do YYYY, h:mm:ss a'), moment(template.modified_date).format('MMMM Do YYYY, h:mm:ss a'),
"<div class='pull-right'><button class='btn btn-success' onclick='alert(\"test\")'>\ "<div class='pull-right'><button class='btn btn-primary' onclick='alert(\"test\")'>\
<i class='fa fa-pencil'></i>\ <i class='fa fa-pencil'></i>\
</button>\ </button>\
<button class='btn btn-danger' onclick='alert(\"test\")'>\ <button class='btn btn-danger' onclick='alert(\"test\")'>\

View File

@ -108,7 +108,7 @@ function load(){
group.name, group.name,
targets, targets,
moment(group.modified_date).format('MMMM Do YYYY, h:mm:ss a'), moment(group.modified_date).format('MMMM Do YYYY, h:mm:ss a'),
"<div class='pull-right'><button class='btn btn-success' onclick='alert(\"test\")'>\ "<div class='pull-right'><button class='btn btn-primary' onclick='alert(\"test\")'>\
<i class='fa fa-pencil'></i>\ <i class='fa fa-pencil'></i>\
</button>\ </button>\
<button class='btn btn-danger' onclick='alert(\"test\")'>\ <button class='btn btn-danger' onclick='alert(\"test\")'>\

View File

@ -50,17 +50,17 @@
</div> </div>
<div class="navbar-collapse collapse"> <div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li><a href="#/">Dashboard</a> <li><a href="/">Dashboard</a>
</li> </li>
<li><a href="#/campaigns">Campaigns</a> <li><a href="/campaigns">Campaigns</a>
</li> </li>
<li><a href="#/users">Users &amp; Groups</a> <li><a href="/users">Users &amp; Groups</a>
</li> </li>
<li><a href="#/templates">Email Templates</a> <li><a href="/templates">Email Templates</a>
</li> </li>
<li><a href="#/landing_pages">Landing Pages</a> <li><a href="/landing_pages">Landing Pages</a>
</li> </li>
<li><a href="#/settings">Settings</a> <li><a href="/settings">Settings</a>
</li> </li>
<li><a href="/api/">API Documentation</a> <li><a href="/api/">API Documentation</a>
</li> </li>

View File

@ -3,9 +3,9 @@
<div class="row"> <div class="row">
<div class="col-sm-3 col-md-2 sidebar"> <div class="col-sm-3 col-md-2 sidebar">
<ul class="nav nav-sidebar"> <ul class="nav nav-sidebar">
<li><a href="#">Dashboard</a> <li><a href="/">Dashboard</a>
</li> </li>
<li class="active"><a href="#/campaigns">Campaigns</a> <li class="active"><a href="/campaigns">Campaigns</a>
</li> </li>
<li><a href="/users">Users &amp; Groups</a> <li><a href="/users">Users &amp; Groups</a>
</li> </li>
@ -24,7 +24,7 @@
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main" ng-controller="CampaignResultsCtrl"> <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main" ng-controller="CampaignResultsCtrl">
<div ng-show="campaign"> <div ng-show="campaign">
<div class="row"> <div class="row">
<h1 class="page-header">Results for {{campaign.name}}</h1> <h1 class="page-header">Results for campaign.name</h1>
</div> </div>
<div class="row"> <div class="row">
<div class="btn-group"> <div class="btn-group">
@ -39,7 +39,7 @@
</li> </li>
</ul> </ul>
</div> </div>
<button type="button" class="btn btn-danger" tooltip="Delete Campaign" tooltip-placement="right" ng-click="delete(campaign)" ng-href="#/dashboard"><i class="fa fa-times fa-lg"></i> <button type="button" class="btn btn-danger" tooltip="Delete Campaign" tooltip-placement="right" ng-click="delete(campaign)" ng-href="/dashboard"><i class="fa fa-times fa-lg"></i>
</button> </button>
</div> </div>
<br /> <br />
@ -65,8 +65,8 @@
<table ng-table="mainTableParams" class="table table-hover table-striped table-bordered"> <table ng-table="mainTableParams" class="table table-hover table-striped table-bordered">
<tbody> <tbody>
<tr ng-repeat="result in $data" class="editable-row"> <tr ng-repeat="result in $data" class="editable-row">
<td data-title="'Email'" class="col-sm-1">{{result.email}}</td> <td data-title="'Email'" class="col-sm-1">result.email</td>
<td data-title="'Status'" class="col-sm-2">{{result.status}}</td> <td data-title="'Status'" class="col-sm-2">result.status</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -81,3 +81,8 @@
</div> </div>
</div> </div>
{{end}} {{end}}
{{define "scripts"}}
<script src="/js/hogan.js"></script>
<script src="/js/typeahead.min.js"></script>
<script src="/js/app/campaign_results.js"></script>
{{end}}

View File

@ -41,8 +41,8 @@
<table id="campaignTable" class="table" style="display:none;"> <table id="campaignTable" class="table" style="display:none;">
<thead> <thead>
<tr> <tr>
<th>Created Date</th>
<th>Name</th> <th>Name</th>
<th>Created Date</th>
<th>Status</th> <th>Status</th>
<th class="col-md-2"></th> <th class="col-md-2"></th>
</tr> </tr>