Skip to content
This repository was archived by the owner on Jul 6, 2022. It is now read-only.

Commit f73b4b2

Browse files
committed
Suppressing alerts when hud is active; Fixing copy on events for hostiles without a system; Fixing sort order of hostiles/members; quelching console logs.
1 parent 1fa6e8e commit f73b4b2

4 files changed

Lines changed: 17 additions & 13 deletions

File tree

app/js/Data.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ var Data = {
3434
dimmed: false,
3535
lastPollTs : moment().unix(),
3636
memberSortOrder: {
37-
property: 'name',
37+
property: 'characterName',
3838
order: 'asc'
3939
},
4040
hostileSortOrder: {
41-
property: 'systemName',
41+
property: 'characterName',
4242
order: 'asc'
4343
},
4444
pollLoop: 0

app/js/EventHandler.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,12 @@ var EventHandler = {
106106
} else if (event.type === 'hostileTimedOut') {
107107
var hostile = event.data;
108108
event.text = '<a href="javascript:CCPEVE.showInfo(1377, '
109-
+ hostile.characterId + ');">' + hostile.characterName + '</a> contact lost in '
110-
+ '<a href="javascript:CCPEVE.showInfo(5, ' + hostile.systemId + ');">'
111-
+ hostile.systemName + '</a>';
109+
+ hostile.characterId + ');">' + hostile.characterName + '</a> '
110+
+ ' contact lost '
111+
if (hostile.systemId !== null ) {
112+
event.text += 'in <a href="javascript:CCPEVE.showInfo(5, ' + hostile.systemId + ');"> '
113+
+ hostile.systemName + '</a>';
114+
}
112115
event.blink = 'hostiles';
113116
event.alert = true;
114117

app/js/HostileList.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
var HostileList = {
22

33
clear: function () {
4-
log('Clearing hostile list...');
4+
// log('Clearing hostile list...');
55
Data.hostiles = [];
66
Data.ui.hostiles_list.empty();
77
},
88

99
clearBySystem: function (systemId) {
10-
log('Clearing system ' + systemId);
10+
// log('Clearing system ' + systemId);
1111
Data.hostiles = $.map(Data.hostiles, function(h) { return h.systemId !== +systemId ? h : null; });
1212
Data.ui.hostiles_list.empty();
1313
},
1414

1515
addHostile: function (hostileToAdd) {
16-
log('Adding hostile: ' + hostileToAdd.characterName + '...');
16+
// log('Adding hostile: ' + hostileToAdd.characterName + '...');
1717
HostileList.removeHostile(hostileToAdd.characterId);
1818
Data.hostiles.push(hostileToAdd);
1919
},
2020

2121
fadeHostile: function (hostileToFadeId) {
2222
var hostileToFade = HostileList.findHostile(hostileToFadeId);
2323
if (hostileToFade) {
24-
log('Fading hostile: ' + hostileToFade.characterName + '...');
24+
// log('Fading hostile: ' + hostileToFade.characterName + '...');
2525
hostileToFade.is_faded = true;
2626
}
2727
},
2828

2929
removeHostile: function (hostileToRemoveId) {
3030
var hostileToRemove = HostileList.findHostile(hostileToRemoveId);
3131
if (hostileToRemove) {
32-
log('Removing hostile: ' + hostileToRemove.characterName + '...');
32+
// log('Removing hostile: ' + hostileToRemove.characterName + '...');
3333
Data.hostiles.splice(Data.hostiles.indexOf(hostileToRemove), 1);
3434
}
3535
},
@@ -47,7 +47,7 @@ var HostileList = {
4747
},
4848

4949
renderSingleHostile: function (hostile) {
50-
log('Rendering hostile: ' + hostile.characterName + ' (single)...');
50+
// log('Rendering hostile: ' + hostile.characterName + ' (single)...');
5151
HostileList.addUiProperties(hostile);
5252
var existingHostileElement = Data.ui.hostiles_list.find('#hostile-' + hostile.characterId);
5353
if (existingHostileElement.length) {
@@ -58,7 +58,7 @@ var HostileList = {
5858
},
5959

6060
sortAndRenderAll: function () {
61-
log('Sorting and rendering all hostiles...');
61+
// log('Sorting and rendering all hostiles...');
6262

6363
Data.hostiles.sort(function (hostile1, hostile2) {
6464
if (hostile1[Data.state.hostileSortOrder.property] < hostile2[Data.state.hostileSortOrder.property]) {
@@ -72,7 +72,7 @@ var HostileList = {
7272

7373
Data.ui.hostiles_list.empty();
7474
Data.hostiles.forEach(function (hostile) {
75-
log('Rendering hostile: ' + hostile.characterName + ' (batch)...');
75+
// log('Rendering hostile: ' + hostile.characterName + ' (batch)...');
7676
HostileList.addUiProperties(hostile);
7777
Data.ui.hostiles_list.append($(hostile.html));
7878
});

app/js/UI.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ var UI = {
5959
},
6060

6161
showAlert: function (event) {
62+
if ($('.menu-button.active').attr('id') === Data.ui.topMenu_hud.attr('id')) return;
6263
var alert = $(Data.templates.alert(event));
6364

6465
alert.on('mouseover',function () {

0 commit comments

Comments
 (0)