Merge pull request #4 from barbequesauce/patch-5

Patch 5
This commit is contained in:
barbequesauce 2018-09-19 13:02:30 -04:00 committed by GitHub
commit 96416980be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 7 deletions

View File

@ -112,6 +112,8 @@
function initThisPage() { function initThisPage() {
$.fn.DataTable.ext.pager.numbers_length = 3; $.fn.DataTable.ext.pager.numbers_length = 3;
var alphaindex = "${alphaindex}";
if (alphaindex == "True") {
var table = $('#series_table').dataTable( { var table = $('#series_table').dataTable( {
"destroy": true, "destroy": true,
"sDom": '<"clear"Af><"clear"lp><"clear">rt<"clear"ip>', "sDom": '<"clear"Af><"clear"lp><"clear">rt<"clear"ip>',
@ -131,14 +133,41 @@
"info":"Showing _START_ to _END_ of _TOTAL_ results", "info":"Showing _START_ to _END_ of _TOTAL_ results",
"infoEmpty":"Showing 0 to 0 of 0 results", "infoEmpty":"Showing 0 to 0 of 0 results",
"infoFiltered":"(filtered from _MAX_ total results)", "infoFiltered":"(filtered from _MAX_ total results)",
"search" : ""}, "search" : ""
},
"stateSave": true, "stateSave": true,
"pageLength": 25, "pageLength": 25,
"pagingType": "simple_numbers", "pagingType": "simple_numbers",
alphabetSearch: { alphabetSearch: { column:1 }
column:1
}
}); });
} else {
var table = $('#series_table').dataTable( {
"destroy": true,
"sDom": '<"clear"f><"clear"lp><"clear">rt<"clear"ip>',
"columnDefs": [
{ "orderable": false, "targets": [5, 7, 10] },
{ "visible": false, "targets": [5, 7, 10] },
{ "type": 'num', "targets": 5 },
{ "type": 'num', "targets": 7 },
{ "orderData": [ 5, 7 ], "targets": 6 },
{ "orderData": 10, "targets": 9 },
{ "order": [[7, 'asc'],[1, 'asc']] }
],
"lengthMenu": [[10, 15, 25, 50, 100, 200, -1], [10, 15, 25, 50, 100, 200, 'All' ]],
"language": {
"lengthMenu":"Show _MENU_ results per page",
"emptyTable": "No results",
"info":"Showing _START_ to _END_ of _TOTAL_ results",
"infoEmpty":"Showing 0 to 0 of 0 results",
"infoFiltered":"(filtered from _MAX_ total results)",
"search" : ""
},
"stateSave": true,
"pageLength": 25,
"pagingType": "simple_numbers",
alphabetSearch: { column: 1 }
});
}
resetFilters("comic"); resetFilters("comic");
} }

View File

@ -101,6 +101,7 @@ _CONFIG_DEFINITIONS = OrderedDict({
'HOST_RETURN' : (str, 'Interface', None), 'HOST_RETURN' : (str, 'Interface', None),
'AUTHENTICATION' : (int, 'Interface', 0), 'AUTHENTICATION' : (int, 'Interface', 0),
'LOGIN_TIMEOUT': (int, 'Interface', 43800), 'LOGIN_TIMEOUT': (int, 'Interface', 43800),
'ALPHAINDEX': (bool, 'Interface', True),
'API_ENABLED' : (bool, 'API', False), 'API_ENABLED' : (bool, 'API', False),
'API_KEY' : (str, 'API', None), 'API_KEY' : (str, 'API', None),