Moved datatables CSS/JS to dashboard to reduce loaded data throughout

This commit is contained in:
bmatt 2020-03-04 21:34:56 +00:00
parent 3114124b70
commit a9f9fec25f
2 changed files with 3 additions and 2 deletions

View file

@ -1,6 +1,9 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% block content %} {% block content %}
{% if is_admin_dashboard_activated %} {% if is_admin_dashboard_activated %}
<link rel=stylesheet type=text/css href="{{ url_for("static", filename='css/datatables.min.css') }}">
<script src="{{ url_for("static", filename="js/datatables.min.js") }}"></script>
<table id="bill_table" class="table table-striped"> <table id="bill_table" class="table table-striped">
<thead><tr><th>{{ _("Project") }}</th><th>{{ _("Number of members") }}</th><th>{{ _("Number of bills") }}</th><th>{{_("Newest bill")}}</th><th>{{_("Oldest bill")}}</th><th>{{_("Actions")}}</th></tr></thead> <thead><tr><th>{{ _("Project") }}</th><th>{{ _("Number of members") }}</th><th>{{ _("Number of bills") }}</th><th>{{_("Newest bill")}}</th><th>{{_("Oldest bill")}}</th><th>{{_("Actions")}}</th></tr></thead>
<tbody>{% for project in projects|sort(attribute='name') %} <tbody>{% for project in projects|sort(attribute='name') %}

View file

@ -6,14 +6,12 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel=stylesheet type=text/css href="{{ url_for("static", filename='css/main.css') }}"> <link rel=stylesheet type=text/css href="{{ url_for("static", filename='css/main.css') }}">
<link rel=stylesheet type=text/css href="{{ url_for("static", filename='css/datatables.min.css') }}">
<script src="{{ url_for("static", filename="js/jquery-3.1.1.min.js") }}"></script> <script src="{{ url_for("static", filename="js/jquery-3.1.1.min.js") }}"></script>
<script src="{{ url_for("static", filename="js/ihatemoney.js") }}"></script> <script src="{{ url_for("static", filename="js/ihatemoney.js") }}"></script>
<script src="{{ url_for("static", filename="js/tether.min.js") }}"></script> <script src="{{ url_for("static", filename="js/tether.min.js") }}"></script>
<script src="{{ url_for("static", filename="js/popper.min.js") }}"></script> <script src="{{ url_for("static", filename="js/popper.min.js") }}"></script>
<script src="{{ url_for("static", filename="js/tagsinput.js") }}"></script> <script src="{{ url_for("static", filename="js/tagsinput.js") }}"></script>
<script src="{{ url_for("static", filename="js/bootstrap.min.js") }}"></script> <script src="{{ url_for("static", filename="js/bootstrap.min.js") }}"></script>
<script src="{{ url_for("static", filename="js/datatables.min.js") }}"></script>
{% block head %}{% endblock %} {% block head %}{% endblock %}
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
$(document).ready(function(){ $(document).ready(function(){