diff options
author | raylu <raylu@gridium.com> | 2013-10-23 01:16:34 -0700 |
---|---|---|
committer | raylu <raylu@gridium.com> | 2013-10-23 01:16:34 -0700 |
commit | ed59e1b3c6ebf1b4fb114264db19b7b21eb54468 (patch) | |
tree | 97ee67ba01da8f9e9e0a1cfb25eabf3917e00558 /web | |
parent | 719c83e23485ef7caefbc574c23ba91a2e661ce8 (diff) | |
download | ykill-ed59e1b3c6ebf1b4fb114264db19b7b21eb54468.tar.xz |
ship as item on kill, hide cents
also, set height on kill page so loading images doesn't adjust heights
and fix firefox kill_list ellipsis
Diffstat (limited to 'web')
-rw-r--r-- | web/static/css/home.ccss | 2 | ||||
-rw-r--r-- | web/static/css/kill.ccss | 3 | ||||
-rw-r--r-- | web/static/css/kill_list.ccss | 8 | ||||
-rw-r--r-- | web/static/css/search.ccss | 4 | ||||
-rw-r--r-- | web/static/js/common.js | 10 | ||||
-rw-r--r-- | web/static/js/home.js | 3 | ||||
-rw-r--r-- | web/static/js/kill.js | 25 | ||||
-rw-r--r-- | web/static/js/kill_list.js | 3 |
8 files changed, 38 insertions, 20 deletions
diff --git a/web/static/css/home.ccss b/web/static/css/home.ccss index b4e327d..b334584 100644 --- a/web/static/css/home.ccss +++ b/web/static/css/home.ccss @@ -4,7 +4,7 @@ #expensive: margin: 0 auto - td:nth-child(3): + td:nth-child(4): text-align: right padding-right: 3px diff --git a/web/static/css/kill.ccss b/web/static/css/kill.ccss index 1cfc2ff..9b29093 100644 --- a/web/static/css/kill.ccss +++ b/web/static/css/kill.ccss @@ -87,7 +87,7 @@ table#attackers: width: 70px td: - height: 64px + height: 66px &:nth-child(1): white-space: normal line-height: 0 @@ -132,6 +132,7 @@ table#items: td:nth-child(1):not(.slot): line-height: 0 + height: 34px td:nth-child(3): text-align: right font-weight: bold diff --git a/web/static/css/kill_list.ccss b/web/static/css/kill_list.ccss index 3985a58..ad90882 100644 --- a/web/static/css/kill_list.ccss +++ b/web/static/css/kill_list.ccss @@ -10,13 +10,13 @@ table#kills: th.system: width: 120px th.victim_portrait: - width: 64px + width: 66px th.victim: - width: 250px + width: 248px th.killer_portrait: - width: 64px + width: 66px th.killer: - width: 250px + width: 248px th.value: width: 62px diff --git a/web/static/css/search.ccss b/web/static/css/search.ccss index 9f6aa70..052dd2d 100644 --- a/web/static/css/search.ccss +++ b/web/static/css/search.ccss @@ -1,5 +1,5 @@ #wrapper: - padding: 20px + padding: 2px 20px 20px h2: - margin-top: 0 + margin: 1em 0 0.4em diff --git a/web/static/js/common.js b/web/static/js/common.js index 6ea91e3..d9eb595 100644 --- a/web/static/js/common.js +++ b/web/static/js/common.js @@ -22,9 +22,19 @@ }, 'format_isk': function(isk) { + isk /= 100; + if (!locale_options) + return parseFloat(isk.toFixed(0)).toLocaleString(); + return isk.toLocaleString('en-US', {'maximumFractionDigits': 0}); + }, + 'format_millions': function(isk) { + isk /= 100 * 1000 * 1000; if (!locale_options) return parseFloat(isk.toFixed(2)).toLocaleString(); return isk.toLocaleString('en-US', {'minimumFractionDigits': 2, 'maximumFractionDigits': 2}); }, + 'format_billions': function(isk) { + return ykill.format_millions(isk / 1000); + } }); })(); diff --git a/web/static/js/home.js b/web/static/js/home.js index 8bbe943..11e1422 100644 --- a/web/static/js/home.js +++ b/web/static/js/home.js @@ -5,10 +5,11 @@ window.addEvent('domready', function() { table.grab(new Element('tr').adopt( new Element('td').grab(ykill.portrait(kill['ship_type_id'], kill['ship_name'], 'type', '_32.png')), new Element('td', {'html': kill['ship_name']}), + new Element('td', {'html': kill['system_name'] + ' (' + kill['security'].toFixed(1) + ')'}), new Element('td').grab( new Element('a', { 'href': '/kill/' + kill['kill_id'], - 'html': ykill.format_isk(kill['cost'] / (100 * 1000 * 1000 * 1000)) + 'html': ykill.format_billions(kill['cost']) }) ) )); diff --git a/web/static/js/kill.js b/web/static/js/kill.js index 88c07c7..03652d5 100644 --- a/web/static/js/kill.js +++ b/web/static/js/kill.js @@ -42,16 +42,10 @@ window.addEvent('domready', function() { ), new Element('td', {'html': victim['faction_name']}) )); - table.adopt( - new Element('tr').adopt( - new Element('td').grab( - ykill.portrait(victim['ship_type_id'], victim['ship_name'], 'type', '_64.png') - ), - new Element('td', {'html': victim['ship_name']}) - ), + table.grab( new Element('tr').adopt( new Element('td', {'html': 'cost'}), - new Element('td', {'html': ykill.format_isk(kill['cost'] / 100)}) + new Element('td', {'html': ykill.format_isk(kill['cost'])}) ) ); @@ -98,6 +92,19 @@ window.addEvent('domready', function() { } table = $('items'); + table.adopt( + new Element('tr').grab( + new Element('td', {'html': 'ship', 'colspan': 4, 'class': 'slot'}) + ), + new Element('tr').adopt( + new Element('td').grab( + ykill.portrait(victim['ship_type_id'], victim['ship_name'], 'type', '_32.png') + ), + new Element('td', {'html': victim['ship_name']}), + new Element('td'), + new Element('td', {'html': ykill.format_isk(victim['ship_cost'])}) + ) + ); var slots = ['subsystem', 'high', 'medium', 'low', 'rig', 'drone bay', 'cargo', 'special hold', 'implant', '???']; slots.each(function(slot) { if (!items[slot]) @@ -135,7 +142,7 @@ window.addEvent('domready', function() { ), new Element('td', {'html': item['item_name']}), new Element('td', {'html': count, 'class': item_class}), - new Element('td', {'html': ykill.format_isk(item['cost'] / 100)}) + new Element('td', {'html': ykill.format_isk(item['cost'])}) )); }); }); diff --git a/web/static/js/kill_list.js b/web/static/js/kill_list.js index c8341c8..9384228 100644 --- a/web/static/js/kill_list.js +++ b/web/static/js/kill_list.js @@ -62,8 +62,7 @@ window.addEvent('domready', function() { tr.grab(td); td = new Element('td'); - var millions = kill['cost'] / (100 * 1000000); - td.appendText(ykill.format_isk(millions)); + td.appendText(ykill.format_millions(kill['cost'])); if (victim[entity_type + '_id'] == entity_id) td.addClass('loss'); tr.grab(td); |