From 0afed8ac2d10c4b7f169ee8e36ec9187477f43d0 Mon Sep 17 00:00:00 2001 From: Taka Date: Tue, 26 May 2020 16:25:37 +0000 Subject: [PATCH] Show the vehicle/ordnance type in the main sortable lists. --- vasl_templates/webapp/static/css/tabs-ob.css | 1 + vasl_templates/webapp/static/vo.js | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/vasl_templates/webapp/static/css/tabs-ob.css b/vasl_templates/webapp/static/css/tabs-ob.css index 4eb5de8..b5005e2 100644 --- a/vasl_templates/webapp/static/css/tabs-ob.css +++ b/vasl_templates/webapp/static/css/tabs-ob.css @@ -25,6 +25,7 @@ .panel-ob_vo .sortable .vo-entry img.vasl-image { display: inline-block ; vertical-align: middle ; height: 3.25em ; margin-right: 0.5em ; } .panel-ob_vo .sortable .vo-entry.small-piece img.vasl-image { height: 2.25em ; margin-left: 0.5em ; margin-right: 0.75em ; } .panel-ob_vo .sortable .vo-entry .detail { flex-grow: 1 ; display: flex ; flex-direction: column ; justify-content: center ; } +.panel-ob_vo .sortable .vo-entry .detail .vo-type { font-style: italic ; font-size: 80% ; color: #666 ; } .panel-ob_vo .sortable .vo-entry .detail .vo-capabilities { max-height: 2.5em ; overflow: hidden ; font-size: 80% ; font-style: italic ; } .panel-ob_vo .sortable .vo-entry .detail .vo-capability { margin-right: 0.5em ; color: #444 ; } .panel-ob_vo label.header { font-weight: bold ; display: inline-block ; width: 3.25em ; } diff --git a/vasl_templates/webapp/static/vo.js b/vasl_templates/webapp/static/vo.js index 0c882cd..bd2ccc2 100644 --- a/vasl_templates/webapp/static/vo.js +++ b/vasl_templates/webapp/static/vo.js @@ -189,7 +189,7 @@ function do_add_vo( vo_type, player_no, vo_entry, vo_image_id, elite, custom_cap var buf = [ div_tag, "", "
", - "
", + "
", "
", "
" ] ; @@ -262,10 +262,13 @@ function update_vo_sortable2_entry( $entry, vo_type, snippet_params ) var url = get_vo_image_url( vo_entry, vo_image_id, true, false ) ; var $content = $entry.children( ".vo-entry" ) ; $content.find( "img.vasl-image" ).attr( "src", url ) ; - var name = vo_entry.name ; + var caption = "" + vo_entry.name ; if ( data.elite ) - name += " \u24ba" ; - $content.find( "div.vo-name" ).html( name ) ; + caption += " \u24ba" ; + caption += "" ; + if ( vo_entry.type ) + caption += " (" + vo_entry.type + ")" ; + $content.find( "div.caption" ).html( caption ) ; for ( var i=0 ; i < capabilities.length ; ++i ) capabilities[i] = "" + capabilities[i] + "" ; $content.find( "div.vo-capabilities" ).html( capabilities.join("") ) ;