From b1366cef18ffe1bd6ff3a46985f1fc427ea0863f Mon Sep 17 00:00:00 2001 From: barbequesauce Date: Wed, 19 Sep 2018 12:53:12 -0400 Subject: [PATCH 1/2] IMP: Adding ability to hide alphabetical index --- data/interfaces/default/index.html | 43 +++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/data/interfaces/default/index.html b/data/interfaces/default/index.html index a01d72db..f9e5ab0b 100755 --- a/data/interfaces/default/index.html +++ b/data/interfaces/default/index.html @@ -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(){ From 0d2b415a7185efd167e1b863442808681b040043 Mon Sep 17 00:00:00 2001 From: barbequesauce Date: Wed, 19 Sep 2018 12:56:52 -0400 Subject: [PATCH 2/2] IMP: Adding ability to hide alphabetical index --- mylar/config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mylar/config.py b/mylar/config.py index 8b603b78..9ac2ddc9 100644 --- a/mylar/config.py +++ b/mylar/config.py @@ -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),