From 122ab148a4171a1992a3f5468966691cf05c788e Mon Sep 17 00:00:00 2001 From: Adarnof Date: Thu, 8 Jun 2017 21:31:19 -0400 Subject: [PATCH] Move DataTables source to cdnjs --- corputils/templates/corputils/corpstats.html | 32 ++++++-------------- corputils/templates/corputils/search.html | 16 +++++----- stock/templates/bundles/datatables-css.html | 3 ++ stock/templates/bundles/datatables-js.html | 4 +++ 4 files changed, 24 insertions(+), 31 deletions(-) create mode 100644 stock/templates/bundles/datatables-css.html create mode 100644 stock/templates/bundles/datatables-js.html diff --git a/corputils/templates/corputils/corpstats.html b/corputils/templates/corputils/corpstats.html index 6a50734c..af872a09 100644 --- a/corputils/templates/corputils/corpstats.html +++ b/corputils/templates/corputils/corpstats.html @@ -24,18 +24,6 @@ -
-
- {% trans "Registration Index" %} -
-
- {{ corpstats.registered_member_count }}/{{ corpstats.member_count }} -
-
-
-
@@ -180,16 +168,16 @@ {% endif %} {% endblock %} {% block extra_javascript %} - - + {% include 'bundles/datatables-js.html' %} {% endblock %} {% block extra_css %} - + {% include 'bundles/datatables-css.html' %} {% endblock %} +{% block extra_script %} + $(document).ready(function(){ + $('#table-mains').DataTable(); + $('#table-members').DataTable(); + $('#table-unregistered').DataTable(); + + }); +{% endblock %} \ No newline at end of file diff --git a/corputils/templates/corputils/search.html b/corputils/templates/corputils/search.html index e812705b..85d482b9 100644 --- a/corputils/templates/corputils/search.html +++ b/corputils/templates/corputils/search.html @@ -1,6 +1,5 @@ {% extends "corputils/base.html" %} {% load i18n %} -{% load bootstrap_pagination %} {% block member_data %}
@@ -37,14 +36,13 @@
{% endblock %} {% block extra_javascript %} - - + {% include 'bundles/datatables-js.html' %} {% endblock %} {% block extra_css %} - + {% include 'bundles/datatables-css.html' %} +{% endblock %} +{% block extra_script %} + $(document).ready(function(){ + $('#table-search').DataTable(); + }); {% endblock %} \ No newline at end of file diff --git a/stock/templates/bundles/datatables-css.html b/stock/templates/bundles/datatables-css.html new file mode 100644 index 00000000..5cab0bb1 --- /dev/null +++ b/stock/templates/bundles/datatables-css.html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/stock/templates/bundles/datatables-js.html b/stock/templates/bundles/datatables-js.html new file mode 100644 index 00000000..648fb1bb --- /dev/null +++ b/stock/templates/bundles/datatables-js.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file