mirror of
https://github.com/statbate/layout.git
synced 2026-08-11 03:12:42 +00:00
update
This commit is contained in:
parent
7716821078
commit
e84e8ecd2b
6 changed files with 66 additions and 17 deletions
4
js/bootstrap.bundle.min.js
vendored
4
js/bootstrap.bundle.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,6 @@
|
|||
var mobile = false;
|
||||
var income_chart = false;
|
||||
var tables = [];
|
||||
|
||||
window.addEventListener("resize", function() {
|
||||
if(window.innerWidth > 805){
|
||||
|
|
@ -11,7 +12,34 @@ window.addEventListener("resize", function() {
|
|||
if(!income_chart){
|
||||
showStat();
|
||||
}
|
||||
if(tables["main"]["status"] == "mobile"){
|
||||
tables["main"]["status"] = "desktop";
|
||||
tables["main"].page.len(10).draw();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(tables["main"]["status"] == "desktop"){
|
||||
tables["main"]["status"] = "mobile";
|
||||
tables["main"].page.len(100).draw();
|
||||
}
|
||||
});
|
||||
|
||||
var dataTableOptions = {
|
||||
bAutoWidth: false,
|
||||
oLanguage: {
|
||||
sLengthMenu: "Show _MENU_ entries",
|
||||
sSearch: "",
|
||||
sSearchPlaceholder: "Search",
|
||||
},
|
||||
pagingType: 'simple_numbers', // or numbers
|
||||
iDisplayLength: 10,
|
||||
order: [[5, "desc"]],
|
||||
};
|
||||
|
||||
$('.dropdown-menu').on( 'click', 'a', function() {
|
||||
text = $(this).html();
|
||||
htmlText = text + ' <span class="caret"></span>';
|
||||
$(this).closest('.dropdown').find('.dropdown-toggle').html(htmlText);
|
||||
});
|
||||
|
||||
function choose() {
|
||||
|
|
@ -131,12 +159,25 @@ function statbate() {
|
|||
};
|
||||
}
|
||||
|
||||
msgs = {
|
||||
arr: [],
|
||||
function createTables(){
|
||||
tables["main"] = $('#main').DataTable({...dataTableOptions,});
|
||||
tables["main"]["status"] = "mobile";
|
||||
if(window.innerWidth > 805){
|
||||
tables["main"]["status"] = "desktop";
|
||||
}
|
||||
}
|
||||
|
||||
msgs = {arr: [],};
|
||||
|
||||
|
||||
//oTable.page.len(100).draw();
|
||||
|
||||
statbate();
|
||||
showStat();
|
||||
|
||||
console.log('Debug https://statbate.com/debug.php');
|
||||
console.log('Statbate is open source project (https://github.com/statbate)');
|
||||
|
||||
$(document).ready(function () {
|
||||
createTables();
|
||||
});
|
||||
|
|
|
|||
0
js/statbate.tables.js
Normal file
0
js/statbate.tables.js
Normal file
Loading…
Add table
Add a link
Reference in a new issue