Index: trunk/extensions/Contest/Contest.i18n.php |
— | — | @@ -93,6 +93,7 @@ |
94 | 94 | 'contest-edit-confirm-delete' => 'Are you sure you want to delete this challenge?', |
95 | 95 | 'contest-edit-challenge-title' => 'Challenge title', |
96 | 96 | 'contest-edit-challenge-text' => 'Challenge text', |
| 97 | + 'contest-edit-challenge-oneline' => 'Short description', |
97 | 98 | |
98 | 99 | // Special:ContestWelcome |
99 | 100 | 'contest-welcome-unknown' => 'There is no contest with the provided name.', |
Index: trunk/extensions/Contest/specials/SpecialEditContest.php |
— | — | @@ -313,6 +313,7 @@ |
314 | 314 | 'id' => $challengeDbId, |
315 | 315 | 'text' => $request->getText( "challenge-text-$challengeId" ), |
316 | 316 | 'title' => $request->getText( "contest-challenge-$challengeId" ), |
| 317 | + 'oneline' => $request->getText( "challenge-oneline-$challengeId" ), |
317 | 318 | ) ); |
318 | 319 | } |
319 | 320 | |
Index: trunk/extensions/Contest/Contest.php |
— | — | @@ -157,6 +157,7 @@ |
158 | 158 | 'contest-edit-confirm-delete', |
159 | 159 | 'contest-edit-challenge-title', |
160 | 160 | 'contest-edit-challenge-text', |
| 161 | + 'contest-edit-challenge-oneline', |
161 | 162 | ), |
162 | 163 | 'dependencies' => array( |
163 | 164 | 'jquery.ui.button' |
Index: trunk/extensions/Contest/resources/contest.special.contest.js |
— | — | @@ -55,6 +55,20 @@ |
56 | 56 | ).append( ' ' ).append( this.titleInput ) |
57 | 57 | ); |
58 | 58 | |
| 59 | + this.onelineInput = $( '<input />' ).attr( { |
| 60 | + 'type': 'text', |
| 61 | + 'name': 'challenge-oneline-' + $this.attr( 'data-challenge-id' ), |
| 62 | + 'size': 45 |
| 63 | + } ).val( $this.attr( 'data-challenge-oneline' ) ); |
| 64 | + |
| 65 | + $this.append( |
| 66 | + $( '<div />' ).html( |
| 67 | + $( '<label />' ) |
| 68 | + .text( mw.msg( 'contest-edit-challenge-oneline' ) ) |
| 69 | + .attr( 'for', 'contest-oneline-' + $this.attr( 'data-challenge-id' ) ) |
| 70 | + ).append( ' ' ).append( this.onelineInput ) |
| 71 | + ); |
| 72 | + |
59 | 73 | this.textInput = $( '<textarea />' ).attr( { |
60 | 74 | 'name': 'challenge-text-' + $this.attr( 'data-challenge-id' ) |
61 | 75 | } ).val( $this.attr( 'data-challenge-text' ) ); |
— | — | @@ -97,7 +111,8 @@ |
98 | 112 | 'class': 'contest-challenge-input', |
99 | 113 | 'data-challenge-id': challenge.id, |
100 | 114 | 'data-challenge-title': challenge.title, |
101 | | - 'data-challenge-text': challenge.text |
| 115 | + 'data-challenge-text': challenge.text, |
| 116 | + 'data-challenge-oneline': challenge.oneline |
102 | 117 | } ); |
103 | 118 | |
104 | 119 | $tr = $( '<tr />' ); |
— | — | @@ -140,7 +155,8 @@ |
141 | 156 | addChallenge( { |
142 | 157 | 'id': $this.attr( 'data-challenge-id' ), |
143 | 158 | 'title': $this.attr( 'data-challenge-title' ), |
144 | | - 'text': $this.attr( 'data-challenge-text' ) |
| 159 | + 'text': $this.attr( 'data-challenge-text' ), |
| 160 | + 'oneline': $this.attr( 'data-challenge-oneline' ), |
145 | 161 | } ); |
146 | 162 | } ); |
147 | 163 | |