Index: trunk/extensions/Contest/resources/contest.special.welcome.css |
— | — | @@ -10,11 +10,10 @@ |
11 | 11 | #contest-challenges-list { |
12 | 12 | float: left; |
13 | 13 | width: 354px; |
14 | | - margin: 1.5em 0 1.5em 0; |
| 14 | + margin: 1.5em 0 0.5em 0; |
15 | 15 | margin-top: 1.5em; |
16 | 16 | } |
17 | | -#contest-challenges-list ul, |
18 | | -#contest-challenges-list li { |
| 17 | +#contest-challenges-list ul { |
19 | 18 | list-style: none; |
20 | 19 | list-style-image: none; |
21 | 20 | margin: 0; |
— | — | @@ -25,11 +24,13 @@ |
26 | 25 | display: inline-block; |
27 | 26 | } |
28 | 27 | .mw-codechallenge-box-outside { |
| 28 | + list-style: none; |
| 29 | + list-style-image: none; |
29 | 30 | position: relative; |
30 | 31 | display: block; |
31 | 32 | width: 354px; |
32 | 33 | padding: 0; |
33 | | - margin: 0; |
| 34 | + margin: 0 0 1em 0; |
34 | 35 | /* @embed */ |
35 | 36 | background-image: url(images/box-sprite.png); |
36 | 37 | background-position: 0 0; |
Index: trunk/extensions/Contest/resources/jquery.contestChallenges.js |
— | — | @@ -22,18 +22,21 @@ |
23 | 23 | $( '<li class="mw-codechallenge-box-outside"></li>' ) |
24 | 24 | .click( function( e ) { |
25 | 25 | var box = $(this); |
26 | | - box |
27 | | - .addClass( 'mw-codechallenge-box-selected' ) |
28 | | - .find( '.mw-codechallenge-popup' ) |
29 | | - .fadeIn( 'fast' ); |
30 | | - $(document).one( 'click', function() { |
| 26 | + if ( !box.hasClass( 'mw-codechallenge-box-selected' ) ) { |
| 27 | + $( '.mw-codechallenge-popup' ).not( box ).fadeOut( 'fast' ); |
31 | 28 | box |
32 | | - .removeClass( 'mw-codechallenge-box-selected' ) |
| 29 | + .addClass( 'mw-codechallenge-box-selected' ) |
33 | 30 | .find( '.mw-codechallenge-popup' ) |
34 | | - .fadeOut( 'fast' ); |
35 | | - } ); |
36 | | - e.stopPropagation(); |
37 | | - return false; |
| 31 | + .fadeIn( 'fast' ); |
| 32 | + $(document).one( 'click', function() { |
| 33 | + box |
| 34 | + .removeClass( 'mw-codechallenge-box-selected' ) |
| 35 | + .find( '.mw-codechallenge-popup' ) |
| 36 | + .fadeOut( 'fast' ); |
| 37 | + } ); |
| 38 | + e.stopPropagation(); |
| 39 | + return false; |
| 40 | + } |
38 | 41 | } ) |
39 | 42 | .append( |
40 | 43 | $( '<div class="mw-codechallenge-box-inside"></div>' ) |