CSS integration and game interactions (part 5)

The board results are explained, the hover images of the lobby have been integrated. The tests of the auth plugin were completed to reach 100% coverage.

explaining the result board

A link Why? is added to the bubble showing the results of a game.

When it is clicked, the background is substituted with an explanation and the list of winners is hidden.

The links are added to the HTML structure of the complete state:

<div class="cardstories_unset_why">(Back to "Who won the game")</div>
<div class="cardstories_set_why">(Why?)</div>

It is bound to an action that sets or unset the cardstories_why class:

$('.cardstories_set_why', element).unbind('click').click(function() {
   element.toggleClass('cardstories_why', true);
$('.cardstories_unset_why', element).unbind('click').click(function() {
    element.toggleClass('cardstories_why', false);

The CSS is modified to preform the desired substitution. It was previously structured using padding, but it is inconvenient when dealing with elements that must be shown and hidden.

.cardstories .cardstories_complete.cardstories_owner .cardstories_complete_explain {
    position: absolute;
    background: transparent url('images/complete_owner_explain.png') no-repeat left top;
    top: 195px;
    right: 30px;
    height: 152px;
    width: 731px;

.cardstories .cardstories_complete.cardstories_owner.cardstories_why .cardstories_complete_explain {
    position: absolute;
    background: transparent url('images/complete_owner_why.png') no-repeat left top;
    top: 195px;
    left: 12px;
    height: 150px;
    width: 988px;

lobby tabs

The lobby tabs were inverted and the hover state was missing. The hover state is slightly different (eyes up, white color of the font).

other integration changes

auth plugin

The auth plugin was originally part of the core. The tests were moved to the plugin directory. They were also modified to reach 100% coverage. The part that was not tested was related to a data corruption that was mistaken for a bug.