From e314c354c0ae20a4563fee28168d5517c1bf507c Mon Sep 17 00:00:00 2001 From: Nicolas Ronvel Date: Sat, 11 Jul 2015 14:58:25 +0200 Subject: [PATCH] Show / Hide details on the Selected Supremes Better style on the buttons --- builder/builder.html | 23 +++++++++++++++++++++++ builder/css/style.css | 17 ++++++++++++----- builder/mustache/supremes.mst | 4 ++-- builder/mustache/supremes_selection.mst | 16 +++++++++++++--- 4 files changed, 50 insertions(+), 10 deletions(-) diff --git a/builder/builder.html b/builder/builder.html index 182e127..6acbacf 100644 --- a/builder/builder.html +++ b/builder/builder.html @@ -210,6 +210,9 @@

A team builder for Pulp City

$(".supreme-selection").each(function() { $( this ).hide(); }); // Click on Buttons $(".btn-unselect-supreme").click(function() { unselect_supreme(getSupremeId("btn-unselect-supreme-", $(this).attr('id')), true); }); + $('#btnHideSelectionFooter').click(function() { hide_selection_footer(); }); + $('#btnShowSelectionFooter').click(function() { show_selection_footer(); }); + $(".supreme-selection").click(function() { toggle_selection_footer(getSupremeId("supreme-selection-", $(this).attr('id'))); }); }, dataType: "text" }); @@ -374,6 +377,24 @@

A team builder for Pulp City

$supremes.detach().appendTo($supreme_list); } +function hide_selection_footer() +{ + $('.supreme-selected-list-element .supreme-role').slideUp(300); + $('.supreme-selected-list-element .bottom-footer').slideUp(300); +} + +function show_selection_footer() +{ + $('.supreme-selected-list-element .supreme-role').slideDown(300); + $('.supreme-selected-list-element .bottom-footer').slideDown(300); +} + +function toggle_selection_footer(id) +{ + $('#supreme-selection-' + id +' .supreme-role').slideToggle(300); + $('#supreme-selection-' + id +' .bottom-footer').slideToggle(300); +} + /*****************/ /*** The Roles ***/ /*****************/ @@ -739,6 +760,8 @@

A team builder for Pulp City

update_summary(); check_honorary_member(); + + // Events on the Affiliation changeAffiliation(); $('#selTeamAffiliation').change(confirmAffiliationChange); diff --git a/builder/css/style.css b/builder/css/style.css index 4e97145..41fd1da 100644 --- a/builder/css/style.css +++ b/builder/css/style.css @@ -77,11 +77,18 @@ img.supreme-freelance { /* Selected supremes */ .supremes-selected-list { - background-color: #222222; - border-width: 4px; - border-style: inset; - border-color: #CCCCCC; - color: #CCCCCC; + background-color: #EEEEEE; +} + +.supremes-selected-list .section-title { + text-align: center; + font-size: 18; + font-weight: bold; +} + +.supremes-selected-list .btn-toolbar { + margin-top: 2px; + margin-bottom: 3px; } .supreme-selected-list-element { diff --git a/builder/mustache/supremes.mst b/builder/mustache/supremes.mst index cef2773..0b58c44 100644 --- a/builder/mustache/supremes.mst +++ b/builder/mustache/supremes.mst @@ -17,10 +17,10 @@