Index: trunk/extensions/Contest/specials/SpecialContestWelcome.php |
— | — | @@ -106,24 +106,24 @@ |
107 | 107 | protected function showChallenges( Contest $contest ) { |
108 | 108 | $this->showNoJSFallback( $contest ); |
109 | 109 | |
110 | | - $this->getOutput()->addHTML( '<div id="contest-challanges"></div>' ); |
| 110 | + $this->getOutput()->addHTML( '<div id="contest-challenges"></div>' ); |
111 | 111 | |
112 | 112 | $this->addContestJS( $contest ); |
113 | 113 | } |
114 | 114 | |
115 | 115 | protected function addContestJS( Contest $contest ) { |
116 | | - $challanges = array(); |
| 116 | + $challenges = array(); |
117 | 117 | |
118 | 118 | foreach ( $contest->getChallenges() as /* ContestChallenge */ $challenge ) { |
119 | 119 | $data = $challenge->toArray(); |
120 | 120 | $data['target'] = $this->getSignupLink( $contest->getField( 'name' ), $challenge->getId() ); |
121 | | - $challanges[] = $data; |
| 121 | + $challenges[] = $data; |
122 | 122 | } |
123 | 123 | |
124 | 124 | $this->getOutput()->addScript( |
125 | 125 | Skin::makeVariablesScript( |
126 | 126 | array( |
127 | | - 'ContestChallanges' => $challanges, |
| 127 | + 'ContestChallenges' => $challenges, |
128 | 128 | 'ContestConfig' => array() |
129 | 129 | ) |
130 | 130 | ) |
Index: trunk/extensions/Contest/Contest.php |
— | — | @@ -185,7 +185,7 @@ |
186 | 186 | ) |
187 | 187 | ); |
188 | 188 | |
189 | | -$wgResourceModules['jquery.contestChallanges'] = $moduleTemplate + array( |
| 189 | +$wgResourceModules['jquery.contestChallenges'] = $moduleTemplate + array( |
190 | 190 | 'scripts' => array( |
191 | 191 | 'jquery.contestChallenges.js' |
192 | 192 | ) |
— | — | @@ -199,7 +199,7 @@ |
200 | 200 | 'contest.special.welcome.css', |
201 | 201 | ), |
202 | 202 | 'dependencies' => array( |
203 | | - 'jquery.contestChallanges', |
| 203 | + 'jquery.contestChallenges', |
204 | 204 | ), |
205 | 205 | 'messages' => array( |
206 | 206 | 'contest-welcome-select-header' |
Index: trunk/extensions/Contest/api/ApiQueryChallenges.php |
— | — | @@ -49,7 +49,7 @@ |
50 | 50 | * @see includes/api/ApiBase#getDescription() |
51 | 51 | */ |
52 | 52 | public function getDescription() { |
53 | | - return 'API module for querying contest challanges'; |
| 53 | + return 'API module for querying contest challenges'; |
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
Index: trunk/extensions/Contest/resources/contest.special.welcome.css |
— | — | @@ -8,19 +8,19 @@ |
9 | 9 | |
10 | 10 | |
11 | 11 | /* dialog type selection */ |
12 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list { |
| 12 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list { |
13 | 13 | float: left; |
14 | 14 | width: 250px; |
15 | 15 | } |
16 | 16 | |
17 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list ul { |
| 17 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list ul { |
18 | 18 | list-style: none; |
19 | 19 | margin: 0; |
20 | 20 | padding: 0; |
21 | 21 | } |
22 | 22 | |
23 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list ul li, |
24 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a |
| 23 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list ul li, |
| 24 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a |
25 | 25 | { |
26 | 26 | display: block; |
27 | 27 | width: 250px; |
— | — | @@ -32,19 +32,19 @@ |
33 | 33 | outline: none; |
34 | 34 | } |
35 | 35 | |
36 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a:hover, |
37 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a:focus { |
| 36 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a:hover, |
| 37 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a:focus { |
38 | 38 | text-decoration:none; |
39 | 39 | } |
40 | 40 | |
41 | 41 | /* IGNORED BY IE6 */ |
42 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list ul > li, |
43 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list ul li > a { |
| 42 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list ul > li, |
| 43 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list ul li > a { |
44 | 44 | display: inline-block; |
45 | 45 | } |
46 | 46 | |
47 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a .mw-codechallenge-left-cap, |
48 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a .mw-codechallenge-right-cap { |
| 47 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a .mw-codechallenge-left-cap, |
| 48 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a .mw-codechallenge-right-cap { |
49 | 49 | padding: 0; |
50 | 50 | margin: 0; |
51 | 51 | width: 6px; |
— | — | @@ -53,56 +53,56 @@ |
54 | 54 | top: 0px; |
55 | 55 | } |
56 | 56 | |
57 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a .mw-codechallenge-l-cap, |
58 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a .mw-codechallenge-r-cap, |
59 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a .mw-codechallenge-icon-box { |
| 57 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a .mw-codechallenge-l-cap, |
| 58 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a .mw-codechallenge-r-cap, |
| 59 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a .mw-codechallenge-icon-box { |
60 | 60 | background-repeat: no-repeat; |
61 | 61 | height: 66px; |
62 | 62 | position: absolute; |
63 | 63 | } |
64 | 64 | |
65 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a .mw-codechallenge-l-cap, |
66 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a .mw-codechallenge-r-cap { |
| 65 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a .mw-codechallenge-l-cap, |
| 66 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a .mw-codechallenge-r-cap { |
67 | 67 | width: 6px; |
68 | 68 | } |
69 | 69 | |
70 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a .mw-codechallenge-l-cap { |
| 70 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a .mw-codechallenge-l-cap { |
71 | 71 | /* @noflip */ |
72 | 72 | left: 0px; |
73 | 73 | /* @embed */ |
74 | 74 | background-image: url(images/icon-box-left-cap.png); |
75 | 75 | } |
76 | 76 | |
77 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a:hover .mw-codechallenge-l-cap, |
78 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a:focus .mw-codechallenge-l-cap { |
| 77 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a:hover .mw-codechallenge-l-cap, |
| 78 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a:focus .mw-codechallenge-l-cap { |
79 | 79 | /* @embed */ |
80 | 80 | background-image: url(images/icon-box-hover-left-cap.png); |
81 | 81 | } |
82 | 82 | |
83 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a.selected .mw-codechallenge-l-cap { |
| 83 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a.selected .mw-codechallenge-l-cap { |
84 | 84 | /* @embed */ |
85 | 85 | background-image: url(images/icon-box-selected-left-cap.png); |
86 | 86 | } |
87 | 87 | |
88 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a .mw-codechallenge-r-cap { |
| 88 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a .mw-codechallenge-r-cap { |
89 | 89 | /* @noflip */ |
90 | 90 | right: 0px; |
91 | 91 | /* @embed */ |
92 | 92 | background-image: url(images/icon-box-right-cap.png); |
93 | 93 | } |
94 | 94 | |
95 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a:hover .mw-codechallenge-r-cap, |
96 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a:focus .mw-codechallenge-r-cap { |
| 95 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a:hover .mw-codechallenge-r-cap, |
| 96 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a:focus .mw-codechallenge-r-cap { |
97 | 97 | /* @embed */ |
98 | 98 | background-image: url(images/icon-box-hover-right-cap.png); |
99 | 99 | } |
100 | 100 | |
101 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a.selected .mw-codechallenge-r-cap { |
| 101 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a.selected .mw-codechallenge-r-cap { |
102 | 102 | /* @embed */ |
103 | 103 | background-image: url(images/icon-box-selected-right-cap.png); |
104 | 104 | } |
105 | 105 | |
106 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a .mw-codechallenge-inside { |
| 106 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a .mw-codechallenge-inside { |
107 | 107 | padding: 0; |
108 | 108 | margin: 0; |
109 | 109 | width: 238px; |
— | — | @@ -117,16 +117,16 @@ |
118 | 118 | background-repeat: repeat-x; |
119 | 119 | } |
120 | 120 | |
121 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a:hover .mw-codechallenge-inside, |
122 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a:focus .mw-codechallenge-inside { |
| 121 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a:hover .mw-codechallenge-inside, |
| 122 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a:focus .mw-codechallenge-inside { |
123 | 123 | background-position: 0px -66px; |
124 | 124 | } |
125 | 125 | |
126 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a.selected .mw-codechallenge-inside { |
| 126 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a.selected .mw-codechallenge-inside { |
127 | 127 | background-position: 0px -132px; |
128 | 128 | } |
129 | 129 | |
130 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a .mw-codechallenge-icon-box { |
| 130 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a .mw-codechallenge-icon-box { |
131 | 131 | padding: 0; |
132 | 132 | margin: 0; |
133 | 133 | width: 53px; |
— | — | @@ -138,7 +138,7 @@ |
139 | 139 | background-image: url(images/button_arrow.png); |
140 | 140 | } |
141 | 141 | |
142 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a .mw-codechallenge-icon-box img { |
| 142 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a .mw-codechallenge-icon-box img { |
143 | 143 | padding: 0; |
144 | 144 | margin: 0; |
145 | 145 | width: 53px; |
— | — | @@ -148,18 +148,18 @@ |
149 | 149 | left: 0px; |
150 | 150 | } |
151 | 151 | |
152 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a:hover .mw-codechallenge-icon-box, |
153 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a:focus .mw-codechallenge-icon-box { |
| 152 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a:hover .mw-codechallenge-icon-box, |
| 153 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a:focus .mw-codechallenge-icon-box { |
154 | 154 | /* @embed */ |
155 | 155 | background-image: url(images/button_arrow_hover.png); |
156 | 156 | } |
157 | 157 | |
158 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a.selected .mw-codechallenge-icon-box { |
| 158 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a.selected .mw-codechallenge-icon-box { |
159 | 159 | /* @embed */ |
160 | 160 | background-image: url(images/icon-box-selected.png); |
161 | 161 | } |
162 | 162 | |
163 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a .mw-codechallenge-link-text { |
| 163 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a .mw-codechallenge-link-text { |
164 | 164 | padding: 0; |
165 | 165 | margin: 0; |
166 | 166 | width: 170px; |
— | — | @@ -174,7 +174,7 @@ |
175 | 175 | color: white; |
176 | 176 | } |
177 | 177 | |
178 | | -/*#mw-codechallenge-dialog*/ #contest-challanges-list a .mw-codechallenge-no-icon .mw-codechallenge-link-text { |
| 178 | +/*#mw-codechallenge-dialog*/ #contest-challenges-list a .mw-codechallenge-no-icon .mw-codechallenge-link-text { |
179 | 179 | left: 3px; |
180 | 180 | } |
181 | 181 | |
Index: trunk/extensions/Contest/resources/contest.special.welcome.js |
— | — | @@ -10,8 +10,8 @@ |
11 | 11 | |
12 | 12 | $( document ).ready( function() { |
13 | 13 | |
14 | | - $( '#contest-challanges' ).contestChallanges( |
15 | | - mw.config.get( 'ContestChallanges' ), |
| 14 | + $( '#contest-challenges' ).contestChallenges( |
| 15 | + mw.config.get( 'ContestChallenges' ), |
16 | 16 | mw.config.get( 'ContestConfig' ) |
17 | 17 | ); |
18 | 18 | |
Index: trunk/extensions/Contest/resources/jquery.contestChallenges.js |
— | — | @@ -6,24 +6,24 @@ |
7 | 7 | * @author Jeroen De Dauw <jeroendedauw at gmail dot com> |
8 | 8 | */ |
9 | 9 | |
10 | | -( function ( $, mw ) { $.fn.contestChallanges = function( challanges, config ) { |
| 10 | +( function ( $, mw ) { $.fn.contestChallenges = function( challenges, config ) { |
11 | 11 | |
12 | | - this.challanges = challanges; |
| 12 | + this.challenges = challenges; |
13 | 13 | this.config = config; |
14 | 14 | |
15 | 15 | var _this = this; |
16 | 16 | var $this = $( this ); |
17 | 17 | |
18 | | - this.challangesList = null; |
| 18 | + this.challengesList = null; |
19 | 19 | |
20 | | - this.showChallange = function( challange ) { |
21 | | - // TODO: show challange pop-up with text and participate button |
22 | | - window.location = challange.target; |
| 20 | + this.showChallenge = function( challenge ) { |
| 21 | + // TODO: show challenge pop-up with text and participate button |
| 22 | + window.location = challenge.target; |
23 | 23 | }; |
24 | 24 | |
25 | | - this.addChallange = function( challange ) { |
| 25 | + this.addChallenge = function( challenge ) { |
26 | 26 | var item = $( '<a />' ).attr( 'href', '#' ).html( '' ).click( function() { |
27 | | - _this.showChallange( challange ); |
| 27 | + _this.showChallenge( challenge ); |
28 | 28 | } ); |
29 | 29 | |
30 | 30 | item.append( $( '<div />' ).attr( 'class', 'mw-codechallenge-l-cap' ) ); |
— | — | @@ -31,8 +31,8 @@ |
32 | 32 | var innerDiv = $( '<div />' ).attr( 'class', 'mw-codechallenge-inside' ); |
33 | 33 | |
34 | 34 | innerDiv.html( $( '<div />' ).attr( 'class', 'mw-codechallenge-link-text' ) |
35 | | - .html( $( '<p />' ).text( challange.title ) ) |
36 | | - .append( $( '<p />' ).text( challange.oneline ) ) |
| 35 | + .html( $( '<p />' ).text( challenge.title ) ) |
| 36 | + .append( $( '<p />' ).text( challenge.oneline ) ) |
37 | 37 | ); |
38 | 38 | |
39 | 39 | innerDiv.append( $( '<div />' ).attr( 'class', 'mw-codechallenge-icon-box' ) ); |
— | — | @@ -40,23 +40,23 @@ |
41 | 41 | |
42 | 42 | item.append( $( '<div />' ).attr( 'class', 'mw-codechallenge-r-cap' ) ); |
43 | 43 | |
44 | | - this.challangesList.append( $( '<li />' ).html( item ) ); |
| 44 | + this.challengesList.append( $( '<li />' ).html( item ) ); |
45 | 45 | } |
46 | 46 | |
47 | | - this.initChallanges = function() { |
48 | | - this.challangesList = $( '<ul />' ).attr( 'id', 'contest-challanges-list' ); |
| 47 | + this.initChallenges = function() { |
| 48 | + this.challengesList = $( '<ul />' ).attr( 'id', 'contest-challenges-list' ); |
49 | 49 | |
50 | | - for ( var i in this.challanges ) { |
51 | | - this.addChallange( this.challanges[i] ); |
| 50 | + for ( var i in this.challenges ) { |
| 51 | + this.addChallenge( this.challenges[i] ); |
52 | 52 | } |
53 | 53 | }; |
54 | 54 | |
55 | 55 | this.init = function() { |
56 | 56 | $this.html( $( '<h3 />' ).text( mw.msg( 'contest-welcome-select-header' ) ) ); |
57 | 57 | |
58 | | - this.initChallanges(); |
| 58 | + this.initChallenges(); |
59 | 59 | |
60 | | - $this.append( this.challangesList ); |
| 60 | + $this.append( this.challengesList ); |
61 | 61 | }; |
62 | 62 | |
63 | 63 | this.init(); |
Index: trunk/extensions/Contest/Contest.sql |
— | — | @@ -49,9 +49,9 @@ |
50 | 50 | challenge_id INT unsigned NOT NULL auto_increment PRIMARY KEY, -- Challenge id |
51 | 51 | challenge_contest_id INT unsigned NOT NULL, -- Foreign key on contests.contest_id |
52 | 52 | |
53 | | - challenge_text TEXT NOT NULL, -- Full challange description |
54 | | - challenge_title VARCHAR(255) NOT NULL, -- Title of the challange |
55 | | - challenge_oneline TEXT NOT NULL -- One line description of the challange |
| 53 | + challenge_text TEXT NOT NULL, -- Full challenge description |
| 54 | + challenge_title VARCHAR(255) NOT NULL, -- Title of the challenge |
| 55 | + challenge_oneline TEXT NOT NULL -- One line description of the challenge |
56 | 56 | ) /*$wgDBTableOptions*/; |
57 | 57 | |
58 | 58 | -- Judge votes |