diff --git a/vasl_templates/webapp/static/css/main.css b/vasl_templates/webapp/static/css/main.css
index c7e3374..eec2488 100644
--- a/vasl_templates/webapp/static/css/main.css
+++ b/vasl_templates/webapp/static/css/main.css
@@ -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 {
diff --git a/vasl_templates/webapp/static/images/flags/allied-minor.png b/vasl_templates/webapp/static/images/flags/allied-minor.png
new file mode 100755
index 0000000..6133139
Binary files /dev/null and b/vasl_templates/webapp/static/images/flags/allied-minor.png differ
diff --git a/vasl_templates/webapp/static/images/flags/american.png b/vasl_templates/webapp/static/images/flags/american.png
new file mode 100755
index 0000000..56103db
Binary files /dev/null and b/vasl_templates/webapp/static/images/flags/american.png differ
diff --git a/vasl_templates/webapp/static/images/flags/axis-minor.png b/vasl_templates/webapp/static/images/flags/axis-minor.png
new file mode 100755
index 0000000..79b78c6
Binary files /dev/null and b/vasl_templates/webapp/static/images/flags/axis-minor.png differ
diff --git a/vasl_templates/webapp/static/images/flags/british.png b/vasl_templates/webapp/static/images/flags/british.png
new file mode 100755
index 0000000..e2656a9
Binary files /dev/null and b/vasl_templates/webapp/static/images/flags/british.png differ
diff --git a/vasl_templates/webapp/static/images/flags/chinese-gmd.png b/vasl_templates/webapp/static/images/flags/chinese-gmd.png
new file mode 100755
index 0000000..d7b77e1
Binary files /dev/null and b/vasl_templates/webapp/static/images/flags/chinese-gmd.png differ
diff --git a/vasl_templates/webapp/static/images/flags/chinese.png b/vasl_templates/webapp/static/images/flags/chinese.png
new file mode 100755
index 0000000..50ed813
Binary files /dev/null and b/vasl_templates/webapp/static/images/flags/chinese.png differ
diff --git a/vasl_templates/webapp/static/images/flags/finnish.png b/vasl_templates/webapp/static/images/flags/finnish.png
new file mode 100755
index 0000000..676ceab
Binary files /dev/null and b/vasl_templates/webapp/static/images/flags/finnish.png differ
diff --git a/vasl_templates/webapp/static/images/flags/french.png b/vasl_templates/webapp/static/images/flags/french.png
new file mode 100755
index 0000000..8933d6f
Binary files /dev/null and b/vasl_templates/webapp/static/images/flags/french.png differ
diff --git a/vasl_templates/webapp/static/images/flags/german.png b/vasl_templates/webapp/static/images/flags/german.png
new file mode 100755
index 0000000..ff08ddf
Binary files /dev/null and b/vasl_templates/webapp/static/images/flags/german.png differ
diff --git a/vasl_templates/webapp/static/images/flags/italian.png b/vasl_templates/webapp/static/images/flags/italian.png
new file mode 100755
index 0000000..3d36a26
Binary files /dev/null and b/vasl_templates/webapp/static/images/flags/italian.png differ
diff --git a/vasl_templates/webapp/static/images/flags/japanese.png b/vasl_templates/webapp/static/images/flags/japanese.png
new file mode 100755
index 0000000..2b18fda
Binary files /dev/null and b/vasl_templates/webapp/static/images/flags/japanese.png differ
diff --git a/vasl_templates/webapp/static/images/flags/russian.png b/vasl_templates/webapp/static/images/flags/russian.png
new file mode 100755
index 0000000..a1acda4
Binary files /dev/null and b/vasl_templates/webapp/static/images/flags/russian.png differ
diff --git a/vasl_templates/webapp/static/main.js b/vasl_templates/webapp/static/main.js
index e02c699..9618bf1 100644
--- a/vasl_templates/webapp/static/main.js
+++ b/vasl_templates/webapp/static/main.js
@@ -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(
+ " " +
+ "" + escapeHTML(gNationalities[player_nat].display_name) + " OB"
+ ) ;
// show/hide the nationality-specific buttons
for ( var nat in _NATIONALITY_SPECIFIC_BUTTONS ) {
diff --git a/vasl_templates/webapp/templates/main.html b/vasl_templates/webapp/templates/main.html
index e99d2cf..c6372c0 100644
--- a/vasl_templates/webapp/templates/main.html
+++ b/vasl_templates/webapp/templates/main.html
@@ -151,6 +151,7 @@
diff --git a/vasl_templates/webapp/tests/test_players.py b/vasl_templates/webapp/tests/test_players.py
index 959f4f2..080af1f 100644
--- a/vasl_templates/webapp/tests/test_players.py
+++ b/vasl_templates/webapp/tests/test_players.py
@@ -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"] )