Fix #180. Adjustment in table style.

This commit is contained in:
Khanh Ngo 2018-04-01 15:48:08 +07:00
parent bfb54e8bda
commit 6fa8ae37f0
2 changed files with 23 additions and 12 deletions

View file

@ -78,13 +78,24 @@
// set up user data table // set up user data table
$("#tbl_users").DataTable({ $("#tbl_users").DataTable({
"paging" : true, "paging" : true,
"lengthChange" : false, "lengthChange" : true,
"searching" : true, "searching" : true,
"ordering" : true, "ordering" : true,
"info" : true, "info" : false,
"autoWidth" : false "autoWidth" : false,
"lengthMenu": [ [10, 25, 50, 100, -1],
[10, 25, 50, 100, "All"]],
"pageLength": 10
}); });
// avoid losing icheck box style when database refreshed
$('#tbl_users').on('draw.dt', function () {
$('.admin_toggle').iCheck({
handle: 'checkbox',
checkboxClass: 'icheckbox_square-blue'
});
});
// handle revocation of privileges // handle revocation of privileges
$(document.body).on('click', '.button_revoke', function() { $(document.body).on('click', '.button_revoke', function() {
var modal = $("#modal_revoke"); var modal = $("#modal_revoke");

View file

@ -174,14 +174,14 @@
"ajax" : "{{ url_for('dashboard_domains') }}", "ajax" : "{{ url_for('dashboard_domains') }}",
"info" : false, "info" : false,
"autoWidth" : false, "autoWidth" : false,
{% if default_domain_table_size_setting in ['10','25','50','100'] %} {% if default_domain_table_size_setting in ['10','25','50','100'] %}
"lengthMenu": [ [10, 25, 50, 100, -1], "lengthMenu": [ [10, 25, 50, 100, -1],
[10, 25, 50, 100, "All"]], [10, 25, 50, 100, "All"]],
{% else %} {% else %}
"lengthMenu": [ [10, 25, 50, 100, {{ default_domain_table_size_setting }}, -1], "lengthMenu": [ [10, 25, 50, 100, {{ default_domain_table_size_setting }}, -1],
[10, 25, 50, 100, {{ default_domain_table_size_setting }}, "All"]], [10, 25, 50, 100, {{ default_domain_table_size_setting }}, "All"]],
{% endif %} {% endif %}
"pageLength": {{ default_domain_table_size_setting }} "pageLength": {{ default_domain_table_size_setting }}
}); });
$(document.body).on('click', '.history-info-button', function() { $(document.body).on('click', '.history-info-button', function() {
var modal = $("#modal_history_info"); var modal = $("#modal_history_info");