Added nationality flags.

master
Pacman Ghost 6 years ago
parent d81ad6c988
commit 2f4f9154b6
  1. 2
      vasl_templates/webapp/static/css/main.css
  2. BIN
      vasl_templates/webapp/static/images/flags/allied-minor.png
  3. BIN
      vasl_templates/webapp/static/images/flags/american.png
  4. BIN
      vasl_templates/webapp/static/images/flags/axis-minor.png
  5. BIN
      vasl_templates/webapp/static/images/flags/british.png
  6. BIN
      vasl_templates/webapp/static/images/flags/chinese-gmd.png
  7. BIN
      vasl_templates/webapp/static/images/flags/chinese.png
  8. BIN
      vasl_templates/webapp/static/images/flags/finnish.png
  9. BIN
      vasl_templates/webapp/static/images/flags/french.png
  10. BIN
      vasl_templates/webapp/static/images/flags/german.png
  11. BIN
      vasl_templates/webapp/static/images/flags/italian.png
  12. BIN
      vasl_templates/webapp/static/images/flags/japanese.png
  13. BIN
      vasl_templates/webapp/static/images/flags/russian.png
  14. 6
      vasl_templates/webapp/static/main.js
  15. 1
      vasl_templates/webapp/templates/main.html
  16. 6
      vasl_templates/webapp/tests/test_players.py

@ -9,6 +9,8 @@ body { height: 100% ; }
position: absolute ; top: 5px ; bottom: 5px ; left: 5px ; right: 5px ;
}
#tabs .ui-tabs-nav li img { position: relative ; top: 2px ; height: 1em ; }
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
#tabs-scenario {

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

@ -122,7 +122,11 @@ function on_player_change( $select )
// update the tab label
var player_nat = $select.find( "option:selected" ).val() ;
var $elem = $("#tabs .ui-tabs-nav a[href='#tabs-ob" + player_id + "']") ;
$elem.text( gNationalities[player_nat].display_name + " OB" ) ;
var image_url = gImagesBaseUrl + "/flags/" + player_nat + ".png" ;
$elem.html(
"<img src='" + image_url + "'>&nbsp;" +
"<span>" + escapeHTML(gNationalities[player_nat].display_name) + " OB</span>"
) ;
// show/hide the nationality-specific buttons
for ( var nat in _NATIONALITY_SPECIFIC_BUTTONS ) {

@ -151,6 +151,7 @@
<script src="{{url_for('static',filename='jinja/jinja.js')}}"></script>
<script src="{{url_for('static',filename='growl/jquery.growl.js')}}"></script>
<script>
gImagesBaseUrl = "{{url_for('static',filename='images')}}" ;
gGetTemplatesUrl = "{{url_for('get_templates')}}" ;
gGetNationalitiesUrl = "{{url_for('get_nationalities')}}" ;
</script>

@ -26,7 +26,7 @@ def test_player_change( webapp, webdriver ):
for player_no in [1,2]:
player_id = _get_player( webdriver, player_no )
elem = find_child( webdriver, "#tabs .ui-tabs-nav a[href='#tabs-ob{}']".format( player_no ) )
assert elem.text == "{} OB".format( nationalities[player_id]["display_name"] )
assert elem.text.strip() == "{} OB".format( nationalities[player_id]["display_name"] )
# change player 1
sel = Select(
@ -34,7 +34,7 @@ def test_player_change( webapp, webdriver ):
)
sel.select_by_value( "finnish" )
elem = find_child( webdriver, "#tabs .ui-tabs-nav a[href='#tabs-ob1']" )
assert elem.text == "{} OB".format( nationalities["finnish"]["display_name"] )
assert elem.text.strip() == "{} OB".format( nationalities["finnish"]["display_name"] )
# change player 2
sel = Select(
@ -42,4 +42,4 @@ def test_player_change( webapp, webdriver ):
)
sel.select_by_value( "japanese" )
elem = find_child( webdriver, "#tabs .ui-tabs-nav a[href='#tabs-ob2']" )
assert elem.text == "{} OB".format( nationalities["japanese"]["display_name"] )
assert elem.text.strip() == "{} OB".format( nationalities["japanese"]["display_name"] )

Loading…
Cancel
Save