diff --git a/js/app/ui/module/system_signature.js b/js/app/ui/module/system_signature.js index 9f2d75ff..7eea18ab 100644 --- a/js/app/ui/module/system_signature.js +++ b/js/app/ui/module/system_signature.js @@ -244,9 +244,15 @@ define([ if( systemTypeId === 1 && shattered && [1, 2, 3, 4, 5, 6].includes(areaId) && - [1, 2, 3, 4, 6].includes(groupId) + [1, 2, 3].includes(groupId) // Combat, Relic, Data ){ areaIds = [areaId - 1, areaId, areaId + 1].filter(areaId => areaId >= 1 && areaId <= 6); + }else if( + systemTypeId === 1 && shattered && + [1, 2, 3, 4, 5, 6].includes(areaId) && + [4, 6].includes(groupId) // Gas, Ore + ){ + areaIds = [1, 2, 3, 4, 5, 6]; } return areaIds; @@ -1958,16 +1964,7 @@ define([ width: 80, className: ['text-right', config.tableCellCounterClass, 'min-screen-d'].join(' '), data: 'updated.updated', - defaultContent: '', - createdCell: function(cell, cellData, rowData, rowIndex, colIndex){ - // highlight cell - let diff = Math.floor((new Date()).getTime()) - cellData * 1000; - - // age > 1 day - if(diff > 86400000){ - $(cell).addClass('txt-color txt-color-warning'); - } - } + defaultContent: '' },{ targets: 8, name: 'info', @@ -2137,6 +2134,20 @@ define([ $(this).trigger('click'); } }); + }, + rowCallback: function(){ + let tableApi = this.api(); + let time = Math.floor((new Date()).getTime()); + + tableApi.cells(null, ['updated:name']).every(function(rowIndex, colIndex, tableLoopCount, cellLoopCount){ + let cell = this; + let node = cell.node(); + let cellData = cell.data(); + let diff = time - cellData * 1000; + + // highlight cell: age > 1 day + $(node).toggleClass('txt-color txt-color-warning', diff > 86400000); + }); } }; @@ -2641,6 +2652,7 @@ define([ keyNavigation(tableApi, e); }); + Counter.initTableCounter(this, ['created:name', 'updated:name']); } }; diff --git a/public/js/v1.5.5/app/ui/module/system_signature.js b/public/js/v1.5.5/app/ui/module/system_signature.js index 9f2d75ff..7eea18ab 100644 --- a/public/js/v1.5.5/app/ui/module/system_signature.js +++ b/public/js/v1.5.5/app/ui/module/system_signature.js @@ -244,9 +244,15 @@ define([ if( systemTypeId === 1 && shattered && [1, 2, 3, 4, 5, 6].includes(areaId) && - [1, 2, 3, 4, 6].includes(groupId) + [1, 2, 3].includes(groupId) // Combat, Relic, Data ){ areaIds = [areaId - 1, areaId, areaId + 1].filter(areaId => areaId >= 1 && areaId <= 6); + }else if( + systemTypeId === 1 && shattered && + [1, 2, 3, 4, 5, 6].includes(areaId) && + [4, 6].includes(groupId) // Gas, Ore + ){ + areaIds = [1, 2, 3, 4, 5, 6]; } return areaIds; @@ -1958,16 +1964,7 @@ define([ width: 80, className: ['text-right', config.tableCellCounterClass, 'min-screen-d'].join(' '), data: 'updated.updated', - defaultContent: '', - createdCell: function(cell, cellData, rowData, rowIndex, colIndex){ - // highlight cell - let diff = Math.floor((new Date()).getTime()) - cellData * 1000; - - // age > 1 day - if(diff > 86400000){ - $(cell).addClass('txt-color txt-color-warning'); - } - } + defaultContent: '' },{ targets: 8, name: 'info', @@ -2137,6 +2134,20 @@ define([ $(this).trigger('click'); } }); + }, + rowCallback: function(){ + let tableApi = this.api(); + let time = Math.floor((new Date()).getTime()); + + tableApi.cells(null, ['updated:name']).every(function(rowIndex, colIndex, tableLoopCount, cellLoopCount){ + let cell = this; + let node = cell.node(); + let cellData = cell.data(); + let diff = time - cellData * 1000; + + // highlight cell: age > 1 day + $(node).toggleClass('txt-color txt-color-warning', diff > 86400000); + }); } }; @@ -2641,6 +2652,7 @@ define([ keyNavigation(tableApi, e); }); + Counter.initTableCounter(this, ['created:name', 'updated:name']); } };