Commit fdee1c62 authored by Floréal Cabanettes's avatar Floréal Cabanettes

Add tfoot + check all action

parent ccd4fba9
panel = {};
\ No newline at end of file
if (!panel) {
throw "panel was not included!"
}
panel.recipes = {};
panel.recipes.init = function () {
panel.recipes.init_events();
};
panel.recipes.init_events = function () {
$("div.list-recipes table thead tr th:first-child input[type=checkbox], div.list-recipes table tfoot tr th:first-child input[type=checkbox]").click(function () {
panel.recipes.check_all(this.checked);
});
};
panel.recipes.check_all = function (check) {
$("div.list-recipes table tr td:first-child input[type=checkbox]," +
"div.list-recipes table tr th:first-child input[type=checkbox]").prop("checked", check);
};
\ No newline at end of file
......@@ -26,7 +26,7 @@
<!-- main style -->
<link rel="stylesheet" type="text/css" href="{% static 'css/style_panel.css' %}">
</head>
<body class="hold-transition skin-red sidebar-mini">
<body class="hold-transition skin-red sidebar-mini" onload="{% block onload %}{% endblock %}">
<div class="wrapper">
<!-- Main Header -->
<header class="main-header">
......@@ -249,21 +249,25 @@
</div>
</div>
<!--jQuery 3 -->
<script src="{% static 'js/jquery-3.2.1.min.js' %}" type="text/javascript"></script>
<!--jQuery UI 1.11.4 -->
<script src="{% static 'js/jquery-ui.min.js' %}" type="text/javascript"></script>
<!-- Bootstrap 3.3.7 -->
<script src="{% static 'js/bootstrap.min.js' %}" type="text/javascript"></script>
<!-- datepicker -->
<script src="{% static 'js/bootstrap-datepicker.min.js' %}" type="text/javascript"></script>
<!-- Bootstrap WYSIHTML5 -->
<script src="{% static 'js/bootstrap3-wysihtml5.all.min.js' %}" type="text/javascript"></script>
<!-- Slimscroll -->
<script src="{% static 'js/jquery.slimscroll.min.js' %}" type="text/javascript"></script>
<!-- FastClick -->
<script src="{% static 'js/fastclick.js' %}" type="text/javascript"></script>
<!-- AdminLTE App -->
<script src="{% static 'adminlte/js/adminlte.min.js' %}" type="text/javascript"></script>
{% block scripts %}
<!--jQuery 3 -->
<script src="{% static 'js/jquery-3.2.1.min.js' %}" type="text/javascript"></script>
<!--jQuery UI 1.11.4 -->
<script src="{% static 'js/jquery-ui.min.js' %}" type="text/javascript"></script>
<!-- Bootstrap 3.3.7 -->
<script src="{% static 'js/bootstrap.min.js' %}" type="text/javascript"></script>
<!-- datepicker -->
<script src="{% static 'js/bootstrap-datepicker.min.js' %}" type="text/javascript"></script>
<!-- Bootstrap WYSIHTML5 -->
<script src="{% static 'js/bootstrap3-wysihtml5.all.min.js' %}" type="text/javascript"></script>
<!-- Slimscroll -->
<script src="{% static 'js/jquery.slimscroll.min.js' %}" type="text/javascript"></script>
<!-- FastClick -->
<script src="{% static 'js/fastclick.js' %}" type="text/javascript"></script>
<!-- AdminLTE App -->
<script src="{% static 'adminlte/js/adminlte.min.js' %}" type="text/javascript"></script>
<!-- Panel javascript -->
<script src="{% static 'js/panel.js' %}" defer></script>
{% endblock %}
</body>
</html>
\ No newline at end of file
{% extends "panel/base.html" %}
{% load staticfiles %}
{% load l10n %}
{% load i18n %}
{% load bootstrap_pagination %}
{% block scripts %}
{{ block.super }}
<script src="{% static 'js/panel.recipes.js' %}" defer></script>
{% endblock %}
{% block onload %}
panel.recipes.init();
{% endblock %}
{% block content %}
<section class="content-header">
<h1>
......@@ -117,6 +125,31 @@
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<th>
<input type="checkbox" class="select-all"/>
</th>
<th>
{% trans "Title" %}
</th>
<th>
{% trans "Author" %}
</th>
<th>
{% trans "Categories" %}
</th>
<th>
<i class="fa fa-comment" aria-hidden="true"></i>
</th>
<th>
{% trans "Date" %}
</th>
<th>
{% trans "Thumb" %}
</th>
</tr>
</tfoot>
</table>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment