diff --git a/static/js/app/campaigns.js b/static/js/app/campaigns.js index 4c3a1045..6ef3159b 100644 --- a/static/js/app/campaigns.js +++ b/static/js/app/campaigns.js @@ -95,7 +95,11 @@ $(document).ready(function(){ $("#loading").hide() if (campaigns.length > 0){ $("#campaignTable").show() - campaignTable = $("#campaignTable").DataTable(); + campaignTable = $("#campaignTable").DataTable({ + columnDefs: [ + { orderable: false, targets: "no-sort" } + ] + }); $.each(campaigns, function(i, campaign){ label = labels[campaign.status] || "label-default"; campaignTable.row.add([ @@ -131,7 +135,11 @@ $(document).ready(function(){ return false; }) // Create the group typeahead objects - groupTable = $("#groupTable").DataTable() + groupTable = $("#groupTable").DataTable({ + columnDefs: [ + { orderable: false, targets: "no-sort" } + ] + }) group_bh = new Bloodhound({ datumTokenizer: function(g) { return Bloodhound.tokenizers.whitespace(g.name) }, queryTokenizer: Bloodhound.tokenizers.whitespace, diff --git a/static/js/app/dashboard.js b/static/js/app/dashboard.js index c8445b9f..81084adf 100644 --- a/static/js/app/dashboard.js +++ b/static/js/app/dashboard.js @@ -33,7 +33,11 @@ $(document).ready(function(){ showLabel: false } var average = 0 - campaignTable = $("#campaignTable").DataTable(); + campaignTable = $("#campaignTable").DataTable({ + columnDefs: [ + { orderable: false, targets: "no-sort" } + ] + }); $.each(campaigns, function(i, campaign){ var campaign_date = moment(campaign.created_date).format('MMMM Do YYYY h:mm:ss a') var label = labels[campaign.status] || "label-default"; diff --git a/static/js/app/landing_pages.js b/static/js/app/landing_pages.js index dd7b30cb..edbead61 100644 --- a/static/js/app/landing_pages.js +++ b/static/js/app/landing_pages.js @@ -92,7 +92,11 @@ function load(){ $("#loading").hide() if (pages.length > 0){ $("#pagesTable").show() - pagesTable = $("#pagesTable").DataTable(); + pagesTable = $("#pagesTable").DataTable({ + columnDefs: [ + { orderable: false, targets: "no-sort" } + ] + }); pagesTable.clear() $.each(pages, function(i, page){ pagesTable.row.add([ diff --git a/static/js/app/templates.js b/static/js/app/templates.js index 4da16ac1..85ece065 100644 --- a/static/js/app/templates.js +++ b/static/js/app/templates.js @@ -178,7 +178,11 @@ function load(){ $("#loading").hide() if (templates.length > 0){ $("#templateTable").show() - templateTable = $("#templateTable").DataTable(); + templateTable = $("#templateTable").DataTable({ + columnDefs: [ + { orderable: false, targets: "no-sort" } + ] + }); templateTable.clear() $.each(templates, function(i, template){ templateTable.row.add([ diff --git a/static/js/app/users.js b/static/js/app/users.js index 0aa8c68c..5a9a7d37 100644 --- a/static/js/app/users.js +++ b/static/js/app/users.js @@ -53,8 +53,9 @@ function dismiss(){ function edit(idx){ targets = $("#targetsTable").dataTable({ + destroy: true,// Destroy any other instantiated table - http://datatables.net/manual/tech-notes/3#destroy columnDefs: [ - { orderable: false, targets: -1 } + { orderable: false, targets: "no-sort" } ] }) $("#modalSubmit").unbind('click').click(function(){save(idx)}) @@ -123,7 +124,11 @@ function load(){ groups = gs $("#emptyMessage").hide() $("#groupTable").show() - groupTable = $("#groupTable").DataTable(); + groupTable = $("#groupTable").DataTable({ + columnDefs: [ + { orderable: false, targets: "no-sort" } + ] + }); groupTable.clear(); $.each(groups, function(i, group){ var targets = "" diff --git a/templates/campaigns.html b/templates/campaigns.html index 8c8354c6..e2c3c48b 100644 --- a/templates/campaigns.html +++ b/templates/campaigns.html @@ -47,7 +47,7 @@ Name Created Date Status - + @@ -113,7 +113,7 @@ - +
Group Name
diff --git a/templates/dashboard.html b/templates/dashboard.html index 3d652870..52083259 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -67,7 +67,7 @@ Name Created Date Status - + diff --git a/templates/landing_pages.html b/templates/landing_pages.html index 837307ad..6efe51f8 100644 --- a/templates/landing_pages.html +++ b/templates/landing_pages.html @@ -44,7 +44,7 @@ Name Last Modified Date - + diff --git a/templates/templates.html b/templates/templates.html index 70fde2d6..ac84b37f 100644 --- a/templates/templates.html +++ b/templates/templates.html @@ -46,7 +46,7 @@ Name Modified Date - + diff --git a/templates/users.html b/templates/users.html index 4d25e4fd..00812643 100644 --- a/templates/users.html +++ b/templates/users.html @@ -47,7 +47,7 @@ Name Members Modified Date - + @@ -101,7 +101,7 @@ Last Name Email Position - +