Эх сурвалжийг харах

differentiate final blow and other attackers

raylu 12 жил өмнө
parent
commit
a9f844c3da

+ 18 - 6
web/static/css/kill.ccss

@@ -76,24 +76,36 @@ table#attackers:
 	width: 336px
 	margin-top: 10px
 
+	th:
+		&:nth-child(1):
+			width: 33px
+		&:nth-child(2):
+			width: 200px
+		&:nth-child(3):
+			width: 33px
+		&:nth-child(4):
+			width: 70px
+
 	td:
 		height: 64px
 		&:nth-child(1):
-			width: 33px
 			white-space: normal
 			line-height: 0
 		&:nth-child(2):
-			width: 200px
 			padding-left: 5px
 		&:nth-child(3):
-			width: 33px
 			white-space: normal
 			line-height: 0
 		&:nth-child(4):
-			width: 70px
 			text-align: right
 			padding-right: 8px
 
+	td.attacker_type:
+		height: auto
+		line-height: normal
+		background-color: #222
+		padding: 2px 8px
+
 	tr:nth-child(even):
 		background-color: #181818
 
@@ -113,7 +125,7 @@ table#items:
 		background-color: #222
 		padding: 2px 8px
 
-	tr:nth-child(odd):
+	tr:nth-child(even):
 		background-color: #181818
 
 	td:nth-child(1):not(.slot):
@@ -123,6 +135,6 @@ table#items:
 		font-weight: bold
 		padding-right: 8px
 	.dropped:
-		background-color: #050
+		background-color: #041
 	.destroyed:
 		color: #a22

+ 11 - 3
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', '???'];

+ 8 - 1
web/templates/kill.html

@@ -55,7 +55,14 @@
 <table id="victim"></table>
 <div class="clear"></div>
 
-<table id="attackers"></table>
+<table id="attackers">
+	<thead><tr>
+		<th></th>
+		<th></th>
+		<th></th>
+		<th></th>
+	</tr></thead>
+</table>
 
 <table id="items">
 	<thead><tr>