diff options
author | raylu <raylu@gridium.com> | 2013-10-25 02:07:18 -0700 |
---|---|---|
committer | raylu <raylu@gridium.com> | 2013-10-25 02:07:18 -0700 |
commit | e4987ed6a0766c554f3a39f654afcc3269707f2e (patch) | |
tree | 6cb108ceaddf22f6ca64af73718b614a45186c97 /web/static | |
parent | 050dc6915bfe71547129e5f253543c25a4b45e07 (diff) | |
download | ykill-e4987ed6a0766c554f3a39f654afcc3269707f2e.tar.xz |
kill: tooltip on attackers
Diffstat (limited to 'web/static')
-rw-r--r-- | web/static/css/kill.ccss | 32 | ||||
-rw-r--r-- | web/static/js/kill.js | 10 |
2 files changed, 27 insertions, 15 deletions
diff --git a/web/static/css/kill.ccss b/web/static/css/kill.ccss index 3cb64db..e56bfcf 100644 --- a/web/static/css/kill.ccss +++ b/web/static/css/kill.ccss @@ -39,21 +39,9 @@ width: 32px height: 32px position: relative // for .tooltip - - .tooltip: - display: none - position: absolute - top: 32px - left: 8px - line-height: 1em - padding: 8px 10px - background-color: rgba(40, 40, 40, 0.9) - white-space: nowrap - text-align: center - z-index: 1 - pointer-events: none &:hover .tooltip: display: block + .avail: border: 1px solid #888 @@ -96,6 +84,11 @@ table#attackers: &:nth-child(3): white-space: normal line-height: 0 + overflow: visible + > div: + position: relative // for .tooltip + &:hover .tooltip: + display: block &:nth-child(4): text-align: right padding-right: 8px @@ -144,3 +137,16 @@ table#items: background-color: #041 .destroyed: color: #a22 + +.tooltip: + display: none + position: absolute + top: 32px + left: 8px + line-height: 1em + padding: 8px 10px + background-color: rgba(40, 40, 40, 0.9) + white-space: nowrap + text-align: center + z-index: 1 + pointer-events: none diff --git a/web/static/js/kill.js b/web/static/js/kill.js index 5fe2173..4f53db9 100644 --- a/web/static/js/kill.js +++ b/web/static/js/kill.js @@ -194,8 +194,14 @@ window.addEvent('domready', function() { tr.grab(td); td = new Element('td').adopt( - ykill.portrait(char['ship_type_id'], char['ship_name'], 'type', '_32.png'), - ykill.portrait(char['weapon_type_id'], char['weapon_name'], 'type', '_32.png') + new Element('div').adopt( + ykill.portrait(char['ship_type_id'], char['ship_name'], 'type', '_32.png'), + new Element('div', {'class': 'tooltip', 'html': char['ship_name']}) + ), + new Element('div').adopt( + ykill.portrait(char['weapon_type_id'], char['weapon_name'], 'type', '_32.png'), + new Element('div', {'class': 'tooltip', 'html': char['weapon_name']}) + ) ); tr.grab(td); tr.grab(new Element('td').appendText(char['damage'].toLocaleString())); |