From e9285a315768807dc847d4e2edd4606560e29ca8 Mon Sep 17 00:00:00 2001 From: Mark Friedrich Date: Thu, 6 Sep 2018 20:22:06 +0200 Subject: [PATCH] - some bug fixes where tables in /admin section appear empty after the last commit --- js/app/admin.js | 5 +++-- js/app/ui/dialog/jump_info.js | 6 ++++-- public/js/v1.4.1/app/admin.js | 5 +++-- public/js/v1.4.1/app/module_map.js | 4 ++++ public/js/v1.4.1/app/ui/dialog/jump_info.js | 6 ++++-- 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/js/app/admin.js b/js/app/admin.js index 8a53c4a2..d47777c6 100644 --- a/js/app/admin.js +++ b/js/app/admin.js @@ -73,7 +73,7 @@ define([ setPageObserver(); - let temp = $('.dataTable').dataTable( { + let temp = $('.dataTable').dataTable({ pageLength: 100, paging: true, ordering: true, @@ -84,7 +84,8 @@ define([ zeroRecords: 'No entries found', lengthMenu: 'Show _MENU_ entries', info: 'Showing _START_ to _END_ of _TOTAL_ entries' - } + }, + data: null // use DOM data overwrites [] default -> data.loader.js }); diff --git a/js/app/ui/dialog/jump_info.js b/js/app/ui/dialog/jump_info.js index 1643f83c..021c116c 100644 --- a/js/app/ui/dialog/jump_info.js +++ b/js/app/ui/dialog/jump_info.js @@ -89,7 +89,8 @@ define([ lengthMenu: 'Show _MENU_ wormholes', info: 'Showing _START_ to _END_ of _TOTAL_ wormholes' }, - columnDefs: [] + columnDefs: [], + data: null // use DOM data overwrites [] default -> data.loader.js }); $(this).find('.' + config.wormholeInfoJumpTableClass).DataTable({ @@ -106,7 +107,8 @@ define([ lengthMenu: 'Show _MENU_ wormholes', info: 'Showing _START_ to _END_ of _TOTAL_ wormholes' }, - columnDefs: [] + columnDefs: [], + data: null // use DOM data overwrites [] default -> data.loader.js }); }); diff --git a/public/js/v1.4.1/app/admin.js b/public/js/v1.4.1/app/admin.js index 8a53c4a2..d47777c6 100644 --- a/public/js/v1.4.1/app/admin.js +++ b/public/js/v1.4.1/app/admin.js @@ -73,7 +73,7 @@ define([ setPageObserver(); - let temp = $('.dataTable').dataTable( { + let temp = $('.dataTable').dataTable({ pageLength: 100, paging: true, ordering: true, @@ -84,7 +84,8 @@ define([ zeroRecords: 'No entries found', lengthMenu: 'Show _MENU_ entries', info: 'Showing _START_ to _END_ of _TOTAL_ entries' - } + }, + data: null // use DOM data overwrites [] default -> data.loader.js }); diff --git a/public/js/v1.4.1/app/module_map.js b/public/js/v1.4.1/app/module_map.js index 83c2a39a..c6718754 100644 --- a/public/js/v1.4.1/app/module_map.js +++ b/public/js/v1.4.1/app/module_map.js @@ -1115,6 +1115,10 @@ define([ return parts.pop() || parts.pop(); }; + /** + * extract data from map url + * @returns {Array} + */ let getMapDataFromUrl = () => { let data = []; let lastURLSegment = getLastUrlSegment(); diff --git a/public/js/v1.4.1/app/ui/dialog/jump_info.js b/public/js/v1.4.1/app/ui/dialog/jump_info.js index 1643f83c..021c116c 100644 --- a/public/js/v1.4.1/app/ui/dialog/jump_info.js +++ b/public/js/v1.4.1/app/ui/dialog/jump_info.js @@ -89,7 +89,8 @@ define([ lengthMenu: 'Show _MENU_ wormholes', info: 'Showing _START_ to _END_ of _TOTAL_ wormholes' }, - columnDefs: [] + columnDefs: [], + data: null // use DOM data overwrites [] default -> data.loader.js }); $(this).find('.' + config.wormholeInfoJumpTableClass).DataTable({ @@ -106,7 +107,8 @@ define([ lengthMenu: 'Show _MENU_ wormholes', info: 'Showing _START_ to _END_ of _TOTAL_ wormholes' }, - columnDefs: [] + columnDefs: [], + data: null // use DOM data overwrites [] default -> data.loader.js }); });