r86592 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86591‎ | r86592 | r86593 >
Date:01:13, 21 April 2011
Author:tparscal
Status:ok
Tags:
Comment:
Using bucket field for options hide/show tracking.
Modified paths:
  • /trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js
@@ -207,7 +207,7 @@
208208 'anontoken': mw.user.id(),
209209 'pageid': mw.config.get( 'wgArticleId' ),
210210 'revid': mw.config.get( 'wgCurRevisionId' ),
211 - 'bucket': context.options.bucket
 211+ 'bucket': Number( showOptions )
212212 } ),
213213 'success': function( data ) {
214214 var context = this;
@@ -787,7 +787,6 @@
788788 * Can be called with an options object like...
789789 *
790790 * $( ... ).articleFeedback( {
791 - * 'bucket': 1, // Numeric identifier of the bucket being used, which is logged on submit
792791 * 'ratings': {
793792 * 'rating-name': {
794793 * 'id': 1, // Numeric identifier of the rating, same as the rating_id value in the db
@@ -808,7 +807,7 @@
809808 var context = $(this).data( 'articleFeedback-context' );
810809 if ( !context ) {
811810 // Create context
812 - context = { '$ui': $(this), 'options': { 'ratings': {}, 'pitches': {}, 'bucket': 1 } };
 811+ context = { '$ui': $(this), 'options': { 'ratings': {}, 'pitches': {} } };
813812 // Allow customization through an options argument
814813 if ( typeof args[0] === 'object' ) {
815814 context = $.extend( true, context, { 'options': args[0] } );

Status & tagging log