|
1 | 1 | var Data = { |
2 | 2 |
|
3 | | - members: [], |
4 | | - hostiles: [], |
5 | | - events: [], |
6 | | - scans: [], |
| 3 | + members: [], |
| 4 | + hostiles: [], |
| 5 | + events: [], |
| 6 | + scans: [], |
7 | 7 |
|
8 | | - config: { |
9 | | - data_client: 'http://127.0.0.1:44444/', |
10 | | - domain: 'https://standing-fleet.herokuapp.com/', |
11 | | - apiUrl: '/api/fleet', |
12 | | - alertStay: 5000, |
13 | | - pollInterval: 7000, |
14 | | - maxEvents: 50, |
15 | | - maxScans: 8, |
16 | | - uiSpeed: 400, |
17 | | - log: 'console' |
18 | | - }, |
| 8 | + config: { |
| 9 | + data_client: 'http://127.0.0.1:44444/', |
| 10 | + domain: 'https://standing-fleet.herokuapp.com/', |
| 11 | + apiUrl: '/api/fleet', |
| 12 | + alertStay: 5000, |
| 13 | + pollInterval: 7000, |
| 14 | + maxEvents: 50, |
| 15 | + maxScans: 8, |
| 16 | + uiSpeed: 400, |
| 17 | + log: 'console' |
| 18 | + }, |
19 | 19 |
|
20 | | - state: { |
21 | | - fleet: { |
22 | | - password: '', |
23 | | - name: '', |
24 | | - key: '' |
25 | | - }, |
26 | | - self: { |
27 | | - characterName: '', |
28 | | - characterId: '', |
29 | | - key: '', |
30 | | - systemId: '' |
31 | | - }, |
32 | | - alertCount: 0, |
33 | | - data_client: null, |
34 | | - dimmed: false, |
35 | | - lastPollTs : moment().unix(), |
36 | | - memberSortOrder: { |
37 | | - property: 'name', |
38 | | - order: 'asc' |
39 | | - }, |
40 | | - hostileSortOrder: { |
41 | | - property: 'systemName', |
42 | | - order: 'asc' |
43 | | - }, |
44 | | - pollLoop: 0 |
45 | | - }, |
| 20 | + state: { |
| 21 | + fleet: { |
| 22 | + password: '', |
| 23 | + name: '', |
| 24 | + key: '' |
| 25 | + }, |
| 26 | + self: { |
| 27 | + characterName: '', |
| 28 | + characterId: '', |
| 29 | + key: '', |
| 30 | + systemId: '' |
| 31 | + }, |
| 32 | + alertCount: 0, |
| 33 | + data_client: null, |
| 34 | + dimmed: false, |
| 35 | + lastPollTs : moment().unix(), |
| 36 | + memberSortOrder: { |
| 37 | + property: 'name', |
| 38 | + order: 'asc' |
| 39 | + }, |
| 40 | + hostileSortOrder: { |
| 41 | + property: 'systemName', |
| 42 | + order: 'asc' |
| 43 | + }, |
| 44 | + pollLoop: 0 |
| 45 | + }, |
46 | 46 |
|
47 | | - ui: { |
48 | | - logo: $('#top-logo'), |
49 | | - alertContainer: $('#alert-container'), |
50 | | - contentWrapper: $('#content-wrapper'), |
51 | | - dim: $('#dim'), |
| 47 | + ui: { |
| 48 | + logo: $('#top-logo'), |
| 49 | + alertContainer: $('#alert-container'), |
| 50 | + contentWrapper: $('#content-wrapper'), |
| 51 | + dim: $('#dim'), |
52 | 52 |
|
53 | | - topMenu: $('#top-menu'), |
54 | | - topMenu_hud: $('#top-menu-hud'), |
55 | | - topMenu_map: $('#top-menu-system-map'), |
56 | | - topMenu_hostiles: $('#top-menu-hostiles'), |
57 | | - topMenu_members: $('#top-menu-members'), |
58 | | - topMenu_events: $('#top-menu-events'), |
59 | | - topMenu_scans: $('#top-menu-scans'), |
| 53 | + topMenu: $('#top-menu'), |
| 54 | + topMenu_hud: $('#top-menu-hud'), |
| 55 | + topMenu_map: $('#top-menu-system-map'), |
| 56 | + topMenu_hostiles: $('#top-menu-hostiles'), |
| 57 | + topMenu_members: $('#top-menu-members'), |
| 58 | + topMenu_events: $('#top-menu-events'), |
| 59 | + topMenu_scans: $('#top-menu-scans'), |
60 | 60 |
|
61 | | - bottomMenu: $('#bottom-menu'), |
62 | | - bottomMenu_spinner: $('#bottom-menu-spinner'), |
63 | | - bottomMenu_local: $('#bottom-menu-local'), |
64 | | - bottomMenu_scan: $('#bottom-menu-scan'), |
65 | | - bottomMenu_unlink: $('#bottom-menu-unlink'), |
66 | | - bottomMenu_menu: $('#bottom-menu-menu'), |
| 61 | + bottomMenu: $('#bottom-menu'), |
| 62 | + bottomMenu_spinner: $('#bottom-menu-spinner'), |
| 63 | + bottomMenu_local: $('#bottom-menu-local'), |
| 64 | + bottomMenu_scan: $('#bottom-menu-scan'), |
| 65 | + bottomMenu_unlink: $('#bottom-menu-unlink'), |
| 66 | + bottomMenu_menu: $('#bottom-menu-menu'), |
67 | 67 |
|
68 | | - currentSystem: $('#current-system'), |
69 | | - statusClear: $('#status-clear'), |
70 | | - statusHostile: $('#status-hostile'), |
| 68 | + currentSystem: $('#current-system'), |
| 69 | + statusClear: $('#status-clear'), |
| 70 | + statusHostile: $('#status-hostile'), |
71 | 71 |
|
72 | | - hud: $('#hud'), |
73 | | - map: $('#system-map'), |
74 | | - hostiles: $('#hostiles'), |
75 | | - hostiles_list: $('#hostiles > .list'), |
76 | | - members: $('#members'), |
77 | | - members_list: $('#members > .list'), |
78 | | - events: $('#events'), |
79 | | - events_list: $('#events > .list'), |
80 | | - scans: $('#scans'), |
81 | | - scans_list: $('#scans > .list') |
82 | | - }, |
| 72 | + hud: $('#hud'), |
| 73 | + map: $('#system-map'), |
| 74 | + hostiles: $('#hostiles'), |
| 75 | + hostiles_list: $('#hostiles > .list'), |
| 76 | + members: $('#members'), |
| 77 | + members_list: $('#members > .list'), |
| 78 | + events: $('#events'), |
| 79 | + events_list: $('#events > .list'), |
| 80 | + scans: $('#scans'), |
| 81 | + scans_list: $('#scans > .list') |
| 82 | + }, |
83 | 83 |
|
84 | | - templates: { |
85 | | - alert: Templates.alert, |
86 | | - event: Templates.event, |
87 | | - hostile: Templates.hostile, |
88 | | - hud: Templates.hud, |
89 | | - member: Templates.member, |
90 | | - panel: Templates.panel, |
91 | | - scan: Templates.scan |
92 | | - }, |
| 84 | + templates: { |
| 85 | + alert: Templates.alert, |
| 86 | + event: Templates.event, |
| 87 | + hostile: Templates.hostile, |
| 88 | + hud: Templates.hud, |
| 89 | + member: Templates.member, |
| 90 | + panel: Templates.panel, |
| 91 | + scan: Templates.scan |
| 92 | + }, |
93 | 93 |
|
94 | | - ships: {}, |
| 94 | + ships: {}, |
95 | 95 |
|
96 | | - preload: function() { |
97 | | - $.ajax({ |
98 | | - url: '/data/ships.json', |
99 | | - dataType: 'json', |
| 96 | + preload: function() { |
| 97 | + $.ajax({ |
| 98 | + url: '/data/ships.json', |
| 99 | + dataType: 'json', |
100 | 100 |
|
101 | | - success: function( data ) { Data.ships = data; }, |
102 | | - error: function(data, error, errorstring) { if (error) console.log("Error: " + errorString); } |
103 | | - }); |
| 101 | + success: function( data ) { Data.ships = data; }, |
| 102 | + error: function(data, error, errorstring) { if (error) console.log("Error: " + errorString); } |
| 103 | + }); |
104 | 104 |
|
105 | | - $.ajax({ |
106 | | - url: '/data/map.json', |
107 | | - dataType: 'json', |
| 105 | + $.ajax({ |
| 106 | + url: '/data/map.json', |
| 107 | + dataType: 'json', |
108 | 108 |
|
109 | | - success: function( data ) { |
110 | | - Data.regions = data.Regions; |
111 | | - Data.systems = data.Systems; |
112 | | - Data.gates = data.Gates; |
113 | | - }, |
114 | | - error: function(data, error, errorstring) { if (error) console.log("Error: " + errorString); } |
115 | | - }); |
116 | | - } |
| 109 | + success: function( data ) { |
| 110 | + Data.regions = data.Regions; |
| 111 | + Data.systems = data.Systems; |
| 112 | + Data.gates = data.Gates; |
| 113 | + }, |
| 114 | + error: function(data, error, errorstring) { if (error) console.log("Error: " + errorString); } |
| 115 | + }); |
| 116 | + } |
117 | 117 | }; |
0 commit comments