r89444 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89443‎ | r89444 | r89445 >
Date:21:09, 3 June 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: MFT r89360, r89365, r89367
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/ArticleFeedback/ArticleFeedback.hooks.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/ArticleFeedback/ArticleFeedback.i18n.php (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.js (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.css (modified) (history)
  • /branches/wmf/1.17wmf1/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.css
@@ -164,7 +164,7 @@
165165 background-image: url(images/report-hover.png);
166166 }
167167
168 -.articleFeedback-instructions, .articleFeedback-description {
 168+.articleFeedback-explanation, .articleFeedback-description {
169169 float: left;
170170 font-weight: bold;
171171 margin-bottom: 0.75em;
Index: branches/wmf/1.17wmf1/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js
@@ -60,7 +60,7 @@
6161 <div class="articleFeedback-switch articleFeedback-switch-form articleFeedback-visibleWith-report" rel="form"><html:msg key="form-switch-label" /></div>\
6262 <div class="articleFeedback-title articleFeedback-visibleWith-form"><html:msg key="form-panel-title" /></div>\
6363 <div class="articleFeedback-title articleFeedback-visibleWith-report"><html:msg key="report-panel-title" /></div>\
64 - <div class="articleFeedback-instructions articleFeedback-visibleWith-form"><html:msg key="form-panel-instructions" /></div>\
 64+ <div class="articleFeedback-explanation articleFeedback-visibleWith-form"><a class="articleFeedback-explanation-link"><html:msg key="form-panel-explanation" /></a></div>\
6565 <div class="articleFeedback-description articleFeedback-visibleWith-report"><html:msg key="report-panel-description" /></div>\
6666 <div style="clear:both;"></div>\
6767 <div class="articleFeedback-ratings"></div>\
@@ -499,6 +499,11 @@
500500 }
501501 } )
502502 .end()
 503+ .find( '.articleFeedback-explanation-link' )
 504+ .attr( 'href', mw.config.get( 'wgArticlePath' ).replace(
 505+ '$1', mw.msg( 'articlefeedback-form-panel-explanation-link' )
 506+ ) )
 507+ .end()
503508 .find( '.articleFeedback-pitches' )
504509 .each( function() {
505510 for ( var key in context.options.pitches ) {
@@ -662,7 +667,10 @@
663668 // the user has rejected this within 3 days of right now
664669 var display = $.cookie( prefix( 'pitch-' + key ) );
665670 if ( display !== 'hide' && context.options.pitches[key].condition() ) {
666 - pitches.push( key );
 671+ var weight = 'weight' in pitches ? pitches.weight : 1;
 672+ for ( var i = 0; i < weight; i++ ) {
 673+ pitches.push( key );
 674+ }
667675 }
668676 }
669677 if ( pitches.length ) {
Index: branches/wmf/1.17wmf1/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.js
@@ -219,6 +219,7 @@
220220 },
221221 'pitches': {
222222 'survey': {
 223+ 'weight': 1,
223224 'condition': function() {
224225 return isPitchVisible( 'survey' );
225226 },
@@ -236,6 +237,7 @@
237238 'reject': 'articlefeedback-pitch-reject'
238239 },
239240 'join': {
 241+ 'weight': 1,
240242 'condition': function() {
241243 //return isPitchVisible( 'join' ) && mw.user.anonymous();
242244 // Temp hack to disable join CTAs --roan Jun 2 2011
@@ -275,6 +277,7 @@
276278 }
277279 },
278280 'edit': {
 281+ 'weight': 2,
279282 'condition': function() {
280283 // An empty restrictions array means anyone can edit
281284 var restrictions = mw.config.get( 'wgRestrictionEdit' );
Index: branches/wmf/1.17wmf1/extensions/ArticleFeedback/ArticleFeedback.i18n.php
@@ -30,7 +30,8 @@
3131 'articlefeedback-error' => 'An error has occured. Please try again later.',
3232 'articlefeedback-form-switch-label' => 'Rate this page',
3333 'articlefeedback-form-panel-title' => 'Rate this page',
34 - 'articlefeedback-form-panel-instructions' => 'Please take a moment to rate this page.',
 34+ 'articlefeedback-form-panel-explanation' => 'What\'s this?',
 35+ 'articlefeedback-form-panel-explanation-link' => 'Project:ArticleFeedback',
3536 'articlefeedback-form-panel-clear' => 'Remove this rating',
3637 'articlefeedback-form-panel-expertise' => 'I am highly knowledgeable about this topic (optional)',
3738 'articlefeedback-form-panel-expertise-studies' => 'I have a relevant college/university degree',
Index: branches/wmf/1.17wmf1/extensions/ArticleFeedback/ArticleFeedback.hooks.php
@@ -63,7 +63,8 @@
6464 'articlefeedback-error',
6565 'articlefeedback-form-switch-label',
6666 'articlefeedback-form-panel-title',
67 - 'articlefeedback-form-panel-instructions',
 67+ 'articlefeedback-form-panel-explanation',
 68+ 'articlefeedback-form-panel-explanation-link',
6869 'articlefeedback-form-panel-clear',
6970 'articlefeedback-form-panel-expertise',
7071 'articlefeedback-form-panel-expertise-studies',

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r89360Added weights to pitches, allowing them to be configured to be more likely to...tparscal20:10, 2 June 2011
r89365Replaced "instructions" message with"explaination" message, which links by de...tparscal21:05, 2 June 2011
r89367Aye kant zpelltparscal21:15, 2 June 2011

Status & tagging log