Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php |
— | — | @@ -159,6 +159,7 @@ |
160 | 160 | 'articlefeedbackv5-bucket5-wellwritten-tooltip-3' => 'Adequate clarity', |
161 | 161 | 'articlefeedbackv5-bucket5-wellwritten-tooltip-4' => 'Good clarity', |
162 | 162 | 'articlefeedbackv5-bucket5-wellwritten-tooltip-5' => 'Exceptional clarity', |
| 163 | + 'articlefeedbackv5-bucket5-toolbox-linktext' => 'Rate this page', |
163 | 164 | /* Messages shared by all displays */ |
164 | 165 | 'articlefeedbackv5-shared-on-feedback' => 'Your comment will be shared on this $1.', |
165 | 166 | 'articlefeedbackv5-shared-on-feedback-linktext' => 'feedback page', |
— | — | @@ -172,7 +173,7 @@ |
173 | 174 | 'articlefeedbackv5-section-linktext' => 'feedback', |
174 | 175 | 'articlefeedbackv5-titlebar-linktext' => 'Help improve this article >>', |
175 | 176 | 'articlefeedbackv5-fixedtab-linktext' => 'Improve this page', |
176 | | - 'articlefeedbackv5-toolbox-linktext' => 'Rate this page', |
| 177 | + 'articlefeedbackv5-toolbox-linktext' => 'Improve this page', |
177 | 178 | |
178 | 179 | /* --- copied from AFTv4 and possibly not used --- */ |
179 | 180 | /* ArticleFeedback survey */ |
— | — | @@ -321,6 +322,7 @@ |
322 | 323 | 'articlefeedbackv5-bucket5-report-ratings' => "Needs plural support. |
323 | 324 | This message is used in JavaScript by module 'jquery.articleFeedback'. |
324 | 325 | $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.', |
325 | 327 | /* Messages shared by all displays */ |
326 | 328 | 'articlefeedbackv5-error' => 'This error message will be displayed in a grey box replacing the form if there was an unrecoverable error.', |
327 | 329 | '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 @@ |
111 | 111 | |
112 | 112 | /* Add fixed tab link */ |
113 | 113 | 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(); |
119 | 119 | clickFeedbackLink( $( e.target ) ); |
120 | | - } ) |
121 | | - .insertBefore( $aftDiv ); |
122 | | - $aftDiv.articleFeedbackv5( 'addToRemovalQueue', $fixedTab ); |
| 120 | + } ) |
| 121 | + .insertBefore( $aftDiv ); |
| 122 | + $aftDiv.articleFeedbackv5( 'addToRemovalQueue', $fixedTab ); |
123 | 123 | } |
124 | 124 | |
125 | 125 | /* Add toolbox link */ |
126 | 126 | 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>' ) |
128 | 128 | .find( 'a' ) |
129 | | - .text( mw.msg( 'articlefeedbackv5-toolbox-linktext' ) ) |
| 129 | + .text( mw.msg( 'articlefeedbackv5-bucket5-toolbox-linktext' ) ) |
130 | 130 | .click( function ( e ) { |
131 | 131 | // Just set the link ID -- this should act just like AFTv4 |
132 | 132 | $aftDiv.articleFeedbackv5( 'setLinkId', 4 ); |
133 | 133 | } ) |
134 | 134 | .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 ); |
136 | 147 | } |
137 | 148 | |
138 | 149 | } )( jQuery ); |
Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php |
— | — | @@ -21,8 +21,9 @@ |
22 | 22 | 'messages' => array( |
23 | 23 | 'articlefeedbackv5-section-linktext', |
24 | 24 | 'articlefeedbackv5-titlebar-linktext', |
25 | | - 'articlefeedbackv5-fixedtab-linktext', |
| 25 | + 'articlefeedbackv5-fixedtab-linktext', |
26 | 26 | 'articlefeedbackv5-toolbox-linktext', |
| 27 | + 'articlefeedbackv5-bucket5-toolbox-linktext', |
27 | 28 | ), |
28 | 29 | 'dependencies' => array( |
29 | 30 | 'jquery.ui.dialog', |
— | — | @@ -54,7 +55,7 @@ |
55 | 56 | 'articlefeedbackv5-cta1-confirmation-title', |
56 | 57 | 'articlefeedbackv5-cta1-confirmation-call', |
57 | 58 | 'articlefeedbackv5-cta1-learn-how', |
58 | | - 'articlefeedbackv5-cta1-learn-how-url', |
| 59 | + 'articlefeedbackv5-cta1-learn-how-url', |
59 | 60 | 'articlefeedbackv5-cta1-edit-linktext', |
60 | 61 | 'articlefeedbackv5-bucket1-title', |
61 | 62 | 'articlefeedbackv5-bucket1-question-toggle', |
— | — | @@ -138,7 +139,7 @@ |
139 | 140 | 'articlefeedbackv5-error-flagging', |
140 | 141 | 'articlefeedbackv5-invalid-feedback-id', |
141 | 142 | 'articlefeedbackv5-invalid-feedback-flag', |
142 | | - 'articlefeedbackv5-abuse-saved', |
| 143 | + 'articlefeedbackv5-abuse-saved', |
143 | 144 | 'articlefeedbackv5-hide-saved', |
144 | 145 | ), |
145 | 146 | ), |