r105751 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105750‎ | r105751 | r105752 >
Date:03:47, 10 December 2011
Author:rsterbin
Status:ok
Tags:
Comment:
Updated added the toolbox link for buckets 1-3:
- modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js:
- Updated to add the toolbox link all the time, with bucket 5 still
retaining its overrides
- ArticleFeedbackv5.i18n.php:
- Added articlefeedbackv5-bucket5-toolbox-linktext (as 'Rate this page')
- Changed articlefeedbackv5-toolbox-linktext to read 'Improve this page'
- ArticleFeedbackv5.hooks.php:
- Added 'articlefeedbackv5-bucket5-toolbox-linktext' to the messages
for ext.articleFeedbackv5
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php
@@ -159,6 +159,7 @@
160160 'articlefeedbackv5-bucket5-wellwritten-tooltip-3' => 'Adequate clarity',
161161 'articlefeedbackv5-bucket5-wellwritten-tooltip-4' => 'Good clarity',
162162 'articlefeedbackv5-bucket5-wellwritten-tooltip-5' => 'Exceptional clarity',
 163+ 'articlefeedbackv5-bucket5-toolbox-linktext' => 'Rate this page',
163164 /* Messages shared by all displays */
164165 'articlefeedbackv5-shared-on-feedback' => 'Your comment will be shared on this $1.',
165166 'articlefeedbackv5-shared-on-feedback-linktext' => 'feedback page',
@@ -172,7 +173,7 @@
173174 'articlefeedbackv5-section-linktext' => 'feedback',
174175 'articlefeedbackv5-titlebar-linktext' => 'Help improve this article >>',
175176 'articlefeedbackv5-fixedtab-linktext' => 'Improve this page',
176 - 'articlefeedbackv5-toolbox-linktext' => 'Rate this page',
 177+ 'articlefeedbackv5-toolbox-linktext' => 'Improve this page',
177178
178179 /* --- copied from AFTv4 and possibly not used --- */
179180 /* ArticleFeedback survey */
@@ -321,6 +322,7 @@
322323 'articlefeedbackv5-bucket5-report-ratings' => "Needs plural support.
323324 This message is used in JavaScript by module 'jquery.articleFeedback'.
324325 $1 is an integer, and the rating count.",
 326+ 'articlefeedbackv5-bucket5-toolbox-linktext' => 'When a link to pop up the feedback tool appears at the bottom of the toolbox area in the sidebar, this will be the link text. This should match AFTv4.',
325327 /* Messages shared by all displays */
326328 'articlefeedbackv5-error' => 'This error message will be displayed in a grey box replacing the form if there was an unrecoverable error.',
327329 'articlefeedbackv5-error-nofeedback' => 'This error message will be displayed above the form (but below the title) if the user has attempted to submit a blank form.',
Index: trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js
@@ -110,28 +110,39 @@
111111
112112 /* Add fixed tab link */
113113 if( '3' == linkBucket ) {
114 - var $fixedTab = $( '<a href="#mw-articleFeedbackv5" id="articleFeedbackv5-fixedtablink"></a>')
115 - .data( 'linkId', 3 )
116 - .text( mw.msg( 'articlefeedbackv5-fixedtab-linktext' ) )
117 - .click( function( e ) {
118 - e.preventDefault();
 114+ var $fixedTab = $( '<a href="#mw-articleFeedbackv5" id="articleFeedbackv5-fixedtablink"></a>')
 115+ .data( 'linkId', 3 )
 116+ .text( mw.msg( 'articlefeedbackv5-fixedtab-linktext' ) )
 117+ .click( function( e ) {
 118+ e.preventDefault();
119119 clickFeedbackLink( $( e.target ) );
120 - } )
121 - .insertBefore( $aftDiv );
122 - $aftDiv.articleFeedbackv5( 'addToRemovalQueue', $fixedTab );
 120+ } )
 121+ .insertBefore( $aftDiv );
 122+ $aftDiv.articleFeedbackv5( 'addToRemovalQueue', $fixedTab );
123123 }
124124
125125 /* Add toolbox link */
126126 if ( '5' == $aftDiv.articleFeedbackv5( 'getBucketId' ) ) {
127 - var $aftLink4 = $( '<li id="t-articlefeedbackv5"><a href="#mw-articlefeedbackv5"></a></li>' )
 127+ var $tbx = $( '<li id="t-articlefeedbackv5"><a href="#mw-articlefeedbackv5"></a></li>' )
128128 .find( 'a' )
129 - .text( mw.msg( 'articlefeedbackv5-toolbox-linktext' ) )
 129+ .text( mw.msg( 'articlefeedbackv5-bucket5-toolbox-linktext' ) )
130130 .click( function ( e ) {
131131 // Just set the link ID -- this should act just like AFTv4
132132 $aftDiv.articleFeedbackv5( 'setLinkId', 4 );
133133 } )
134134 .end();
135 - $( '#p-tb' ).find( 'ul' ).append( $aftLink4 );
 135+ $( '#p-tb' ).find( 'ul' ).append( $tbx );
 136+} else {
 137+ var $tbx = $( '<li id="t-articlefeedbackv5"><a href="#mw-articlefeedbackv5"></a></li>' )
 138+ .find( 'a' )
 139+ .text( mw.msg( 'articlefeedbackv5-toolbox-linktext' ) )
 140+ .click( function ( e ) {
 141+ e.preventDefault();
 142+ clickFeedbackLink( $( e.target ) );
 143+ } )
 144+ .end();
 145+ $( '#p-tb' ).find( 'ul' ).append( $tbx );
 146+ $aftDiv.articleFeedbackv5( 'addToRemovalQueue', $tbx );
136147 }
137148
138149 } )( jQuery );
Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php
@@ -21,8 +21,9 @@
2222 'messages' => array(
2323 'articlefeedbackv5-section-linktext',
2424 'articlefeedbackv5-titlebar-linktext',
25 - 'articlefeedbackv5-fixedtab-linktext',
 25+ 'articlefeedbackv5-fixedtab-linktext',
2626 'articlefeedbackv5-toolbox-linktext',
 27+ 'articlefeedbackv5-bucket5-toolbox-linktext',
2728 ),
2829 'dependencies' => array(
2930 'jquery.ui.dialog',
@@ -54,7 +55,7 @@
5556 'articlefeedbackv5-cta1-confirmation-title',
5657 'articlefeedbackv5-cta1-confirmation-call',
5758 'articlefeedbackv5-cta1-learn-how',
58 - 'articlefeedbackv5-cta1-learn-how-url',
 59+ 'articlefeedbackv5-cta1-learn-how-url',
5960 'articlefeedbackv5-cta1-edit-linktext',
6061 'articlefeedbackv5-bucket1-title',
6162 'articlefeedbackv5-bucket1-question-toggle',
@@ -138,7 +139,7 @@
139140 'articlefeedbackv5-error-flagging',
140141 'articlefeedbackv5-invalid-feedback-id',
141142 'articlefeedbackv5-invalid-feedback-flag',
142 - 'articlefeedbackv5-abuse-saved',
 143+ 'articlefeedbackv5-abuse-saved',
143144 'articlefeedbackv5-hide-saved',
144145 ),
145146 ),

Status & tagging log