X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.widgets%2Fmw.widgets.CalendarWidget.js;h=94aa3b9c5f07de6afc42c3ae3afc0762933bd138;hp=57a3d9c0bc768435666b28ebdeba14c58762bb6c;hb=6f3d5a5204770b7e9076ec0c956631c32a9e1114;hpb=dfaa26a7b19ab65190a76cd32259a3637cc3e2fd diff --git a/resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js b/resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js index 57a3d9c0bc..94aa3b9c5f 100644 --- a/resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js +++ b/resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js @@ -5,7 +5,7 @@ * @license The MIT License (MIT); see LICENSE.txt */ /* global moment */ -( function ( $, mw ) { +( function () { /** * Creates an mw.widgets.CalendarWidget object. @@ -229,14 +229,20 @@ ); currentMonth.add( 1, 'month' ); } - // Shuffle the array to display months in columns rather than rows. + // Shuffle the array to display months in columns rather than rows: + // | Jan | Jul | + // | Feb | Aug | + // | Mar | Sep | + // | Apr | Oct | + // | May | Nov | + // | Jun | Dec | items = [ - items[ 0 ], items[ 6 ], // | January | July | - items[ 1 ], items[ 7 ], // | February | August | - items[ 2 ], items[ 8 ], // | March | September | - items[ 3 ], items[ 9 ], // | April | October | - items[ 4 ], items[ 10 ], // | May | November | - items[ 5 ], items[ 11 ] // | June | December | + items[ 0 ], items[ 6 ], + items[ 1 ], items[ 7 ], + items[ 2 ], items[ 8 ], + items[ 3 ], items[ 9 ], + items[ 4 ], items[ 10 ], + items[ 5 ], items[ 11 ] ]; break; @@ -288,7 +294,7 @@ } setTimeout( function () { $bodyWrapper.addClass( 'mw-widget-calendarWidget-body-wrapper-fade-' + fade ); - }.bind( this ), 0 ); + } ); } else { this.$oldBody.replaceWith( this.$body ); } @@ -582,4 +588,4 @@ return this; }; -}( jQuery, mediaWiki ) ); +}() );