03bff8c72f
-Add sass support (Replace style.css with style.scss; add new sass_theme_reader.sh script; add sass:compile to package.json; add new dependencies for sass; compiled style.css is now minified) -Claim address improvements (Better instructions; better error msgs) -Fix for disappearing Network > Connections table -Tons of layout and css fixes and tweaks (Improved mobile support) -Remove old Exor theme
53 lines
1.8 KiB
Plaintext
53 lines
1.8 KiB
Plaintext
script.
|
|
$(document).ready(function() {
|
|
$('#connections-table').dataTable({
|
|
autoWidth: true,
|
|
searching: false,
|
|
ordering: false,
|
|
responsive: true,
|
|
lengthChange: true,
|
|
processing: true,
|
|
language: {
|
|
paginate: {
|
|
previous: '<',
|
|
next: '>'
|
|
}
|
|
},
|
|
ajax: {
|
|
url: '/ext/connections',
|
|
dataSrc: function (json) {
|
|
return json.data;
|
|
}
|
|
},
|
|
rowCallback: function (row, data, index) {
|
|
var flagBlock = '';
|
|
if (data['country_code'].length > 1) {
|
|
flagBlock = '<div class="margin-left-5 flag-icon flag-icon-'+data['country_code'].toLowerCase()+'"></div>';
|
|
}
|
|
$("td:eq(0)", row).html(data['address']).addClass('breakWord');
|
|
$("td:eq(1)", row).html(data['protocol']);
|
|
$("td:eq(2)", row).html(data['version']);
|
|
$("td:eq(3)", row).html(data['country']+flagBlock);
|
|
},
|
|
columns: [
|
|
{ data: 'address', width: '25%' },
|
|
{ data: 'protocol', width: '25%' },
|
|
{ data: 'version', width:'25%' },
|
|
{ data: 'country', width: '25%'}
|
|
]
|
|
});
|
|
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
|
$($.fn.dataTable.tables(true)).DataTable().responsive.recalc();
|
|
$($.fn.dataTable.tables(true)).css('width', '100%');
|
|
$($.fn.dataTable.tables(true)).DataTable().columns.adjust().draw();
|
|
});
|
|
});
|
|
.card.card-default.border-0
|
|
table#connections-table.table.table-bordered.table-striped.table-paging.mobile-border-right
|
|
thead
|
|
tr
|
|
th #{settings.locale.net_address}
|
|
th.text-center #{settings.locale.net_protocol}
|
|
th.text-center #{settings.locale.net_subversion}
|
|
th.text-center #{settings.locale.net_country}
|
|
tbody.text-center |