Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php |
— | — | @@ -91,6 +91,7 @@ |
92 | 92 | 'articlefeedbackv5-bucket4-teaser-line2' => 'Go ahead, give it a try. Be bold!', |
93 | 93 | 'articlefeedbackv5-bucket4-learn-to-edit' => 'Learn how to edit', |
94 | 94 | 'articlefeedbackv5-bucket4-form-submit' => 'Edit this page', |
| 95 | + 'articlefeedbackv5-bucket4-help-tooltip-info' => 'Wikipedia wants to know what you think. Help improve this page by becoming an editor.', |
95 | 96 | /* Option 5 (just like AFTv4, but ported to work with v5) */ |
96 | 97 | 'articlefeedbackv5-bucket5-form-switch-label' => 'Rate this page', |
97 | 98 | 'articlefeedbackv5-bucket5-form-panel-title' => 'Rate this page', |
— | — | @@ -158,7 +159,6 @@ |
159 | 160 | 'articlefeedbackv5-titlebar-linktext' => 'Feedback', |
160 | 161 | 'articlefeedbackv5-toolbox-linktext' => 'Rate this page', |
161 | 162 | |
162 | | - |
163 | 163 | /* --- copied from AFTv4 and possibly not used --- */ |
164 | 164 | /* ArticleFeedback survey */ |
165 | 165 | 'articlefeedbackv5-survey-question-origin' => 'What page were you on when you started this survey?', |
— | — | @@ -294,6 +294,7 @@ |
295 | 295 | 'articlefeedbackv5-bucket4-teaser-line2' => 'The second line of the teaser text for option 4; should be a playful call to give editing a try.', |
296 | 296 | 'articlefeedbackv5-bucket4-learn-to-edit' => 'The text for the "Learn how to edit" link', |
297 | 297 | 'articlefeedbackv5-bucket4-form-submit' => 'The text for the big edit button', |
| 298 | + 'articlefeedbackv5-bucket4-help-tooltip-info' => 'Overrides "articlefeedbackv5-help-tooltip-info" for option 4; DO NOT TRANSLATE: English text is not finalized.', |
298 | 299 | /* Option 5 (just like AFTv4, but ported to work with v5) */ |
299 | 300 | 'articlefeedbackv5-bucket5-form-panel-explanation' => '{{Identical|What is this}}', |
300 | 301 | 'articlefeedbackv5-bucket5-form-panel-explanation-link' => 'Do not translate "Project:". Also translate the "ArticleFeedback" special page name at [[Special:AdvancedTranslate]].', |
Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js |
— | — | @@ -175,7 +175,7 @@ |
176 | 176 | <div class="tooltip-repeat">\ |
177 | 177 | <h3><html:msg key="help-tooltip-title" /></h3><span class="articleFeedbackv5-tooltip-close">X</span>\ |
178 | 178 | <div class="clear"></div>\ |
179 | | - <p><html:msg key="help-tooltip-info" /></p>\ |
| 179 | + <p class="articleFeedbackv5-tooltip-info"><html:msg key="help-tooltip-info" /></p>\ |
180 | 180 | <p><a target="_blank" class="articleFeedbackv5-tooltip-link"><html:msg key="help-tooltip-linktext" /> >></a></p>\ |
181 | 181 | </div>\ |
182 | 182 | <div class="tooltip-bottom"></div>\ |
— | — | @@ -1113,6 +1113,21 @@ |
1114 | 1114 | .addClass( 'ui-button-blue' ) |
1115 | 1115 | |
1116 | 1116 | return $block; |
| 1117 | + }, |
| 1118 | + |
| 1119 | + // }}} |
| 1120 | + // {{{ afterBuild |
| 1121 | + |
| 1122 | + /** |
| 1123 | + * Handles any setup that has to be done once the markup is in the |
| 1124 | + * holder |
| 1125 | + */ |
| 1126 | + afterBuild: function () { |
| 1127 | + // Set a custom message |
| 1128 | + $.articleFeedbackv5.$holder |
| 1129 | + .add( $.articleFeedbackv5.$dialog) |
| 1130 | + .find( '.articleFeedbackv5-tooltip-info' ) |
| 1131 | + .text( mw.msg( 'articlefeedbackv5-bucket4-help-tooltip-info' ) ); |
1117 | 1132 | } |
1118 | 1133 | |
1119 | 1134 | // }}} |
— | — | @@ -1490,6 +1505,20 @@ |
1491 | 1506 | }, |
1492 | 1507 | |
1493 | 1508 | // }}} |
| 1509 | + // {{{ afterBuild |
| 1510 | + |
| 1511 | + /** |
| 1512 | + * Handles any setup that has to be done once the markup is in the |
| 1513 | + * holder |
| 1514 | + */ |
| 1515 | + afterBuild: function () { |
| 1516 | + // Drop the tooltip and trigger |
| 1517 | + $.articleFeedbackv5.$holder |
| 1518 | + .add( $.articleFeedbackv5.$dialog) |
| 1519 | + .find( '.articleFeedbackv5-tooltip-trigger' ).hide(); |
| 1520 | + }, |
| 1521 | + |
| 1522 | + // }}} |
1494 | 1523 | // {{{ updateRating |
1495 | 1524 | |
1496 | 1525 | /** |
— | — | @@ -2056,15 +2085,10 @@ |
2057 | 2086 | $wrapper.find( '.articleFeedbackv5-tooltip-link' ) |
2058 | 2087 | .attr( 'href', mw.msg( 'articlefeedbackv5-help-tooltip-linkurl' ) ); |
2059 | 2088 | $wrapper.find( '.articleFeedbackv5-tooltip' ).hide(); |
| 2089 | + $wrapper.find( '.articleFeedbackv5-tooltip-trigger' ).click( function () { |
| 2090 | + $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-tooltip' ).toggle(); |
| 2091 | + } ); |
2060 | 2092 | |
2061 | | - if ( $.articleFeedbackv5.bucketId == 5 ) { |
2062 | | - $wrapper.find( '.articleFeedbackv5-tooltip-trigger' ).hide(); |
2063 | | - } else { |
2064 | | - $wrapper.find( '.articleFeedbackv5-tooltip-trigger' ).click( function () { |
2065 | | - $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-tooltip' ).toggle(); |
2066 | | - } ); |
2067 | | - } |
2068 | | - |
2069 | 2093 | $wrapper.find( '.articleFeedbackv5-tooltip-close' ).click( function () { |
2070 | 2094 | $.articleFeedbackv5.$holder.find( '.articleFeedbackv5-tooltip' ).toggle(); |
2071 | 2095 | } ); |
Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php |
— | — | @@ -83,6 +83,7 @@ |
84 | 84 | 'articlefeedbackv5-bucket4-teaser-line2', |
85 | 85 | 'articlefeedbackv5-bucket4-learn-to-edit', |
86 | 86 | 'articlefeedbackv5-bucket4-form-submit', |
| 87 | + 'articlefeedbackv5-bucket4-help-tooltip-info', |
87 | 88 | 'articlefeedbackv5-bucket5-form-switch-label', |
88 | 89 | 'articlefeedbackv5-bucket5-form-panel-title', |
89 | 90 | 'articlefeedbackv5-bucket5-form-panel-explanation', |