Index: trunk/extensions/ArticleFeedback/ArticleFeedback.hooks.php |
— | — | @@ -21,12 +21,32 @@ |
22 | 22 | 'messages' => array( |
23 | 23 | 'articlefeedback-field-trustworthy-label', |
24 | 24 | 'articlefeedback-field-trustworthy-tip', |
| 25 | + 'articlefeedback-field-trustworthy-tooltip-1', |
| 26 | + 'articlefeedback-field-trustworthy-tooltip-2', |
| 27 | + 'articlefeedback-field-trustworthy-tooltip-3', |
| 28 | + 'articlefeedback-field-trustworthy-tooltip-4', |
| 29 | + 'articlefeedback-field-trustworthy-tooltip-5', |
25 | 30 | 'articlefeedback-field-complete-label', |
26 | 31 | 'articlefeedback-field-complete-tip', |
| 32 | + 'articlefeedback-field-complete-tooltip-1', |
| 33 | + 'articlefeedback-field-complete-tooltip-2', |
| 34 | + 'articlefeedback-field-complete-tooltip-3', |
| 35 | + 'articlefeedback-field-complete-tooltip-4', |
| 36 | + 'articlefeedback-field-complete-tooltip-5', |
27 | 37 | 'articlefeedback-field-objective-label', |
28 | 38 | 'articlefeedback-field-objective-tip', |
| 39 | + 'articlefeedback-field-objective-tooltip-1', |
| 40 | + 'articlefeedback-field-objective-tooltip-2', |
| 41 | + 'articlefeedback-field-objective-tooltip-3', |
| 42 | + 'articlefeedback-field-objective-tooltip-4', |
| 43 | + 'articlefeedback-field-objective-tooltip-5', |
29 | 44 | 'articlefeedback-field-wellwritten-label', |
30 | 45 | 'articlefeedback-field-wellwritten-tip', |
| 46 | + 'articlefeedback-field-wellwritten-tooltip-1', |
| 47 | + 'articlefeedback-field-wellwritten-tooltip-2', |
| 48 | + 'articlefeedback-field-wellwritten-tooltip-3', |
| 49 | + 'articlefeedback-field-wellwritten-tooltip-4', |
| 50 | + 'articlefeedback-field-wellwritten-tooltip-5', |
31 | 51 | 'articlefeedback-pitch-reject', |
32 | 52 | 'articlefeedback-pitch-or', |
33 | 53 | 'articlefeedback-pitch-thanks', |
Index: trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js |
— | — | @@ -112,6 +112,7 @@ |
113 | 113 | <div class="articleFeedback-rating-label" rel="5"></div>\ |
114 | 114 | <div class="articleFeedback-rating-clear"></div>\ |
115 | 115 | </div>\ |
| 116 | + <div class="articleFeedback-rating-tooltip articleFeedback-visibleWith-form"></div>\ |
116 | 117 | <div class="articleFeedback-rating-average articleFeedback-visibleWith-report"></div>\ |
117 | 118 | <div class="articleFeedback-rating-meter articleFeedback-visibleWith-report"><div></div></div>\ |
118 | 119 | <div class="articleFeedback-rating-count articleFeedback-visibleWith-report"></div>\ |
— | — | @@ -486,11 +487,12 @@ |
487 | 488 | .find( '.articleFeedback-ratings' ) |
488 | 489 | .each( function() { |
489 | 490 | for ( var key in context.options.ratings ) { |
| 491 | + var rating = context.options.ratings[key]; |
490 | 492 | $( $.articleFeedback.tpl.rating ) |
491 | 493 | .attr( 'rel', key ) |
492 | 494 | .find( '.articleFeedback-label' ) |
493 | | - .attr( 'title', mw.msg( context.options.ratings[key].tip ) ) |
494 | | - .text( mw.msg( context.options.ratings[key].label ) ) |
| 495 | + .attr( 'title', mw.msg( rating.tip ) ) |
| 496 | + .text( mw.msg( rating.label ) ) |
495 | 497 | .end() |
496 | 498 | .find( '.articleFeedback-rating-clear' ) |
497 | 499 | .attr( 'title', mw.msg( 'articlefeedback-form-panel-clear' ) ) |
— | — | @@ -731,19 +733,30 @@ |
732 | 734 | .find( '.articleFeedback-rating-label' ) |
733 | 735 | .hover( |
734 | 736 | function() { |
735 | | - $(this) |
| 737 | + var $el = $(this), |
| 738 | + $rating = $el.closest( '.articleFeedback-rating' ); |
| 739 | + $el |
736 | 740 | .addClass( 'articleFeedback-rating-label-hover-head' ) |
737 | 741 | .prevAll( '.articleFeedback-rating-label' ) |
738 | 742 | .addClass( 'articleFeedback-rating-label-hover-tail' ); |
| 743 | + $rating |
| 744 | + .find( '.articleFeedback-rating-tooltip' ) |
| 745 | + .text( mw.msg( 'articlefeedback-field-' + $rating.attr( 'rel' ) + '-tooltip-' + $el.attr( 'rel' ) ) ) |
| 746 | + .show(); |
739 | 747 | }, |
740 | 748 | function() { |
741 | | - $(this) |
| 749 | + var $el = $(this), |
| 750 | + $rating = $el.closest( '.articleFeedback-rating' ); |
| 751 | + $el |
742 | 752 | .removeClass( 'articleFeedback-rating-label-hover-head' ) |
743 | 753 | .prevAll( '.articleFeedback-rating-label' ) |
744 | 754 | .removeClass( 'articleFeedback-rating-label-hover-tail' ); |
745 | | - $.articleFeedback.fn.updateRating.call( |
746 | | - $(this).closest( '.articleFeedback-rating' ) |
747 | | - ); |
| 755 | + $rating |
| 756 | + .closest( '.articleFeedback-rating' ) |
| 757 | + .find( '.articleFeedback-rating-tooltip' ) |
| 758 | + .hide(); |
| 759 | + |
| 760 | + $.articleFeedback.fn.updateRating.call( $rating ); |
748 | 761 | } |
749 | 762 | ) |
750 | 763 | .mousedown( function() { |
Index: trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.css |
— | — | @@ -174,7 +174,8 @@ |
175 | 175 | margin-left: 10px; |
176 | 176 | } |
177 | 177 | |
178 | | -.articleFeedback-rating-label, .articleFeedback-rating-clear { |
| 178 | +.articleFeedback-rating-label, |
| 179 | +.articleFeedback-rating-clear { |
179 | 180 | float: left; |
180 | 181 | height: 21px; |
181 | 182 | width: 21px; |
— | — | @@ -224,10 +225,19 @@ |
225 | 226 | background-image: url(images/star-new-down.png); |
226 | 227 | } |
227 | 228 | |
| 229 | +.articleFeedback-rating-tooltip { |
| 230 | + float: left; |
| 231 | + width: 170px; |
| 232 | + margin-left: 12px; |
| 233 | + color: #999999; |
| 234 | + font-size: 0.9em; |
| 235 | + display: none; |
| 236 | +} |
| 237 | + |
228 | 238 | .articleFeedback-rating { |
229 | 239 | float: left; |
230 | 240 | width: 11em; |
231 | | - height: 4em; |
| 241 | + height: 5em; |
232 | 242 | margin-bottom: 0.5em; |
233 | 243 | } |
234 | 244 | |
Index: trunk/extensions/ArticleFeedback/ArticleFeedback.i18n.php |
— | — | @@ -55,12 +55,32 @@ |
56 | 56 | 'articlefeedback-report-ratings' => '$1 ratings', |
57 | 57 | 'articlefeedback-field-trustworthy-label' => 'Trustworthy', |
58 | 58 | 'articlefeedback-field-trustworthy-tip' => 'Do you feel this page has sufficient citations and that those citations come from trustworthy sources?', |
| 59 | + 'articlefeedback-field-trustworthy-tooltip-1' => 'Lacks reputable sources', |
| 60 | + 'articlefeedback-field-trustworthy-tooltip-2' => 'Few reputable sources', |
| 61 | + 'articlefeedback-field-trustworthy-tooltip-3' => 'Adequate reputable sources', |
| 62 | + 'articlefeedback-field-trustworthy-tooltip-4' => 'Good reputable sources', |
| 63 | + 'articlefeedback-field-trustworthy-tooltip-5' => 'Great reputable sources', |
59 | 64 | 'articlefeedback-field-complete-label' => 'Complete', |
60 | 65 | 'articlefeedback-field-complete-tip' => 'Do you feel that this page covers the essential topic areas that it should?', |
| 66 | + 'articlefeedback-field-complete-tooltip-1' => 'Missing most information', |
| 67 | + 'articlefeedback-field-complete-tooltip-2' => 'Contains some information', |
| 68 | + 'articlefeedback-field-complete-tooltip-3' => 'Contains key information, but with gaps', |
| 69 | + 'articlefeedback-field-complete-tooltip-4' => 'Contains most key information', |
| 70 | + 'articlefeedback-field-complete-tooltip-5' => 'Comprehensive coverage', |
61 | 71 | 'articlefeedback-field-objective-label' => 'Objective', |
62 | 72 | 'articlefeedback-field-objective-tip' => 'Do you feel that this page shows a fair representation of all perspectives on the issue?', |
| 73 | + 'articlefeedback-field-objective-tooltip-1' => 'Heavily biased', |
| 74 | + 'articlefeedback-field-objective-tooltip-2' => 'Moderate bias', |
| 75 | + 'articlefeedback-field-objective-tooltip-3' => 'Minimal bias', |
| 76 | + 'articlefeedback-field-objective-tooltip-4' => 'No obvious bias', |
| 77 | + 'articlefeedback-field-objective-tooltip-5' => 'Completely unbiased', |
63 | 78 | 'articlefeedback-field-wellwritten-label' => 'Well-written', |
64 | 79 | 'articlefeedback-field-wellwritten-tip' => 'Do you feel that this page is well-organized and well-written?', |
| 80 | + 'articlefeedback-field-wellwritten-tooltip-1' => 'Incomprehensible', |
| 81 | + 'articlefeedback-field-wellwritten-tooltip-2' => 'Difficult to understand', |
| 82 | + 'articlefeedback-field-wellwritten-tooltip-3' => 'Adequate clarity', |
| 83 | + 'articlefeedback-field-wellwritten-tooltip-4' => 'Good clarity', |
| 84 | + 'articlefeedback-field-wellwritten-tooltip-5' => 'Exceptional clarity', |
65 | 85 | 'articlefeedback-pitch-reject' => 'Maybe later', |
66 | 86 | 'articlefeedback-pitch-or' => 'or', |
67 | 87 | 'articlefeedback-pitch-thanks' => 'Thanks! Your ratings have been saved.', |