From a9f844c3da365dc777002037262355e7c0b50265 Mon Sep 17 00:00:00 2001 From: raylu Date: Mon, 21 Oct 2013 23:53:44 -0700 Subject: differentiate final blow and other attackers --- web/static/js/kill.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'web/static/js/kill.js') 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', '???']; -- cgit v1.2.3