diff options
author | raylu <raylu@gridium.com> | 2013-10-21 23:53:44 -0700 |
---|---|---|
committer | raylu <raylu@gridium.com> | 2013-10-22 00:36:28 -0700 |
commit | a9f844c3da365dc777002037262355e7c0b50265 (patch) | |
tree | 951526c81de2b538c7af4632798349a8558a4750 /web/static/js/kill.js | |
parent | 0761480db9c0a83662ca31662ddb88214750cece (diff) | |
download | ykill-a9f844c3da365dc777002037262355e7c0b50265.tar.xz |
differentiate final blow and other attackers
Diffstat (limited to 'web/static/js/kill.js')
-rw-r--r-- | web/static/js/kill.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/web/static/js/kill.js b/web/static/js/kill.js index 2c12d2d..a37c30c 100644 --- a/web/static/js/kill.js +++ b/web/static/js/kill.js @@ -79,10 +79,18 @@ window.addEvent('domready', function() { }); table = $('attackers'); + table.grab(new Element('tr').grab( + new Element('td', {'class': 'attacker_type', 'colspan': 4, 'html': 'final blow'}) + )); show_attacker(table, data['final_blow']); - data['attackers'].each(function(char) { - show_attacker(table, char); - }); + if (data['attackers'].length) { + table.grab(new Element('tr').grab( + new Element('td', {'class': 'attacker_type', 'colspan': 4, 'html': 'attackers'}) + )); + data['attackers'].each(function(char) { + show_attacker(table, char); + }); + } table = $('items'); var slots = ['subsystem', 'high', 'medium', 'low', 'rig', 'drone bay', 'cargo', 'special hold', 'implant', '???']; |