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
$("#tbl_users").DataTable({
"paging" : true,
"lengthChange" : false,
"lengthChange" : true,
"searching" : true,
"ordering" : true,
"info" : true,
"autoWidth" : false
"info" : 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
$(document.body).on('click', '.button_revoke', function() {
var modal = $("#modal_revoke");

View File

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