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,7 +112,9 @@
function initThisPage() {
$.fn.DataTable.ext.pager.numbers_length = 3;
var table = $('#series_table').dataTable( {
var alphaindex = "${alphaindex}";
if (alphaindex == "True") {
var table = $('#series_table').dataTable( {
"destroy": true,
"sDom": '<"clear"Af><"clear"lp><"clear">rt<"clear"ip>',
"columnDefs": [
@ -131,15 +133,42 @@
"info":"Showing _START_ to _END_ of _TOTAL_ results",
"infoEmpty":"Showing 0 to 0 of 0 results",
"infoFiltered":"(filtered from _MAX_ total results)",
"search" : ""},
"search" : ""
},
"stateSave": true,
"pageLength": 25,
"pagingType": "simple_numbers",
alphabetSearch: {
column:1
}
});
resetFilters("comic");
alphabetSearch: { 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");
}
$(document).ready(function(){

View File

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