r99586 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99585‎ | r99586 | r99587 >
Date:22:16, 11 October 2011
Author:tparscal
Status:ok
Tags:
Comment:
Adjusted margins betwen challenge items and close behavior for popups
Modified paths:
  • /trunk/extensions/Contest/resources/contest.special.welcome.css (modified) (history)
  • /trunk/extensions/Contest/resources/jquery.contestChallenges.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/resources/contest.special.welcome.css
@@ -10,11 +10,10 @@
1111 #contest-challenges-list {
1212 float: left;
1313 width: 354px;
14 - margin: 1.5em 0 1.5em 0;
 14+ margin: 1.5em 0 0.5em 0;
1515 margin-top: 1.5em;
1616 }
17 -#contest-challenges-list ul,
18 -#contest-challenges-list li {
 17+#contest-challenges-list ul {
1918 list-style: none;
2019 list-style-image: none;
2120 margin: 0;
@@ -25,11 +24,13 @@
2625 display: inline-block;
2726 }
2827 .mw-codechallenge-box-outside {
 28+ list-style: none;
 29+ list-style-image: none;
2930 position: relative;
3031 display: block;
3132 width: 354px;
3233 padding: 0;
33 - margin: 0;
 34+ margin: 0 0 1em 0;
3435 /* @embed */
3536 background-image: url(images/box-sprite.png);
3637 background-position: 0 0;
Index: trunk/extensions/Contest/resources/jquery.contestChallenges.js
@@ -22,18 +22,21 @@
2323 $( '<li class="mw-codechallenge-box-outside"></li>' )
2424 .click( function( e ) {
2525 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' );
3128 box
32 - .removeClass( 'mw-codechallenge-box-selected' )
 29+ .addClass( 'mw-codechallenge-box-selected' )
3330 .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+ }
3841 } )
3942 .append(
4043 $( '<div class="mw-codechallenge-box-inside"></div>' )

Status & tagging log