aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2020-03-09 16:48:07 +0000
committerMatthew Lemon <matt@matthewlemon.com>2020-03-09 16:48:07 +0000
commit0f2c9fc6fddb7a1e435ab7d1ca8962383a7cc731 (patch)
tree66f7ca0a1044c2eecc78e191faf3e77e193d4b84
parenta6afdd43f465099a8b77d72102bf44851b6960e1 (diff)
added CDN install of DataTables
-rw-r--r--ctrack/caf/templates/caf/applicablesystem_list.html4
-rw-r--r--ctrack/static/js/project.js3
-rw-r--r--ctrack/templates/base.html5
3 files changed, 10 insertions, 2 deletions
diff --git a/ctrack/caf/templates/caf/applicablesystem_list.html b/ctrack/caf/templates/caf/applicablesystem_list.html
index a2e7c43..f0ba634 100644
--- a/ctrack/caf/templates/caf/applicablesystem_list.html
+++ b/ctrack/caf/templates/caf/applicablesystem_list.html
@@ -4,12 +4,14 @@
{% block title %}Applicable Systems{% endblock %}
{% block content %}
+
+
<div class="container">
<div class="row">
<div class="col-sm-12">
<h3>Applicable Systems</h3>
- <table class="table-sm table-striped table-bordered">
+ <table id="datatable" class="display" style="width:100%">
<thead>
<tr>
<th>Organisation</th>
diff --git a/ctrack/static/js/project.js b/ctrack/static/js/project.js
index d26d23b..2df7245 100644
--- a/ctrack/static/js/project.js
+++ b/ctrack/static/js/project.js
@@ -1 +1,4 @@
/* Project specific Javascript goes here. */
+$(document).ready(function() {
+ $('#datatable').DataTable();
+} );
diff --git a/ctrack/templates/base.html b/ctrack/templates/base.html
index 7ed25a7..903fac8 100644
--- a/ctrack/templates/base.html
+++ b/ctrack/templates/base.html
@@ -26,7 +26,8 @@
<!-- This file stores project-specific CSS -->
<link href="{% static 'css/project.css' %}" rel="stylesheet">
-
+{# <link rel="stylesheet" type="text/css" href="css/DataTables/datatables.min.css"/>#}
+ <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.20/af-2.3.4/b-1.6.1/cr-1.5.2/r-2.2.3/datatables.min.css"/>
{% endblock %}
@@ -106,6 +107,8 @@
<!-- place project specific Javascript in this file -->
<script src="{% static 'js/project.js' %}"></script>
+{# <script src="{% static 'js/DataTables/datatables.min.js' %}"></script>#}
+ <script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.20/af-2.3.4/b-1.6.1/cr-1.5.2/r-2.2.3/datatables.min.js"></script>
{% endblock javascript %}