Skip to content

Commit

Permalink
- Fixed missing signature 'type' options for 'group' = "Ore||Gas" in …
Browse files Browse the repository at this point in the history
…Shattered WHs, #875
  • Loading branch information
exodus4d committed Dec 6, 2019
1 parent 2aba54e commit 08783c5
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 22 deletions.
34 changes: 23 additions & 11 deletions js/app/ui/module/system_signature.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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);
});
}
};

Expand Down Expand Up @@ -2641,6 +2652,7 @@ define([
keyNavigation(tableApi, e);
});


Counter.initTableCounter(this, ['created:name', 'updated:name']);
}
};
Expand Down
34 changes: 23 additions & 11 deletions public/js/v1.5.5/app/ui/module/system_signature.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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);
});
}
};

Expand Down Expand Up @@ -2641,6 +2652,7 @@ define([
keyNavigation(tableApi, e);
});


Counter.initTableCounter(this, ['created:name', 'updated:name']);
}
};
Expand Down

0 comments on commit 08783c5

Please sign in to comment.