r103028 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103027‎ | r103028 | r103029 >
Date:20:58, 14 November 2011
Author:rsterbin
Status:ok
Tags:
Comment:
Renamed jquery plugin and css class prefixes
Updated the css file accordingly
Added info about CTAs to the jquery plugin file doc block
Fixed a bug where the ratings labels and tooltips were missing (due to not being in the module messages list)
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedback/ext.articleFeedback.js (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedback/jquery.articleFeedback.css (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedback/jquery.articleFeedback.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedback/jquery.articleFeedback.js
@@ -13,21 +13,27 @@
1414 * This plugin supports a choice of forms and CTAs. Each form option is called
1515 * a "bucket" because users are sorted into buckets and each bucket gets a
1616 * different form option. Right now, these buckets are:
17 - * 1. Share Your Feedback
 17+ * 1. Share Your Feedback - NOT implemented
1818 * Has a yes/no toggle on "Did you find what you were looking for?" and a
1919 * text area for comments.
20 - * 2. Make A Suggestion
 20+ * 2. Make A Suggestion - NOT implemented
2121 * Modeled after getsatisfaction.com; users can say that their comment is a
2222 * suggestion, question, problem, or praise.
23 - * 3. Review This Page
 23+ * 3. Review This Page - NOT implemented
2424 * Has a single star rating field and a comment box.
25 - * 4. Help Edit This Page
 25+ * 4. Help Edit This Page - NOT implemented
2626 * Has no input fields; just links to the Edit page.
2727 * 5. Rate This Page
2828 * The existing article feedback tool, except that it can use any of the
2929 * CTA types.
3030 * 6. No Feedback
3131 * Shows nothing at all.
 32+ * The available CTAs are:
 33+ * 1. Edit this page
 34+ * Just a big glossy button to send the user to the edit page.
 35+ * 2. Take a survey - NOT implemented
 36+ * Asks the user to take a survey, which will probably pop up in a new
 37+ * window.
3238 *
3339 * This file is really long, so it's commented with manual fold markers. To use
3440 * folds this way in vim:
@@ -43,16 +49,16 @@
4450
4551 ( function ( $ ) {
4652
47 -// {{{ articleFeedback definition
 53+// {{{ articleFeedbackv5 definition
4854
49 - $.articleFeedback = {};
 55+ $.articleFeedbackv5 = {};
5056
5157 // {{{ Properties
5258
5359 /**
5460 * Temporary -- this will need to come from the config.
5561 */
56 - $.articleFeedback.debug = true;
 62+ $.articleFeedbackv5.debug = true;
5763
5864 /**
5965 * The bucket ID is the variation of the Article Feedback form chosen for this
@@ -61,7 +67,7 @@
6268 *
6369 * @see http://www.mediawiki.org/wiki/Article_feedback/Version_5/Feature_Requirements#Feedback_form_interface
6470 */
65 - $.articleFeedback.bucketId = 6;
 71+ $.articleFeedbackv5.bucketId = 6;
6672
6773 /**
6874 * The CTA is the view presented to a user who has successfully submitted
@@ -69,33 +75,33 @@
7076 *
7177 * @see http://www.mediawiki.org/wiki/Article_feedback/Version_5/Feature_Requirements#Calls_to_Action
7278 */
73 - $.articleFeedback.ctaId = 1;
 79+ $.articleFeedbackv5.ctaId = 1;
7480
7581 /**
7682 * Use the mediawiki util resource's config method to find the correct url to
7783 * call for all ajax requests.
7884 */
79 - $.articleFeedback.apiUrl = mw.config.get( 'wgScriptPath' ) + '/api.php';
 85+ $.articleFeedbackv5.apiUrl = mw.config.get( 'wgScriptPath' ) + '/api.php';
8086
8187 /**
8288 * Is this an anonymous user?
8389 */
84 - $.articleFeedback.anonymous = mw.user.anonymous();
 90+ $.articleFeedbackv5.anonymous = mw.user.anonymous();
8591
8692 /**
8793 * If not, what's their user id?
8894 */
89 - $.articleFeedback.userId = mw.user.id();
 95+ $.articleFeedbackv5.userId = mw.user.id();
9096
9197 /**
9298 * The page ID
9399 */
94 - $.articleFeedback.pageId = mw.config.get( 'wgArticleId' );
 100+ $.articleFeedbackv5.pageId = mw.config.get( 'wgArticleId' );
95101
96102 /**
97103 * The revision ID
98104 */
99 - $.articleFeedback.revisionId = mw.config.get( 'wgCurRevisionId' );
 105+ $.articleFeedbackv5.revisionId = mw.config.get( 'wgCurRevisionId' );
100106
101107 // }}}
102108 // {{{ Bucket UI objects
@@ -103,7 +109,7 @@
104110 /**
105111 * Set up the buckets' UI objects
106112 */
107 - $.articleFeedback.buckets = {
 113+ $.articleFeedbackv5.buckets = {
108114
109115 // {{{ Bucket 5
110116
@@ -137,74 +143,71 @@
138144
139145 // The overall template
140146 var block_tpl = '\
141 - <form>\
142 - <div class="articleFeedback-panel">\
143 - <div class="articleFeedback-buffer articleFeedback-ui">\
144 - <div class="articleFeedback-switch articleFeedback-switch-report articleFeedback-visibleWith-form" rel="report"><html:msg key="report-switch-label" /></div>\
145 - <div class="articleFeedback-switch articleFeedback-switch-form articleFeedback-visibleWith-report" rel="form"><html:msg key="form-switch-label" /></div>\
146 - <div class="articleFeedback-title articleFeedback-visibleWith-form"><html:msg key="form-panel-title" /></div>\
147 - <div class="articleFeedback-title articleFeedback-visibleWith-report"><html:msg key="report-panel-title" /></div>\
148 - <div class="articleFeedback-explanation articleFeedback-visibleWith-form"><a class="articleFeedback-explanation-link"><html:msg key="form-panel-explanation" /></a></div>\
149 - <div class="articleFeedback-description articleFeedback-visibleWith-report"><html:msg key="report-panel-description" /></div>\
150 - <div style="clear:both;"></div>\
151 - <div class="articleFeedback-ratings"></div>\
152 - <div style="clear:both;"></div>\
153 - <div class="articleFeedback-options">\
154 - <div class="articleFeedback-expertise articleFeedback-visibleWith-form" >\
155 - <input type="checkbox" value="general" disabled="disabled" /><label class="articleFeedback-expertise-disabled"><html:msg key="form-panel-expertise" /></label>\
156 - <div class="articleFeedback-expertise-options">\
157 - <div><input type="checkbox" value="studies" /><label><html:msg key="form-panel-expertise-studies" /></label></div>\
158 - <div><input type="checkbox" value="profession" /><label><html:msg key="form-panel-expertise-profession" /></label></div>\
159 - <div><input type="checkbox" value="hobby" /><label><html:msg key="form-panel-expertise-hobby" /></label></div>\
160 - <div><input type="checkbox" value="other" /><label><html:msg key="form-panel-expertise-other" /></label></div>\
161 - <div class="articleFeedback-helpimprove">\
162 - <input type="checkbox" value="helpimprove-email" />\
163 - <label><html:msg key="form-panel-helpimprove" /></label>\
164 - <input type="text" placeholder="" class="articleFeedback-helpimprove-email" />\
165 - <div class="articleFeedback-helpimprove-note"></div>\
166 - </div>\
 147+ <div class="articleFeedbackv5-panel">\
 148+ <div class="articleFeedbackv5-buffer articleFeedbackv5-ui">\
 149+ <div class="articleFeedbackv5-switch articleFeedbackv5-switch-report articleFeedbackv5-visibleWith-form" rel="report"><html:msg key="report-switch-label" /></div>\
 150+ <div class="articleFeedbackv5-switch articleFeedbackv5-switch-form articleFeedbackv5-visibleWith-report" rel="form"><html:msg key="form-switch-label" /></div>\
 151+ <div class="articleFeedbackv5-title articleFeedbackv5-visibleWith-form"><html:msg key="form-panel-title" /></div>\
 152+ <div class="articleFeedbackv5-title articleFeedbackv5-visibleWith-report"><html:msg key="report-panel-title" /></div>\
 153+ <div class="articleFeedbackv5-explanation articleFeedbackv5-visibleWith-form"><a class="articleFeedbackv5-explanation-link"><html:msg key="form-panel-explanation" /></a></div>\
 154+ <div class="articleFeedbackv5-description articleFeedbackv5-visibleWith-report"><html:msg key="report-panel-description" /></div>\
 155+ <div style="clear:both;"></div>\
 156+ <div class="articleFeedbackv5-ratings"></div>\
 157+ <div style="clear:both;"></div>\
 158+ <div class="articleFeedbackv5-options">\
 159+ <div class="articleFeedbackv5-expertise articleFeedbackv5-visibleWith-form" >\
 160+ <input type="checkbox" value="general" disabled="disabled" /><label class="articleFeedbackv5-expertise-disabled"><html:msg key="form-panel-expertise" /></label>\
 161+ <div class="articleFeedbackv5-expertise-options">\
 162+ <div><input type="checkbox" value="studies" /><label><html:msg key="form-panel-expertise-studies" /></label></div>\
 163+ <div><input type="checkbox" value="profession" /><label><html:msg key="form-panel-expertise-profession" /></label></div>\
 164+ <div><input type="checkbox" value="hobby" /><label><html:msg key="form-panel-expertise-hobby" /></label></div>\
 165+ <div><input type="checkbox" value="other" /><label><html:msg key="form-panel-expertise-other" /></label></div>\
 166+ <div class="articleFeedbackv5-helpimprove">\
 167+ <input type="checkbox" value="helpimprove-email" />\
 168+ <label><html:msg key="form-panel-helpimprove" /></label>\
 169+ <input type="text" placeholder="" class="articleFeedbackv5-helpimprove-email" />\
 170+ <div class="articleFeedbackv5-helpimprove-note"></div>\
167171 </div>\
168172 </div>\
169 - <div style="clear:both;"></div>\
170173 </div>\
171 - <button class="articleFeedback-submit articleFeedback-visibleWith-form" type="submit" disabled="disabled"><html:msg key="form-panel-submit" /></button>\
172 - <div class="articleFeedback-success articleFeedback-visibleWith-form"><span><html:msg key="form-panel-success" /></span></div>\
173 - <div class="articleFeedback-pending articleFeedback-visibleWith-form"><span><html:msg key="form-panel-pending" /></span></div>\
174174 <div style="clear:both;"></div>\
175 - <div class="articleFeedback-notices articleFeedback-visibleWith-form">\
176 - <div class="articleFeedback-expiry">\
177 - <div class="articleFeedback-expiry-title"><html:msg key="form-panel-expiry-title" /></div>\
178 - <div class="articleFeedback-expiry-message"><html:msg key="form-panel-expiry-message" /></div>\
179 - </div>\
 175+ </div>\
 176+ <button class="articleFeedbackv5-submit articleFeedbackv5-visibleWith-form" type="submit" disabled="disabled"><html:msg key="form-panel-submit" /></button>\
 177+ <div class="articleFeedbackv5-success articleFeedbackv5-visibleWith-form"><span><html:msg key="form-panel-success" /></span></div>\
 178+ <div class="articleFeedbackv5-pending articleFeedbackv5-visibleWith-form"><span><html:msg key="form-panel-pending" /></span></div>\
 179+ <div style="clear:both;"></div>\
 180+ <div class="articleFeedbackv5-notices articleFeedbackv5-visibleWith-form">\
 181+ <div class="articleFeedbackv5-expiry">\
 182+ <div class="articleFeedbackv5-expiry-title"><html:msg key="form-panel-expiry-title" /></div>\
 183+ <div class="articleFeedbackv5-expiry-message"><html:msg key="form-panel-expiry-message" /></div>\
180184 </div>\
181185 </div>\
182 - <div class="articleFeedback-error"><div class="articleFeedback-error-message"><html:msg key="error" /></div></div>\
183 - <div class="articleFeedback-pitches"></div>\
184 - <div style="clear:both;"></div>\
185186 </div>\
186 - <input type="hidden" name="feedback_id" value="" />\
187 - </form>\
 187+ <div class="articleFeedbackv5-error"><div class="articleFeedbackv5-error-message"><html:msg key="error" /></div></div>\
 188+ <div class="articleFeedbackv5-pitches"></div>\
 189+ <div style="clear:both;"></div>\
 190+ </div>\
188191 ';
189192
190193 // A single rating block
191194 var rating_tpl = '\
192 - <div class="articleFeedback-rating">\
193 - <div class="articleFeedback-label"></div>\
 195+ <div class="articleFeedbackv5-rating">\
 196+ <div class="articleFeedbackv5-label"></div>\
194197 <input type="hidden" />\
195 - <div class="articleFeedback-rating-labels articleFeedback-visibleWith-form">\
196 - <div class="articleFeedback-rating-label" rel="1"></div>\
197 - <div class="articleFeedback-rating-label" rel="2"></div>\
198 - <div class="articleFeedback-rating-label" rel="3"></div>\
199 - <div class="articleFeedback-rating-label" rel="4"></div>\
200 - <div class="articleFeedback-rating-label" rel="5"></div>\
201 - <div class="articleFeedback-rating-clear"></div>\
 198+ <div class="articleFeedbackv5-rating-labels articleFeedbackv5-visibleWith-form">\
 199+ <div class="articleFeedbackv5-rating-label" rel="1"></div>\
 200+ <div class="articleFeedbackv5-rating-label" rel="2"></div>\
 201+ <div class="articleFeedbackv5-rating-label" rel="3"></div>\
 202+ <div class="articleFeedbackv5-rating-label" rel="4"></div>\
 203+ <div class="articleFeedbackv5-rating-label" rel="5"></div>\
 204+ <div class="articleFeedbackv5-rating-clear"></div>\
202205 </div>\
203 - <div class="articleFeedback-visibleWith-form">\
204 - <div class="articleFeedback-rating-tooltip"></div>\
 206+ <div class="articleFeedbackv5-visibleWith-form">\
 207+ <div class="articleFeedbackv5-rating-tooltip"></div>\
205208 </div>\
206 - <div class="articleFeedback-rating-average articleFeedback-visibleWith-report"></div>\
207 - <div class="articleFeedback-rating-meter articleFeedback-visibleWith-report"><div></div></div>\
208 - <div class="articleFeedback-rating-count articleFeedback-visibleWith-report"></div>\
 209+ <div class="articleFeedbackv5-rating-average articleFeedbackv5-visibleWith-report"></div>\
 210+ <div class="articleFeedbackv5-rating-meter articleFeedbackv5-visibleWith-report"><div></div></div>\
 211+ <div class="articleFeedbackv5-rating-count articleFeedbackv5-visibleWith-report"></div>\
209212 <div style="clear:both;"></div>\
210213 </div>\
211214 ';
@@ -213,28 +216,28 @@
214217 var $block = $( block_tpl );
215218
216219 // Add the ratings from the options
217 - $block.find( '.articleFeedback-ratings' ).each( function () {
218 - for ( var key in $.articleFeedback.currentBucket().ratingInfo ) {
 220+ $block.find( '.articleFeedbackv5-ratings' ).each( function () {
 221+ for ( var key in $.articleFeedbackv5.currentBucket().ratingInfo ) {
219222 var tip_msg = 'articlefeedbackv5-field-' + key + '-tip';
220223 var label_msg = 'articlefeedbackv5-field-' + key + '-label';
221224 var $rtg = $( rating_tpl ).attr( 'rel', key );
222 - $rtg.find( '.articleFeedback-label' )
 225+ $rtg.find( '.articleFeedbackv5-label' )
223226 .attr( 'title', mw.msg( tip_msg ) )
224227 .text( mw.msg( label_msg ) );
225 - $rtg.find( '.articleFeedback-rating-clear' )
 228+ $rtg.find( '.articleFeedbackv5-rating-clear' )
226229 .attr( 'title', mw.msg( 'articlefeedbackv5-form-panel-clear' ) );
227230 $rtg.appendTo( $(this) );
228231 }
229232 } );
230233
231234 // Fill in the link to the What's This page
232 - $block.find( '.articleFeedback-explanation-link' )
 235+ $block.find( '.articleFeedbackv5-explanation-link' )
233236 .attr( 'href', mw.config.get( 'wgArticlePath' ).replace(
234237 '$1', mw.config.get( 'wgArticleFeedbackv5WhatsThisPage' )
235238 ) );
236239
237240 // Fill in the Help Improve message and links
238 - $block.find( '.articleFeedback-helpimprove-note' )
 241+ $block.find( '.articleFeedbackv5-helpimprove-note' )
239242 // Can't use .text() with mw.message(, /* $1 */ link).toString(),
240243 // because 'link' should not be re-escaped (which would happen if done by mw.message)
241244 .html( function () {
@@ -246,7 +249,7 @@
247250 return mw.html.escape( mw.msg( 'articlefeedbackv5-form-panel-helpimprove-note') )
248251 .replace( /\$1/, mw.message( 'parentheses', link ).toString() );
249252 });
250 - $block.find( '.articleFeedback-helpimprove-email' )
 253+ $block.find( '.articleFeedbackv5-helpimprove-email' )
251254 .attr( 'placeholder', mw.msg( 'articlefeedbackv5-form-panel-helpimprove-email-placeholder' ) )
252255 .placeholder(); // back. compat. for older browsers
253256
@@ -264,42 +267,42 @@
265268 } );
266269
267270 // Set id and for on expertise checkboxes
268 - $block.find( '.articleFeedback-expertise input:checkbox' )
 271+ $block.find( '.articleFeedbackv5-expertise input:checkbox' )
269272 .each( function () {
270 - var id = 'articleFeedback-expertise-' + $(this).attr( 'value' );
 273+ var id = 'articleFeedbackv5-expertise-' + $(this).attr( 'value' );
271274 $(this).attr( 'id', id );
272275 $(this).next().attr( 'for', id );
273276 } );
274 - $block.find( '.articleFeedback-helpimprove > input:checkbox' )
 277+ $block.find( '.articleFeedbackv5-helpimprove > input:checkbox' )
275278 .each( function () {
276 - var id = 'articleFeedback-expertise-' + $(this).attr( 'value' );
 279+ var id = 'articleFeedbackv5-expertise-' + $(this).attr( 'value' );
277280 $(this).attr( 'id', id );
278281 $(this).next().attr( 'for', id );
279282 })
280283
281284 // Turn the submit into a slick button
282 - $block.find( '.articleFeedback-submit' )
 285+ $block.find( '.articleFeedbackv5-submit' )
283286 .button()
284287 .addClass( 'ui-button-blue' )
285288
286289 // Hide report elements initially
287 - $block.find( '.articleFeedback-visibleWith-report' ).hide();
 290+ $block.find( '.articleFeedbackv5-visibleWith-report' ).hide();
288291
289292 // Name the hidden rating fields
290 - $block.find( '.articleFeedback-rating' )
 293+ $block.find( '.articleFeedbackv5-rating' )
291294 .each( function () {
292 - var name = $.articleFeedback.currentBucket().ratingInfo[$(this).attr( 'rel' )];
 295+ var name = $.articleFeedbackv5.currentBucket().ratingInfo[$(this).attr( 'rel' )];
293296 $(this).find( 'input:hidden' ) .attr( 'name', 'r' + name );
294297 } );
295298
296299 // Hide the additional options, if the user's in a bucket that
297300 // requires it
298 - if ( !$.articleFeedback.currentBucket().showOptions ) {
299 - $block.find( '.articleFeedback-options' ).hide();
 301+ if ( !$.articleFeedbackv5.currentBucket().showOptions ) {
 302+ $block.find( '.articleFeedbackv5-options' ).hide();
300303 }
301304
302305 // Grab the results in the background
303 - $.articleFeedback.currentBucket().loadAggregateRatings();
 306+ $.articleFeedbackv5.currentBucket().loadAggregateRatings();
304307
305308 return $block;
306309 },
@@ -315,10 +318,10 @@
316319 bindEvents: function ( $block ) {
317320
318321 // On-blur validity check for Help Improve email field
319 - $block.find( '.articleFeedback-helpimprove-email' )
 322+ $block.find( '.articleFeedbackv5-helpimprove-email' )
320323 .one( 'blur', function () {
321324 var $el = $(this);
322 - var bucket = $.articleFeedback.currentBucket();
 325+ var bucket = $.articleFeedbackv5.currentBucket();
323326 bucket.updateMailValidityLabel( $el.val() );
324327 $el.keyup( function () {
325328 bucket.updateMailValidityLabel( $el.val() );
@@ -326,9 +329,9 @@
327330 } );
328331
329332 // Slide-down for the expertise checkboxes
330 - $block.find( '.articleFeedback-expertise > input:checkbox' )
 333+ $block.find( '.articleFeedbackv5-expertise > input:checkbox' )
331334 .change( function () {
332 - var $options = $.articleFeedback.$holder.find( '.articleFeedback-expertise-options' );
 335+ var $options = $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-expertise-options' );
333336 if ( $(this).is( ':checked' ) ) {
334337 $options.slideDown( 'fast' );
335338 } else {
@@ -339,101 +342,101 @@
340343 } );
341344
342345 // Enable submission when at least one rating is set
343 - $block.find( '.articleFeedback-expertise input:checkbox' )
 346+ $block.find( '.articleFeedbackv5-expertise input:checkbox' )
344347 .each( function () {
345 - var id = 'articleFeedback-expertise-' + $(this).attr( 'value' );
 348+ var id = 'articleFeedbackv5-expertise-' + $(this).attr( 'value' );
346349 $(this).click( function () {
347 - $.articleFeedback.currentBucket().enableSubmission( true );
 350+ $.articleFeedbackv5.currentBucket().enableSubmission( true );
348351 } );
349352 } );
350353
351354 // Clicking on the email field checks the associted box
352 - $block.find( '.articleFeedback-helpimprove-email' )
 355+ $block.find( '.articleFeedbackv5-helpimprove-email' )
353356 .bind( 'mousedown click', function ( e ) {
354 - $(this).closest( '.articleFeedback-helpimprove' )
 357+ $(this).closest( '.articleFeedbackv5-helpimprove' )
355358 .find( 'input:checkbox' )
356359 .attr( 'checked', true );
357360 } );
358361
359362 // Attach the submit
360 - $block.find( '.articleFeedback-submit' )
 363+ $block.find( '.articleFeedbackv5-submit' )
361364 .click( function ( e ) {
362365 e.preventDefault();
363 - $.articleFeedback.submitForm();
 366+ $.articleFeedbackv5.submitForm();
364367 } );
365368
366369 // Set up form/report switch behavior
367 - $block.find( '.articleFeedback-switch' )
 370+ $block.find( '.articleFeedbackv5-switch' )
368371 .click( function ( e ) {
369 - $.articleFeedback.$holder.find( '.articleFeedback-visibleWith-' + $(this).attr( 'rel' ) )
 372+ $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-visibleWith-' + $(this).attr( 'rel' ) )
370373 .show();
371 - $.articleFeedback.$holder.find( '.articleFeedback-switch' )
 374+ $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-switch' )
372375 .not( $(this) )
373376 .each( function () {
374 - $.articleFeedback.$holder.find( '.articleFeedback-visibleWith-' + $(this).attr( 'rel' ) ).hide();
 377+ $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-visibleWith-' + $(this).attr( 'rel' ) ).hide();
375378 } );
376379 e.preventDefault();
377380 return false;
378381 } );
379382
380383 // Set up rating behavior
381 - var rlabel = $block.find( '.articleFeedback-rating-label' );
 384+ var rlabel = $block.find( '.articleFeedbackv5-rating-label' );
382385 rlabel.hover( function () {
383386 // mouse on
384387 var $el = $( this );
385 - var $rating = $el.closest( '.articleFeedback-rating' );
386 - $el.addClass( 'articleFeedback-rating-label-hover-head' );
387 - $el.prevAll( '.articleFeedback-rating-label' )
388 - .addClass( 'articleFeedback-rating-label-hover-tail' );
389 - $rating.find( '.articleFeedback-rating-tooltip' )
 388+ var $rating = $el.closest( '.articleFeedbackv5-rating' );
 389+ $el.addClass( 'articleFeedbackv5-rating-label-hover-head' );
 390+ $el.prevAll( '.articleFeedbackv5-rating-label' )
 391+ .addClass( 'articleFeedbackv5-rating-label-hover-tail' );
 392+ $rating.find( '.articleFeedbackv5-rating-tooltip' )
390393 .text( mw.msg( 'articlefeedbackv5-field-' + $rating.attr( 'rel' ) + '-tooltip-' + $el.attr( 'rel' ) ) )
391394 .show();
392395 }, function () {
393396 // mouse off
394397 var $el = $( this );
395 - var $rating = $el.closest( '.articleFeedback-rating' );
396 - $el.removeClass( 'articleFeedback-rating-label-hover-head' );
397 - $el.prevAll( '.articleFeedback-rating-label' )
398 - .removeClass( 'articleFeedback-rating-label-hover-tail' );
399 - $rating.find( '.articleFeedback-rating-tooltip' )
 398+ var $rating = $el.closest( '.articleFeedbackv5-rating' );
 399+ $el.removeClass( 'articleFeedbackv5-rating-label-hover-head' );
 400+ $el.prevAll( '.articleFeedbackv5-rating-label' )
 401+ .removeClass( 'articleFeedbackv5-rating-label-hover-tail' );
 402+ $rating.find( '.articleFeedbackv5-rating-tooltip' )
400403 .hide();
401 - var bucket = $.articleFeedback.currentBucket();
 404+ var bucket = $.articleFeedbackv5.currentBucket();
402405 bucket.updateRating( $rating );
403406 });
404407 rlabel.mousedown( function () {
405 - var bucket = $.articleFeedback.currentBucket();
 408+ var bucket = $.articleFeedbackv5.currentBucket();
406409 bucket.enableSubmission( true );
407 - var $h = $.articleFeedback.$holder;
408 - if ( $h.hasClass( 'articleFeedback-expired' ) ) {
 410+ var $h = $.articleFeedbackv5.$holder;
 411+ if ( $h.hasClass( 'articleFeedbackv5-expired' ) ) {
409412 // Changing one means the rest will get submitted too
410 - $h.removeClass( 'articleFeedback-expired' );
411 - $h.find( '.articleFeedback-rating' )
412 - .addClass( 'articleFeedback-rating-new' );
 413+ $h.removeClass( 'articleFeedbackv5-expired' );
 414+ $h.find( '.articleFeedbackv5-rating' )
 415+ .addClass( 'articleFeedbackv5-rating-new' );
413416 }
414 - $h.find( '.articleFeedback-expertise' )
 417+ $h.find( '.articleFeedbackv5-expertise' )
415418 .each( function () {
416419 bucket.enableExpertise( $(this) );
417420 } );
418421 var $el = $( this );
419 - var $rating = $el.closest( '.articleFeedback-rating' );
420 - $rating.addClass( 'articleFeedback-rating-new' );
 422+ var $rating = $el.closest( '.articleFeedbackv5-rating' );
 423+ $rating.addClass( 'articleFeedbackv5-rating-new' );
421424 $rating.find( 'input:hidden' ).val( $el.attr( 'rel' ) );
422 - $el.addClass( 'articleFeedback-rating-label-down' );
 425+ $el.addClass( 'articleFeedbackv5-rating-label-down' );
423426 $el.nextAll()
424 - .removeClass( 'articleFeedback-rating-label-full' );
425 - $el.parent().find( '.articleFeedback-rating-clear' ).show();
 427+ .removeClass( 'articleFeedbackv5-rating-label-full' );
 428+ $el.parent().find( '.articleFeedbackv5-rating-clear' ).show();
426429 } );
427430 rlabel.mouseup( function () {
428 - $(this).removeClass( 'articleFeedback-rating-label-down' );
 431+ $(this).removeClass( 'articleFeedbackv5-rating-label-down' );
429432 } );
430433
431434 // Icon to clear out the ratings
432 - $block.find( '.articleFeedback-rating-clear' )
 435+ $block.find( '.articleFeedbackv5-rating-clear' )
433436 .click( function () {
434 - var bucket = $.articleFeedback.currentBucket();
 437+ var bucket = $.articleFeedbackv5.currentBucket();
435438 bucket.enableSubmission( true );
436439 $(this).hide();
437 - var $rating = $(this).closest( '.articleFeedback-rating' );
 440+ var $rating = $(this).closest( '.articleFeedbackv5-rating' );
438441 $rating.find( 'input:hidden' ).val( 0 );
439442 bucket.updateRating( $rating );
440443 } );
@@ -449,19 +452,19 @@
450453 * @param $rating the rating block
451454 */
452455 updateRating: function ( $rating ) {
453 - $rating.find( '.articleFeedback-rating-label' )
454 - .removeClass( 'articleFeedback-rating-label-full' );
 456+ $rating.find( '.articleFeedbackv5-rating-label' )
 457+ .removeClass( 'articleFeedbackv5-rating-label-full' );
455458 var val = $rating.find( 'input:hidden' ).val();
456 - var $label = $rating.find( '.articleFeedback-rating-label[rel="' + val + '"]' );
 459+ var $label = $rating.find( '.articleFeedbackv5-rating-label[rel="' + val + '"]' );
457460 if ( $label.length ) {
458 - $label.prevAll( '.articleFeedback-rating-label' )
 461+ $label.prevAll( '.articleFeedbackv5-rating-label' )
459462 .add( $label )
460 - .addClass( 'articleFeedback-rating-label-full' );
461 - $label.nextAll( '.articleFeedback-rating-label' )
462 - .removeClass( 'articleFeedback-rating-label-full' );
463 - $rating.find( '.articleFeedback-rating-clear' ).show();
 463+ .addClass( 'articleFeedbackv5-rating-label-full' );
 464+ $label.nextAll( '.articleFeedbackv5-rating-label' )
 465+ .removeClass( 'articleFeedbackv5-rating-label-full' );
 466+ $rating.find( '.articleFeedbackv5-rating-clear' ).show();
464467 } else {
465 - $rating.find( '.articleFeedback-rating-clear' ).hide();
 468+ $rating.find( '.articleFeedbackv5-rating-clear' ).hide();
466469 }
467470 },
468471
@@ -474,17 +477,17 @@
475478 * @param state bool true to enable; false to disable
476479 */
477480 enableSubmission: function ( state ) {
478 - var $h = $.articleFeedback.$holder;
 481+ var $h = $.articleFeedbackv5.$holder;
479482 if ( state ) {
480 - if ($.articleFeedback.successTimeout) {
481 - clearTimeout( $.articleFeedback.successTimeout );
 483+ if ($.articleFeedbackv5.successTimeout) {
 484+ clearTimeout( $.articleFeedbackv5.successTimeout );
482485 }
483 - $h.find( '.articleFeedback-submit' ).button( { 'disabled': false } );
484 - $h.find( '.articleFeedback-success span' ).hide();
485 - $h.find( '.articleFeedback-pending span' ).fadeIn( 'fast' );
 486+ $h.find( '.articleFeedbackv5-submit' ).button( { 'disabled': false } );
 487+ $h.find( '.articleFeedbackv5-success span' ).hide();
 488+ $h.find( '.articleFeedbackv5-pending span' ).fadeIn( 'fast' );
486489 } else {
487 - $h.find( '.articleFeedback-submit' ).button( { 'disabled': true } );
488 - $h.find( '.articleFeedback-pending span' ).hide();
 490+ $h.find( '.articleFeedbackv5-submit' ).button( { 'disabled': true } );
 491+ $h.find( '.articleFeedbackv5-pending span' ).hide();
489492 }
490493 },
491494
@@ -499,8 +502,8 @@
500503 enableExpertise: function ( $el ) {
501504 $el.find( 'input:checkbox[value=general]' )
502505 .attr( 'disabled', false )
503 - $el.find( '.articleFeedback-expertise-disabled' )
504 - .removeClass( 'articleFeedback-expertise-disabled' );
 506+ $el.find( '.articleFeedbackv5-expertise-disabled' )
 507+ .removeClass( 'articleFeedbackv5-expertise-disabled' );
505508 },
506509
507510 // }}}
@@ -514,7 +517,7 @@
515518 */
516519 updateMailValidityLabel: function ( mail ) {
517520 var isValid = mw.util.validateEmail( mail );
518 - var $label = $.articleFeedback.$holder.find( '.articleFeedback-helpimprove-email' );
 521+ var $label = $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-helpimprove-email' );
519522 if ( isValid === null ) { // empty address
520523 $label.removeClass( 'valid invalid' );
521524 } else if ( isValid ) {
@@ -532,10 +535,10 @@
533536 * the label's CSS class
534537 */
535538 loadAggregateRatings: function () {
536 - var usecache = !( !$.articleFeedback.anonymous || $.articleFeedback.alreadySubmitted );
 539+ var usecache = !( !$.articleFeedbackv5.anonymous || $.articleFeedbackv5.alreadySubmitted );
537540
538541 $.ajax( {
539 - 'url': $.articleFeedback.apiUrl,
 542+ 'url': $.articleFeedbackv5.apiUrl,
540543 'type': 'GET',
541544 'dataType': 'json',
542545 'cache': usecache,
@@ -544,11 +547,11 @@
545548 'format': 'json',
546549 'list': 'articlefeedbackv5',
547550 'afsubaction': 'showratings',
548 - 'afpageid': $.articleFeedback.pageId,
549 - 'afanontoken': usecache ? $.articleFeedback.userId : '',
 551+ 'afpageid': $.articleFeedbackv5.pageId,
 552+ 'afanontoken': usecache ? $.articleFeedbackv5.userId : '',
550553 'afuserrating': Number( !usecache ),
551554 'maxage': 0,
552 - 'smaxage': usecache ? 0 : mw.config.get( 'wgArticleFeedbackv5SMaxage' )
 555+ 'smaxage': usecache ? 0 : mw.config.get( 'wgArticleFeedbackSMaxage' )
553556 },
554557 'success': function ( data ) {
555558 // Get data
@@ -559,13 +562,14 @@
560563 || !data.query.articlefeedbackv5.length
561564 ) {
562565 mw.log( 'ArticleFeedback invalid response error.' );
563 - if ($.articleFeedback.debug && 'error' in data && 'info' in data.error) {
 566+ if ($.articleFeedbackv5.debug && 'error' in data && 'info' in data.error) {
564567 console.log( data.error.info );
565 - $.articleFeedback.$holder.find( '.articleFeedback-error-message' ).html( data.error.info.replace( "\n", '<br />' ) );
 568+ $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-error-message' ).html( data.error.info.replace( "\n", '<br />' ) );
566569 }
567 - $.articleFeedback.$holder.find( '.articleFeedback-error' ).show();
 570+ $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-error' ).show();
568571 return;
569572 }
 573+ $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-error' ).show();
570574 var feedback = data.query.articlefeedbackv5[0];
571575
572576 // Index rating data by rating ID
@@ -577,9 +581,9 @@
578582 }
579583
580584 // Ratings
581 - $.articleFeedback.$holder.find( '.articleFeedback-rating' ).each( function () {
 585+ $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-rating' ).each( function () {
582586 var name = $(this).attr( 'rel' );
583 - var info = $.articleFeedback.currentBucket().ratingInfo;
 587+ var info = $.articleFeedbackv5.currentBucket().ratingInfo;
584588 var rating = name in info && info[name] in ratings ? ratings[info[name]] : null;
585589 if (
586590 rating !== null
@@ -588,41 +592,41 @@
589593 && rating.total > 0
590594 ) {
591595 var average = Math.round( ( rating.total / rating.count ) * 10 ) / 10;
592 - $(this).find( '.articleFeedback-rating-average' )
 596+ $(this).find( '.articleFeedbackv5-rating-average' )
593597 .text( mw.language.convertNumber( average + ( average % 1 === 0 ? '.0' : '' ) , false ) );
594 - $(this).find( '.articleFeedback-rating-meter div' )
 598+ $(this).find( '.articleFeedbackv5-rating-meter div' )
595599 .css( 'width', Math.round( average * 21 ) + 'px' );
596 - $(this).find( '.articleFeedback-rating-count' )
 600+ $(this).find( '.articleFeedbackv5-rating-count' )
597601 .text( mw.msg( 'articlefeedbackv5-report-ratings', rating.countall ) );
598602 } else {
599603 // Special case for no ratings
600 - $(this).find( '.articleFeedback-rating-average' )
 604+ $(this).find( '.articleFeedbackv5-rating-average' )
601605 .html( '&nbsp;' );
602 - $(this).find( '.articleFeedback-rating-meter div' )
 606+ $(this).find( '.articleFeedbackv5-rating-meter div' )
603607 .css( 'width', 0 );
604 - $(this).find( '.articleFeedback-rating-count' )
 608+ $(this).find( '.articleFeedbackv5-rating-count' )
605609 .text( mw.msg( 'articlefeedbackv5-report-empty' ) );
606610 }
607611 } );
608612
609613 // Expiration
610614 if ( typeof feedback.status === 'string' && feedback.status === 'expired' ) {
611 - $.articleFeedback.$holder.addClass( 'articleFeedback-expired' );
612 - $.articleFeedback.$holder.find( '.articleFeedback-expiry' )
 615+ $.articleFeedbackv5.$holder.addClass( 'articleFeedbackv5-expired' );
 616+ $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-expiry' )
613617 .slideDown( 'fast' );
614618 } else {
615 - $.articleFeedback.$holder.removeClass( 'articleFeedback-expired' )
616 - $.articleFeedback.$holder.find( '.articleFeedback-expiry' )
 619+ $.articleFeedbackv5.$holder.removeClass( 'articleFeedbackv5-expired' )
 620+ $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-expiry' )
617621 .slideUp( 'fast' );
618622 }
619623
620624 // Status change - un-new the rating controls
621 - $.articleFeedback.$holder.find( '.articleFeedback-rating-new' )
622 - .removeClass( 'articleFeedback-rating-new' );
 625+ $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-rating-new' )
 626+ .removeClass( 'articleFeedbackv5-rating-new' );
623627 },
624628 'error': function () {
625629 mw.log( 'Report loading error' );
626 - $.articleFeedback.$holder.find( '.articleFeedback-error' ).show();
 630+ $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-error' ).show();
627631 }
628632 } );
629633
@@ -638,13 +642,13 @@
639643 */
640644 getFormData: function () {
641645 var data = {};
642 - var info = $.articleFeedback.currentBucket().ratingInfo;
 646+ var info = $.articleFeedbackv5.currentBucket().ratingInfo;
643647 for ( var key in info ) {
644648 var id = info[key];
645 - data['r' + id] = $.articleFeedback.$holder.find( 'input[name="r' + id + '"]' ).val();
 649+ data['r' + id] = $.articleFeedbackv5.$holder.find( 'input[name="r' + id + '"]' ).val();
646650 }
647651 var expertise = [];
648 - $.articleFeedback.$holder.find( '.articleFeedback-expertise input:checked' ).each( function () {
 652+ $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-expertise input:checked' ).each( function () {
649653 expertise.push( $(this).val() );
650654 } );
651655 data.expertise = expertise.join( '|' );
@@ -663,8 +667,8 @@
664668 localValidation: function ( formdata ) {
665669 var error = {};
666670 var ok = true;
667 - if ( $.articleFeedback.$holder.find( '.articleFeedback-helpimprove input:checked' ).length > 0 ) {
668 - var mail = $.articleFeedback.$holder.find( '.articleFeedback-helpimprove-email' ).val();
 671+ if ( $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-helpimprove input:checked' ).length > 0 ) {
 672+ var mail = $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-helpimprove-email' ).val();
669673 if ( !mw.util.validateEmail( mail ) ) {
670674 error.helpimprove_email = 'That email address is not valid';
671675 ok = false;
@@ -680,8 +684,8 @@
681685 * Locks the form
682686 */
683687 lockForm: function () {
684 - $.articleFeedback.currentBucket().enableSubmission( false );
685 - $.articleFeedback.$holder.find( '.articleFeedback-lock' ).show();
 688+ $.articleFeedbackv5.currentBucket().enableSubmission( false );
 689+ $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-lock' ).show();
686690 },
687691
688692 // }}}
@@ -691,8 +695,8 @@
692696 * Unlocks the form
693697 */
694698 unlockForm: function () {
695 - $.articleFeedback.currentBucket().enableSubmission( true );
696 - $.articleFeedback.$holder.find( '.articleFeedback-lock' ).hide();
 699+ $.articleFeedbackv5.currentBucket().enableSubmission( true );
 700+ $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-lock' ).hide();
697701 },
698702
699703 // }}}
@@ -705,14 +709,14 @@
706710 */
707711 markFormError: function ( error ) {
708712 if ( '_api' in error ) {
709 - if ($.articleFeedback.debug) {
710 - $.articleFeedback.$holder.find( '.articleFeedback-error-message' )
 713+ if ($.articleFeedbackv5.debug) {
 714+ $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-error-message' )
711715 .html( error._api.info.replace( "\n", '<br />' ) );
712716 }
713 - $.articleFeedback.$holder.find( '.articleFeedback-error' ).show();
 717+ $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-error' ).show();
714718 } else {
715719 if ( 'helpimprove_email' in error ) {
716 - $.articleFeedback.$holder.find( '.articleFeedback-helpimprove-email' )
 720+ $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-helpimprove-email' )
717721 .addClass( 'invalid' )
718722 .removeClass( 'valid' );
719723 }
@@ -729,10 +733,10 @@
730734 * Sets the success state
731735 */
732736 setSuccessState: function () {
733 - var $h = $.articleFeedback.$holder;
734 - $h.find( '.articleFeedback-success span' ).fadeIn( 'fast' );
735 - $.articleFeedback.successTimeout = setTimeout( function () {
736 - $.articleFeedback.$holder.find( '.articleFeedback-success span' )
 737+ var $h = $.articleFeedbackv5.$holder;
 738+ $h.find( '.articleFeedbackv5-success span' ).fadeIn( 'fast' );
 739+ $.articleFeedbackv5.successTimeout = setTimeout( function () {
 740+ $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-success span' )
737741 .fadeOut( 'slow' );
738742 }, 5000 );
739743 },
@@ -840,7 +844,7 @@
841845 /**
842846 * Set up the CTA options' UI objects
843847 */
844 - $.articleFeedback.ctas = {
 848+ $.articleFeedbackv5.ctas = {
845849
846850 // {{{ CTA 1: Encticement to edit
847851
@@ -857,10 +861,12 @@
858862
859863 // The overall template
860864 var block_tpl = '\
861 - <div class="articleFeedback-cta-panel">\
862 - <h5>TODO: EDIT CTA</h5>\
863 - <p>Eventually this will have a pretty button and some nice messages. For now, though...</p>\
864 - <p><a href="" class="articleFeedback-edit-cta-link">EDIT THIS PAGE</a></p>\
 865+ <div class="articleFeedbackv5-panel">\
 866+ <div class="articleFeedbackv5-buffer">\
 867+ <h5 class="articleFeedbackv5-title">TODO: EDIT CTA</h5>\
 868+ <p>Eventually this will have a pretty button and some nice messages. For now, though...</p>\
 869+ <p><a href="" class="articleFeedbackv5-edit-cta-link">EDIT THIS PAGE</a></p>\
 870+ </div>\
865871 </div>\
866872 ';
867873
@@ -868,7 +874,7 @@
869875 var $block = $( block_tpl );
870876
871877 // Fill in the link
872 - $block.find( '.articleFeedback-edit-link' )
 878+ $block.find( '.articleFeedbackv5-edit-link' )
873879 .attr( 'href', mw.config.get( 'wgArticlePath' ).replace(
874880 '$1', mw.config.get( 'wgArticleFeedbackv5WhatsThisPage' )
875881 ) );
@@ -898,15 +904,15 @@
899905 * jQuery-ized)
900906 * @param config object the config object
901907 */
902 - $.articleFeedback.init = function ( $el, config ) {
903 - $.articleFeedback.$holder = $el;
904 - $.articleFeedback.config = config;
 908+ $.articleFeedbackv5.init = function ( $el, config ) {
 909+ $.articleFeedbackv5.$holder = $el;
 910+ $.articleFeedbackv5.config = config;
905911 // Has the user already submitted ratings for this page at this revision?
906 - $.articleFeedback.alreadySubmitted = $.cookie( $.articleFeedback.prefix( 'submitted' ) ) === 'true';
 912+ $.articleFeedbackv5.alreadySubmitted = $.cookie( $.articleFeedbackv5.prefix( 'submitted' ) ) === 'true';
907913 // Go ahead and load the form
908914 // When the tool is visible, load the form
909 - $.articleFeedback.$holder.appear( function () {
910 - $.articleFeedback.loadForm();
 915+ $.articleFeedbackv5.$holder.appear( function () {
 916+ $.articleFeedbackv5.loadForm();
911917 } );
912918 };
913919
@@ -920,9 +926,9 @@
921927 * @param key string name of event to prefix
922928 * @return string prefixed event name
923929 */
924 - $.articleFeedback.prefix = function ( key ) {
 930+ $.articleFeedbackv5.prefix = function ( key ) {
925931 var version = mw.config.get( 'wgArticleFeedbackv5Tracking' ).version || 0;
926 - return 'ext.articleFeedback@' + version + '-' + key;
 932+ return 'ext.articleFeedbackv5@' + version + '-' + key;
927933 };
928934
929935 /**
@@ -930,8 +936,8 @@
931937 *
932938 * @return object the bucket
933939 */
934 - $.articleFeedback.currentBucket = function () {
935 - return $.articleFeedback.buckets[$.articleFeedback.bucketId];
 940+ $.articleFeedbackv5.currentBucket = function () {
 941+ return $.articleFeedbackv5.buckets[$.articleFeedbackv5.bucketId];
936942 };
937943
938944 /**
@@ -939,8 +945,8 @@
940946 *
941947 * @return object the cta
942948 */
943 - $.articleFeedback.currentCTA = function () {
944 - return $.articleFeedback.ctas[$.articleFeedback.ctaId];
 949+ $.articleFeedbackv5.currentCTA = function () {
 950+ return $.articleFeedbackv5.ctas[$.articleFeedbackv5.ctaId];
945951 };
946952
947953 // }}}
@@ -952,9 +958,9 @@
953959 * The load method uses an ajax request to pull down the bucket ID, the
954960 * feedback ID, and using those, build the form.
955961 */
956 - $.articleFeedback.loadForm = function () {
 962+ $.articleFeedbackv5.loadForm = function () {
957963 $.ajax( {
958 - 'url': $.articleFeedback.apiUrl,
 964+ 'url': $.articleFeedbackv5.apiUrl,
959965 'type': 'GET',
960966 'dataType': 'json',
961967 'data': {
@@ -962,9 +968,9 @@
963969 'action': 'query',
964970 'format': 'json',
965971 'afsubaction': 'newform',
966 - 'afanontoken': $.articleFeedback.userId,
967 - 'afpageid': $.articleFeedback.pageId,
968 - 'afrevid': $.articleFeedback.revisionId
 972+ 'afanontoken': $.articleFeedbackv5.userId,
 973+ 'afpageid': $.articleFeedbackv5.pageId,
 974+ 'afrevid': $.articleFeedbackv5.revisionId
969975 },
970976 'success': function ( data ) {
971977 if ( !( 'form' in data ) || !( 'bucketId' in data.form ) ) {
@@ -974,15 +980,15 @@
975981 } else {
976982 console.log(data);
977983 }
978 - $.articleFeedback.bucketId = 6; // No form
 984+ $.articleFeedbackv5.bucketId = 6; // No form
979985 } else {
980 - $.articleFeedback.bucketId = data.form.bucketId;
 986+ $.articleFeedbackv5.bucketId = data.form.bucketId;
981987 }
982 - $.articleFeedback.buildForm( 'form' in data ? data.form.response : null );
 988+ $.articleFeedbackv5.buildForm( 'form' in data ? data.form.response : null );
983989 },
984990 'error': function () {
985991 mw.log( 'Report loading error' );
986 - $.articleFeedback.buildForm();
 992+ $.articleFeedbackv5.buildForm();
987993 }
988994 } );
989995 };
@@ -992,9 +998,9 @@
993999 *
9941000 * @param response object any existing answers
9951001 */
996 - $.articleFeedback.buildForm = function ( response ) {
997 - $.articleFeedback.bucketId = 5; // For now, only use Option 5
998 - var bucket = $.articleFeedback.currentBucket();
 1002+ $.articleFeedbackv5.buildForm = function ( response ) {
 1003+ $.articleFeedbackv5.bucketId = 5; // For now, only use Option 5
 1004+ var bucket = $.articleFeedbackv5.currentBucket();
9991005 if ( !( 'buildForm' in bucket ) ) {
10001006 return;
10011007 }
@@ -1005,9 +1011,9 @@
10061012 if ( 'fillForm' in bucket ) {
10071013 bucket.fillForm( $block, response );
10081014 }
1009 - $.articleFeedback.$holder
 1015+ $.articleFeedbackv5.$holder
10101016 .html( $block )
1011 - .append( '<div class="articleFeedback-lock"></div>' );
 1017+ .append( '<div class="articleFeedbackv5-lock"></div>' );
10121018 };
10131019
10141020 // }}}
@@ -1021,15 +1027,15 @@
10221028 * passes local validation. Local validation is defined by the bucket UI
10231029 * object.
10241030 */
1025 - $.articleFeedback.submitForm = function () {
 1031+ $.articleFeedbackv5.submitForm = function () {
10261032
10271033 // For anonymous users, keep a cookie around so we know they've rated before
10281034 if ( mw.user.anonymous() ) {
1029 - $.cookie( $.articleFeedback.prefix( 'rated' ), 'true', { 'expires': 365, 'path': '/' } );
 1035+ $.cookie( $.articleFeedbackv5.prefix( 'rated' ), 'true', { 'expires': 365, 'path': '/' } );
10301036 }
10311037
10321038 // Get the form data
1033 - var bucket = $.articleFeedback.currentBucket();
 1039+ var bucket = $.articleFeedbackv5.currentBucket();
10341040 var formdata = {};
10351041 if ( 'getFormData' in bucket ) {
10361042 formdata = bucket.getFormData();
@@ -1055,16 +1061,16 @@
10561062
10571063 // Send off the ajax request
10581064 $.ajax( {
1059 - 'url': $.articleFeedback.apiUrl,
 1065+ 'url': $.articleFeedbackv5.apiUrl,
10601066 'type': 'POST',
10611067 'dataType': 'json',
10621068 'data': $.extend( formdata, {
10631069 'action': 'articlefeedbackv5',
10641070 'format': 'json',
1065 - 'anontoken': $.articleFeedback.userId,
1066 - 'pageid': $.articleFeedback.pageId,
1067 - 'revid': $.articleFeedback.revisionId,
1068 - 'bucket': $.articleFeedback.bucketId
 1071+ 'anontoken': $.articleFeedbackv5.userId,
 1072+ 'pageid': $.articleFeedbackv5.pageId,
 1073+ 'revid': $.articleFeedbackv5.revisionId,
 1074+ 'bucket': $.articleFeedbackv5.bucketId
10691075 } ),
10701076 'success': function( data ) {
10711077 if ( 'error' in data ) {
@@ -1080,7 +1086,7 @@
10811087 if ( 'onSuccess' in bucket ) {
10821088 bucket.onSuccess( formdata );
10831089 }
1084 - $.articleFeedback.showCTA();
 1090+ $.articleFeedbackv5.showCTA();
10851091 }
10861092 },
10871093 'error': function () {
@@ -1104,9 +1110,9 @@
11051111 *
11061112 * @param cta_name string the name of the CTA to display
11071113 */
1108 - $.articleFeedback.showCTA = function ( ctaId ) {
1109 - $.articleFeedback.ctaId = 1; // For now, just use the edit CTA
1110 - var cta = $.articleFeedback.currentCTA();
 1114+ $.articleFeedbackv5.showCTA = function ( ctaId ) {
 1115+ $.articleFeedbackv5.ctaId = 1; // For now, just use the edit CTA
 1116+ var cta = $.articleFeedbackv5.currentCTA();
11111117 if ( !( 'build' in cta ) ) {
11121118 return;
11131119 }
@@ -1114,18 +1120,18 @@
11151121 if ( 'bindEvents' in cta ) {
11161122 cta.bindEvents( $block );
11171123 }
1118 - $.articleFeedback.$holder.html( $block );
 1124+ $.articleFeedbackv5.$holder.html( $block );
11191125 };
11201126
11211127 // }}}
11221128
11231129 // }}}
1124 -// {{{ articleFeedback plugin
 1130+// {{{ articleFeedbackv5 plugin
11251131
11261132 /**
11271133 * Can be called with an options object like...
11281134 *
1129 - * $( ... ).articleFeedback( {
 1135+ * $( ... ).articleFeedbackv5( {
11301136 * 'ratings': {
11311137 * 'rating-name': {
11321138 * 'id': 1, // Numeric identifier of the rating, same as the rating_id value in the db
@@ -1138,9 +1144,9 @@
11391145 *
11401146 * Rating IDs need to be included in $wgArticleFeedbackv5RatingTypes, which is an array mapping allowed IDs to rating names.
11411147 */
1142 -$.fn.articleFeedback = function ( opts ) {
 1148+$.fn.articleFeedbackv5 = function ( opts ) {
11431149 if ( typeof( opts ) == 'object' ) {
1144 - $.articleFeedback.init( $( this ), opts );
 1150+ $.articleFeedbackv5.init( $( this ), opts );
11451151 }
11461152 return $( this );
11471153 };
Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedback/jquery.articleFeedback.css
@@ -2,30 +2,30 @@
33 * Styles for Article Feedback Plugin
44 */
55
6 -.articleFeedback {
 6+.articleFeedbackv5 {
77 position: relative;
88 display: inline-block;
99 margin-top: 1em;
1010 }
1111
1212 @media print {
13 - .articleFeedback {
 13+ .articleFeedbackv5 {
1414 display:none;
1515 }
1616 }
1717
18 -.articleFeedback-panel {
 18+.articleFeedbackv5-panel {
1919 background-color: #f9f9f9;
2020 border: 1px solid #cccccc;
2121 padding-bottom: 1px;
2222 }
2323
24 -.articleFeedback-error-message {
 24+.articleFeedbackv5-error-message {
2525 padding: 3em;
2626 text-align: center;
2727 }
2828
29 -.articleFeedback-error {
 29+.articleFeedbackv5-error {
3030 display: none;
3131 position: absolute;
3232 top: 0;
@@ -37,7 +37,7 @@
3838 padding-bottom: 1px;
3939 }
4040
41 -.articleFeedback-lock {
 41+.articleFeedbackv5-lock {
4242 display: none;
4343 position: absolute;
4444 top: 0;
@@ -45,7 +45,7 @@
4646 right: 0;
4747 }
4848
49 -.articleFeedback-pitches {
 49+.articleFeedbackv5-pitches {
5050 float: absolute;
5151 top: 1;
5252 left: 1;
@@ -53,20 +53,20 @@
5454 background-color: #f9f9f9;
5555 }
5656
57 -.articleFeedback-pitch {
 57+.articleFeedbackv5-pitch {
5858 display: none;
5959 }
6060
61 -.articleFeedback-lock {
 61+.articleFeedbackv5-lock {
6262 background-color: transparent;
6363 }
6464
65 -.articleFeedback-pitch-or {
 65+.articleFeedbackv5-pitch-or {
6666 margin-left: 0.75em;
6767 margin-right: 0.25em;
6868 }
6969
70 -.articleFeedback-reject {
 70+.articleFeedbackv5-reject {
7171 border: none;
7272 background-color: transparent;
7373 cursor: pointer;
@@ -74,27 +74,27 @@
7575 line-height: 1.4em;
7676 }
7777
78 -.articleFeedback-reject:hover {
 78+.articleFeedbackv5-reject:hover {
7979 text-decoration: underline;
8080 }
8181
82 -.articleFeedback-pitch .articleFeedback-buffer {
 82+.articleFeedbackv5-pitch .articleFeedbackv5-buffer {
8383 padding: 0.75em 1em;
8484 }
8585
86 -.articleFeedback-panel {
 86+.articleFeedbackv5-panel {
8787 float: left;
8888 }
8989
90 -.articleFeedback-panel .articleFeedback-buffer {
 90+.articleFeedbackv5-panel .articleFeedbackv5-buffer {
9191 padding: 0.75em 1em;
9292 }
9393
94 -.articleFeedback-title {
 94+.articleFeedbackv5-title {
9595 font-size: 1.4em;
9696 }
9797
98 -.articleFeedback-pitch .articleFeedback-title {
 98+.articleFeedbackv5-pitch .articleFeedbackv5-title {
9999 font-size: 1em;
100100 padding-left: 28px;
101101 line-height: 32px;
@@ -105,7 +105,7 @@
106106 margin-bottom: 0.5em;
107107 }
108108
109 -.articleFeedback-pitch .articleFeedback-pop {
 109+.articleFeedbackv5-pitch .articleFeedbackv5-pop {
110110 padding: 1em;
111111 margin: 0;
112112 background-color: white;
@@ -120,17 +120,17 @@
121121 border-radius: 5px;
122122 }
123123
124 -.articleFeedback-message {
 124+.articleFeedbackv5-message {
125125 margin: 0.33em;
126126 font-size: 1.5em;
127127 }
128128
129 -.articleFeedback-body {
 129+.articleFeedbackv5-body {
130130 margin: 0.5em;
131131 color: #333333;
132132 }
133133
134 -.articleFeedback-switch {
 134+.articleFeedbackv5-switch {
135135 cursor: pointer;
136136 color: #0645AD;
137137 float: right;
@@ -140,42 +140,42 @@
141141 padding-right: 22px;
142142 }
143143
144 -.articleFeedback-switch:hover {
 144+.articleFeedbackv5-switch:hover {
145145 text-decoration: underline;
146146 }
147147
148 -.articleFeedback-switch-form {
 148+.articleFeedbackv5-switch-form {
149149 /* @embed */
150150 background-image: url(images/form.png);
151151 }
152152
153 -.articleFeedback-switch-report {
 153+.articleFeedbackv5-switch-report {
154154 /* @embed */
155155 background-image: url(images/report.png);
156156 }
157157
158 -.articleFeedback-switch-form:hover {
 158+.articleFeedbackv5-switch-form:hover {
159159 /* @embed */
160160 background-image: url(images/form-hover.png);
161161 }
162162
163 -.articleFeedback-switch-report:hover {
 163+.articleFeedbackv5-switch-report:hover {
164164 /* @embed */
165165 background-image: url(images/report-hover.png);
166166 }
167167
168 -.articleFeedback-explanation, .articleFeedback-description {
 168+.articleFeedbackv5-explanation, .articleFeedbackv5-description {
169169 float: left;
170170 font-weight: bold;
171171 margin-bottom: 0.75em;
172172 }
173173
174 -.articleFeedback-rating-labels {
 174+.articleFeedbackv5-rating-labels {
175175 margin-left: 10px;
176176 }
177177
178 -.articleFeedback-rating-label,
179 -.articleFeedback-rating-clear {
 178+.articleFeedbackv5-rating-label,
 179+.articleFeedbackv5-rating-clear {
180180 float: left;
181181 height: 21px;
182182 width: 21px;
@@ -183,49 +183,49 @@
184184 background-position: center center;
185185 cursor: pointer;
186186 }
187 -.articleFeedback-rating-label {
 187+.articleFeedbackv5-rating-label {
188188 /* @embed */
189189 background-image: url(images/star-empty.png);
190190 }
191191
192 -.articleFeedback-rating-clear {
 192+.articleFeedbackv5-rating-clear {
193193 /* @embed */
194194 background-image: url(images/trash.png);
195195 display: none;
196196 }
197197
198 -.articleFeedback-rating-labels:hover .articleFeedback-rating-clear {
 198+.articleFeedbackv5-rating-labels:hover .articleFeedbackv5-rating-clear {
199199 /* @embed */
200200 background-image: url(images/trash-hover.png);
201201 }
202202
203 -.articleFeedback-rating-label.articleFeedback-rating-label-full {
 203+.articleFeedbackv5-rating-label.articleFeedbackv5-rating-label-full {
204204 /* @embed */
205205 background-image: url(images/star-full.png);
206206 }
207207
208 -.articleFeedback-expired .articleFeedback-rating-label.articleFeedback-rating-label-full {
 208+.articleFeedbackv5-expired .articleFeedbackv5-rating-label.articleFeedbackv5-rating-label-full {
209209 /* @embed */
210210 background-image: url(images/star-full-expired.png);
211211 }
212212
213 -.articleFeedback-rating-new .articleFeedback-rating-label.articleFeedback-rating-label-full,
214 -.articleFeedback-rating .articleFeedback-rating-label.articleFeedback-rating-label-hover-tail {
 213+.articleFeedbackv5-rating-new .articleFeedbackv5-rating-label.articleFeedbackv5-rating-label-full,
 214+.articleFeedbackv5-rating .articleFeedbackv5-rating-label.articleFeedbackv5-rating-label-hover-tail {
215215 /* @embed */
216216 background-image: url(images/star-new.png);
217217 }
218218
219 -.articleFeedback-rating .articleFeedback-rating-label.articleFeedback-rating-label-hover-head {
 219+.articleFeedbackv5-rating .articleFeedbackv5-rating-label.articleFeedbackv5-rating-label-hover-head {
220220 /* @embed */
221221 background-image: url(images/star-new-hover.png);
222222 }
223223
224 -.articleFeedback-rating-new .articleFeedback-rating-label.articleFeedback-rating-label-down {
 224+.articleFeedbackv5-rating-new .articleFeedbackv5-rating-label.articleFeedbackv5-rating-label-down {
225225 /* @embed */
226226 background-image: url(images/star-new-down.png);
227227 }
228228
229 -.articleFeedback-rating-tooltip {
 229+.articleFeedbackv5-rating-tooltip {
230230 float: left;
231231 width: 12em;
232232 margin-left: 12px;
@@ -234,14 +234,14 @@
235235 display: none;
236236 }
237237
238 -.articleFeedback-rating {
 238+.articleFeedbackv5-rating {
239239 float: left;
240240 width: 11em;
241241 height: 5em;
242242 margin-bottom: 0.5em;
243243 }
244244
245 -.articleFeedback-rating-average {
 245+.articleFeedbackv5-rating-average {
246246 float: left;
247247 margin-right: 0.5em;
248248 width: 2em;
@@ -250,7 +250,7 @@
251251 line-height: 17px;
252252 }
253253
254 -.articleFeedback-rating-meter {
 254+.articleFeedbackv5-rating-meter {
255255 float: left;
256256 height: 17px;
257257 width: 104px;
@@ -263,7 +263,7 @@
264264 overflow: hidden;
265265 }
266266
267 -.articleFeedback-rating-meter div {
 267+.articleFeedbackv5-rating-meter div {
268268 float: left;
269269 height: 17px;
270270 /* @embed */
@@ -272,7 +272,7 @@
273273 background-position: center left;
274274 }
275275
276 -.articleFeedback-rating-count {
 276+.articleFeedbackv5-rating-count {
277277 float: right;
278278 font-size: 0.8em;
279279 color: #999999;
@@ -280,7 +280,7 @@
281281 margin-right: 1em;
282282 }
283283
284 -.articleFeedback-label {
 284+.articleFeedbackv5-label {
285285 cursor: pointer;
286286 padding-left: 20px;
287287 /* @embed */
@@ -289,34 +289,34 @@
290290 background-position: center left;
291291 }
292292
293 -.articleFeedback-label:hover {
 293+.articleFeedbackv5-label:hover {
294294 /* @embed */
295295 background-image: url(images/question-hover.png);
296296 }
297297
298 -.articleFeedback-submit {
 298+.articleFeedbackv5-submit {
299299 float: right;
300300 }
301301
302 -.articleFeedback-expertise-disabled,
303 -.articleFeedback-helpimprove-disabled {
 302+.articleFeedbackv5-expertise-disabled,
 303+.articleFeedbackv5-helpimprove-disabled {
304304 color: silver;
305305 }
306306
307 -.articleFeedback-expertise {
 307+.articleFeedbackv5-expertise {
308308 float: left;
309309 margin-bottom: 0.5em;
310310 margin-top: 0.75em;
311311 }
312312
313 -.articleFeedback-expertise input {
 313+.articleFeedbackv5-expertise input {
314314 float: left;
315315 margin-bottom: 0.5em;
316316 clear: both;
317317 cursor: pointer;
318318 }
319319
320 -.articleFeedback-expertise label {
 320+.articleFeedbackv5-expertise label {
321321 margin-left: 0.5em;
322322 margin-bottom: 0.5em;
323323 float: left;
@@ -324,49 +324,49 @@
325325 cursor: pointer;
326326 }
327327
328 -.articleFeedback-expertise-options {
 328+.articleFeedbackv5-expertise-options {
329329 clear: both;
330330 display: none;
331331 }
332332
333 -.articleFeedback-expertise-options input {
 333+.articleFeedbackv5-expertise-options input {
334334 display: block;
335335 clear: both;
336336 margin-left: 2em;
337337 }
338338
339 -.articleFeedback-expertise-options label {
 339+.articleFeedbackv5-expertise-options label {
340340 line-height: 1.6em;
341341 }
342342
343 -.articleFeedback-expertise-options .articleFeedback-helpimprove-email {
 343+.articleFeedbackv5-expertise-options .articleFeedbackv5-helpimprove-email {
344344 width: 20em;
345345 margin-left: 4em;
346346 margin-top: 0.25em;
347347 cursor: text;
348348 }
349349
350 -.articleFeedback-helpimprove-note {
 350+.articleFeedbackv5-helpimprove-note {
351351 margin-left: 4em;
352352 font-size: 0.8em;
353353 clear: both;
354354 }
355355
356 -.articleFeedback-helpimprove-email.valid {
 356+.articleFeedbackv5-helpimprove-email.valid {
357357 background-color: #C0FFC0;
358358 }
359359
360 -.articleFeedback-helpimprove-email.invalid {
 360+.articleFeedbackv5-helpimprove-email.invalid {
361361 background-color: #FFC0C0;
362362 }
363363
364 -.articleFeedback-pending,
365 -.articleFeedback-success {
 364+.articleFeedbackv5-pending,
 365+.articleFeedbackv5-success {
366366 float: right;
367367 }
368368
369 -.articleFeedback-pending span,
370 -.articleFeedback-success span {
 369+.articleFeedbackv5-pending span,
 370+.articleFeedbackv5-success span {
371371 display: none;
372372 padding: 12px 12px 12px 28px;
373373 font-size: 0.8em;
@@ -376,23 +376,23 @@
377377 color: green;
378378 }
379379
380 -.articleFeedback-pending span {
 380+.articleFeedbackv5-pending span {
381381 /* @embed */
382382 background-image: url(images/attention.png);
383383 }
384384
385 -.articleFeedback-success span {
 385+.articleFeedbackv5-success span {
386386 /* @embed */
387387 background-image: url(images/success.png);
388388 }
389389
390 -.articleFeedback-expiry {
 390+.articleFeedbackv5-expiry {
391391 display: none;
392392 border: solid 1px orange;
393393 background-color: white;
394394 padding: 0.5em;
395395 }
396 -.articleFeedback-expiry-title {
 396+.articleFeedbackv5-expiry-title {
397397 font-size: 1.2em;
398398 padding-left: 28px;
399399 /* @embed */
@@ -400,7 +400,7 @@
401401 background-repeat: no-repeat;
402402 background-position: center left;
403403 }
404 -.articleFeedback-expiry-message {
 404+.articleFeedbackv5-expiry-message {
405405 padding-left: 28px;
406406 color: #777777;
407407 }
Index: trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedback/ext.articleFeedback.js
@@ -80,11 +80,11 @@
8181
8282 this.load = function() {
8383 // Try to select existing dialog
84 - $dialog = $( '#articleFeedback-dialog' );
 84+ $dialog = $( '#articleFeedbackv5-dialog' );
8585 // Fall-back on creating one
8686 if ( $dialog.length === 0 ) {
8787 // Create initially in loading state
88 - $dialog = $( '<div id="articleFeedback-dialog" class="loading" />' )
 88+ $dialog = $( '<div id="articleFeedbackv5-dialog" class="loading" />' )
8989 .dialog( {
9090 'width': 600,
9191 'height': 400,
@@ -118,7 +118,7 @@
119119 // Insert disclaimer message
120120 $button.before(
121121 $( '<div>' )
122 - .addClass( 'articleFeedback-survey-disclaimer' )
 122+ .addClass( 'articleFeedbackv5-survey-disclaimer' )
123123 // Can't use .text() with mw.message(, /* $1 */ link).toString(),
124124 // because 'link' should not be re-escaped (which would happen if done by mw.message)
125125 .html( function() {
@@ -139,7 +139,7 @@
140140 $dialog.dialog( 'open' );
141141 };
142142 this.submit = function() {
143 - $dialog = $( '#articleFeedback-dialog' );
 143+ $dialog = $( '#articleFeedbackv5-dialog' );
144144 // Put dialog into "loading" state
145145 $dialog
146146 .addClass( 'loading' )
@@ -205,7 +205,7 @@
206206 };
207207 this.alert = function( message ) {
208208 $message = $( '<div />' )
209 - .addClass( 'articleFeedback-survey-message-' + message )
 209+ .addClass( 'articleFeedbackv5-survey-message-' + message )
210210 .text( mw.msg( 'articlefeedbackv5-survey-message-' + message ) )
211211 .appendTo( $dialog );
212212 $dialog.dialog( 'option', 'height', $message.height() + 100 );
@@ -316,7 +316,7 @@
317317 };
318318
319319 /* Load at the bottom of the article */
320 -var $aftDiv = $( '<div id="mw-articlefeedback"></div>' ).articleFeedback( config );
 320+var $aftDiv = $( '<div id="mw-articlefeedback"></div>' ).articleFeedbackv5( config );
321321
322322 // Put on bottom of article before #catlinks (if it exists)
323323 // Except in legacy skins, which have #catlinks above the article but inside content-div.
Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php
@@ -13,6 +13,7 @@
1414 'scripts' => 'ext.articleFeedback/ext.articleFeedback.startup.js',
1515 'dependencies' => array(
1616 'mediawiki.util',
 17+ 'ext.articleFeedback',
1718 ),
1819 ),
1920 'ext.articleFeedback' => array(
@@ -84,7 +85,7 @@
8586 'articlefeedbackv5-report-panel-description',
8687 'articlefeedbackv5-report-empty',
8788 'articlefeedbackv5-report-ratings',
88 - 'articlefeedbackv5-privacyurl'
 89+ 'articlefeedbackv5-privacyurl',
8990 ),
9091 'dependencies' => array(
9192 'jquery.appear',
@@ -161,6 +162,19 @@
162163 $remotepath = "$wgExtensionAssetsPath/ArticleFeedbackv5/modules";
163164
164165 foreach ( self::$modules as $name => $resources ) {
 166+ if ( $name == 'jquery.articleFeedback' ) {
 167+ $fields = ApiArticleFeedbackv5Utils::getFields();
 168+ $prefix = 'articlefeedbackv5-field-';
 169+ foreach( $fields as $field ) {
 170+ $resources['messages'][] = $prefix . $field->aaf_name . '-label';
 171+ $resources['messages'][] = $prefix . $field->aaf_name . '-tip';
 172+ $resources['messages'][] = $prefix . $field->aaf_name . '-tooltip-1';
 173+ $resources['messages'][] = $prefix . $field->aaf_name . '-tooltip-2';
 174+ $resources['messages'][] = $prefix . $field->aaf_name . '-tooltip-3';
 175+ $resources['messages'][] = $prefix . $field->aaf_name . '-tooltip-4';
 176+ $resources['messages'][] = $prefix . $field->aaf_name . '-tooltip-5';
 177+ }
 178+ }
165179 $resourceLoader->register(
166180 $name, new ResourceLoaderFileModule( $resources, $localpath, $remotepath )
167181 );
@@ -189,10 +203,9 @@
190204 $vars['wgArticleFeedbackv5WhatsThisPage'] = wfMsgForContent( 'articlefeedbackv5-form-panel-explanation-link' );
191205
192206 $fields = ApiArticleFeedbackv5Utils::getFields();
193 -error_log('hi');
194207 foreach( $fields as $field ) {
195208 $vars['wgArticleFeedbackv5RatingTypes'][] = $field->aaf_name;
196 - $vars['wgArticleFeedbackv5RatingTypesFlipped'][$field->aaf_name] = $fiekd->aaf_id;
 209+ $vars['wgArticleFeedbackv5RatingTypesFlipped'][$field->aaf_name] = $field->aaf_id;
197210 }
198211 return true;
199212 }

Status & tagging log