Index: trunk/extensions/ArticleFeedback/ArticleFeedback.hooks.php |
— | — | @@ -49,6 +49,7 @@ |
50 | 50 | 'articlefeedback-beta-form-panel-submit', |
51 | 51 | 'articlefeedback-beta-report-tab-label', |
52 | 52 | 'articlefeedback-beta-report-panel-title', |
| 53 | + 'articlefeedback-beta-report-panel-description', |
53 | 54 | 'articlefeedback-beta-field-wellsourced-label', |
54 | 55 | 'articlefeedback-beta-field-wellsourced-tip', |
55 | 56 | 'articlefeedback-beta-field-complete-label', |
Index: trunk/extensions/ArticleFeedback/modules/ext.articleFeedback-beta/ext.articleFeedback-beta.css |
— | — | @@ -3,6 +3,7 @@ |
4 | 4 | */ |
5 | 5 | |
6 | 6 | .articleFeedback { |
| 7 | + position: relative; |
7 | 8 | display: inline-block; |
8 | 9 | width: 45em; /* 1em extra space to resolve rounding errors*/ |
9 | 10 | } |
— | — | @@ -15,14 +16,26 @@ |
16 | 17 | padding-bottom: 1px; |
17 | 18 | } |
18 | 19 | |
| 20 | +.articleFeedback-dialog { |
| 21 | + display: none; |
| 22 | + position: absolute; |
| 23 | + top: 0; |
| 24 | + left: 0; |
| 25 | + height: 13.5em; |
| 26 | + width: 44em; |
| 27 | + background-color: #f3f3f3; |
| 28 | + border: 1px solid #cccccc; |
| 29 | + padding-bottom: 1px; |
| 30 | +} |
| 31 | + |
| 32 | +.articleFeedback-dialog .articleFeedback-buffer { |
| 33 | + padding: 0.75em 1em; |
| 34 | +} |
| 35 | + |
19 | 36 | .articleFeedback-panel, .articleFeedback-tabs { |
20 | 37 | float: left; |
21 | 38 | } |
22 | 39 | |
23 | | -.articleFeedback-panel[rel=report] { |
24 | | - display: none; |
25 | | -} |
26 | | - |
27 | 40 | .articleFeedback-tabs { |
28 | 41 | width: 8em; |
29 | 42 | height: 13.5em; |
— | — | @@ -48,7 +61,7 @@ |
49 | 62 | background-image: url(images/tab-fade.png); |
50 | 63 | } |
51 | 64 | |
52 | | -.articleFeedback-tab[rel=form] { |
| 65 | +.articleFeedback-tab-form { |
53 | 66 | margin-top: 1px; |
54 | 67 | margin-bottom: 1px; |
55 | 68 | } |
— | — | @@ -65,15 +78,15 @@ |
66 | 79 | color: #0645ad; |
67 | 80 | } |
68 | 81 | |
69 | | -.articleFeedback-tab[rel=form] .articleFeedback-buffer { |
| 82 | +.articleFeedback-tab-form .articleFeedback-buffer { |
70 | 83 | background-image: url(images/form-icon.png); |
71 | 84 | } |
72 | 85 | |
73 | | -.articleFeedback-tab[rel=report] .articleFeedback-buffer { |
| 86 | +.articleFeedback-tab-report .articleFeedback-buffer { |
74 | 87 | background-image: url(images/report-icon.png); |
75 | 88 | } |
76 | 89 | |
77 | | -.articleFeedback-tab .articleFeedback-buffer:hover { |
| 90 | +.articleFeedback-tab:hover .articleFeedback-buffer { |
78 | 91 | text-decoration: underline; |
79 | 92 | } |
80 | 93 | |
— | — | @@ -86,14 +99,16 @@ |
87 | 100 | font-size: 1.4em; |
88 | 101 | } |
89 | 102 | |
90 | | -.articleFeedback-instructions { |
| 103 | +.articleFeedback-instructions, .articleFeedback-description { |
91 | 104 | float: left; |
92 | 105 | font-weight: bold; |
| 106 | + margin-bottom: 1em; |
93 | 107 | } |
94 | 108 | |
95 | 109 | .articleFeedback-rating { |
96 | 110 | float: left; |
97 | | - width: 16em; |
| 111 | + width: 17em; |
| 112 | + height: 3.5em; |
98 | 113 | } |
99 | 114 | |
100 | 115 | .articleFeedback-label { |
Index: trunk/extensions/ArticleFeedback/modules/ext.articleFeedback-beta/ext.articleFeedback-beta.js |
— | — | @@ -12,68 +12,85 @@ |
13 | 13 | // Append HTML |
14 | 14 | .append( '\ |
15 | 15 | <div class="articleFeedback-tabs">\ |
16 | | - <div class="articleFeedback-tab articleFeedback-tab-current" rel="form">\ |
| 16 | + <div class="articleFeedback-tab articleFeedback-tab-form articleFeedback-tab-current" rel="form">\ |
17 | 17 | <div class="articleFeedback-buffer"><msg key="form-tab-label" /></div>\ |
18 | 18 | </div>\ |
19 | | - <div class="articleFeedback-tab" rel="report">\ |
| 19 | + <div class="articleFeedback-tab articleFeedback-tab-report " rel="report">\ |
20 | 20 | <div class="articleFeedback-buffer"><msg key="report-tab-label" /></div>\ |
21 | 21 | </div>\ |
22 | 22 | </div>\ |
23 | | -<div class="articleFeedback-panel" rel="form">\ |
| 23 | +<div class="articleFeedback-panel">\ |
24 | 24 | <div class="articleFeedback-buffer">\ |
25 | | - <div class="articleFeedback-title"><msg key="form-panel-title" /></div>\ |
26 | | - <div class="articleFeedback-instructions"><msg key="form-panel-instructions" /></div>\ |
| 25 | + <div class="articleFeedback-title articleFeedback-form"><msg key="form-panel-title" /></div>\ |
| 26 | + <div class="articleFeedback-title articleFeedback-report"><msg key="report-panel-title" /></div>\ |
| 27 | + <div class="articleFeedback-instructions articleFeedback-form"><msg key="form-panel-instructions" /></div>\ |
| 28 | + <div class="articleFeedback-description articleFeedback-report"><msg key="report-panel-description" /></div>\ |
27 | 29 | <div style="clear:both;"></div>\ |
28 | 30 | <div class="articleFeedback-ratings">\ |
29 | 31 | <div class="articleFeedback-rating" rel="wellsourced">\ |
30 | 32 | <span class="articleFeedback-label" title-msg="field-wellsourced-tip"><msg key="field-wellsourced-label" /></span>\ |
31 | | - <div class="articleFeedback-rating-fields"><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /></div>\ |
32 | | - <div class="articleFeedback-rating-labels"><label></label><label></label><label></label><label></label><label></label></div>\ |
| 33 | + <div class="articleFeedback-rating-fields articleFeedback-form"><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /></div>\ |
| 34 | + <div class="articleFeedback-rating-labels articleFeedback-form"><label></label><label></label><label></label><label></label><label></label></div>\ |
33 | 35 | </div>\ |
34 | 36 | <div class="articleFeedback-rating" rel="neutral">\ |
35 | 37 | <span class="articleFeedback-label" title-msg="field-neutral-tip"><msg key="field-neutral-label" /></span>\ |
36 | | - <div class="articleFeedback-rating-fields"><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /></div>\ |
37 | | - <div class="articleFeedback-rating-labels"><label></label><label></label><label></label><label></label><label></label></div>\ |
| 38 | + <div class="articleFeedback-rating-fields articleFeedback-form"><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /></div>\ |
| 39 | + <div class="articleFeedback-rating-labels articleFeedback-form"><label></label><label></label><label></label><label></label><label></label></div>\ |
38 | 40 | </div>\ |
39 | 41 | <div class="articleFeedback-rating" rel="complete">\ |
40 | 42 | <span class="articleFeedback-label" title-msg="field-complete-tip"><msg key="field-complete-label" /></span>\ |
41 | | - <div class="articleFeedback-rating-fields"><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /></div>\ |
42 | | - <div class="articleFeedback-rating-labels"><label></label><label></label><label></label><label></label><label></label></div>\ |
| 43 | + <div class="articleFeedback-rating-fields articleFeedback-form"><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /></div>\ |
| 44 | + <div class="articleFeedback-rating-labels articleFeedback-form"><label></label><label></label><label></label><label></label><label></label></div>\ |
43 | 45 | </div>\ |
44 | 46 | <div class="articleFeedback-rating" rel="readable">\ |
45 | 47 | <span class="articleFeedback-label" title-msg="field-readable-tip"><msg key="field-readable-label" /></span>\ |
46 | | - <div class="articleFeedback-rating-fields"><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /></div>\ |
47 | | - <div class="articleFeedback-rating-labels"><label></label><label></label><label></label><label></label><label></label></div>\ |
| 48 | + <div class="articleFeedback-rating-fields articleFeedback-form"><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /><input type="radio" /></div>\ |
| 49 | + <div class="articleFeedback-rating-labels articleFeedback-form"><label></label><label></label><label></label><label></label><label></label></div>\ |
48 | 50 | </div>\ |
49 | 51 | <div style="clear:both;"></div>\ |
50 | 52 | </div>\ |
51 | 53 | </div>\ |
52 | 54 | </div>\ |
53 | | -<div class="articleFeedback-panel" rel="report">\ |
| 55 | +<div class="articleFeedback-dialog" rel="survey">\ |
54 | 56 | <div class="articleFeedback-buffer">\ |
55 | | - <div class="articleFeedback-title"><msg key="report-panel-title" /></div>\ |
| 57 | + <div class="articleFeedback-title">Take a survey?</div>\ |
56 | 58 | </div>\ |
57 | 59 | </div>\ |
| 60 | +<div class="articleFeedback-dialog" rel="register">\ |
| 61 | + <div class="articleFeedback-buffer">\ |
| 62 | + <div class="articleFeedback-title">Create an account?</div>\ |
| 63 | + </div>\ |
| 64 | +</div>\ |
| 65 | +<div class="articleFeedback-dialog" rel="edit">\ |
| 66 | + <div class="articleFeedback-buffer">\ |
| 67 | + <div class="articleFeedback-title">Edit a page?</div>\ |
| 68 | + </div>\ |
| 69 | +</div>\ |
58 | 70 | ' ) |
59 | 71 | .localize( { 'prefix': 'articlefeedback-beta-' } ) |
60 | 72 | .find( '[title]' ) |
61 | 73 | .tipsy( { 'gravity': 'sw', 'fade': true } ) |
62 | 74 | .end() |
| 75 | + // Hide report elements initially |
| 76 | + .find( '.articleFeedback-report' ) |
| 77 | + .hide() |
| 78 | + .end() |
63 | 79 | // Setup tab behavior |
64 | 80 | .find( '.articleFeedback-tab' ) |
65 | 81 | .click( function( e ) { |
| 82 | + $(this).addClass( 'articleFeedback-tab-current' ); |
66 | 83 | context.$ui |
67 | | - .find( '.articleFeedback-panel[rel!=' + $(this).attr( 'rel' ) +']' ) |
68 | | - .hide() |
69 | | - .end() |
70 | | - .find( '.articleFeedback-panel[rel=' + $(this).attr( 'rel' ) +']' ) |
| 84 | + .find( '.articleFeedback-' + $(this).attr( 'rel' ) ) |
71 | 85 | .show() |
72 | 86 | .end() |
73 | | - .find( '.articleFeedback-tab[rel=' + $(this).attr( 'rel' ) +']' ) |
74 | | - .addClass( 'articleFeedback-tab-current' ) |
75 | | - .end() |
76 | | - .find( '.articleFeedback-tab[rel!=' + $(this).attr( 'rel' ) +']' ) |
77 | | - .removeClass( 'articleFeedback-tab-current' ); |
| 87 | + .find( '.articleFeedback-tab' ) |
| 88 | + .not( $(this) ) |
| 89 | + .each( function() { |
| 90 | + $(this).removeClass( 'articleFeedback-tab-current' ); |
| 91 | + context.$ui |
| 92 | + .find( '.articleFeedback-' + $(this).attr( 'rel' ) ) |
| 93 | + .hide(); |
| 94 | + } ); |
78 | 95 | e.preventDefault(); |
79 | 96 | return false; |
80 | 97 | } ); |
Index: trunk/extensions/ArticleFeedback/ArticleFeedback.i18n.php |
— | — | @@ -55,6 +55,7 @@ |
56 | 56 | 'articlefeedback-beta-form-panel-submit' => 'Submit feedback', |
57 | 57 | 'articlefeedback-beta-report-tab-label' => 'Show results', |
58 | 58 | 'articlefeedback-beta-report-panel-title' => 'Feedback results', |
| 59 | + 'articlefeedback-beta-report-panel-description' => 'Current average ratings.', |
59 | 60 | 'articlefeedback-beta-field-wellsourced-label' => 'Well-sourced', |
60 | 61 | 'articlefeedback-beta-field-wellsourced-tip' => 'Do you feel this page has sufficient citations and that those citations come from trustworthy sources?', |
61 | 62 | 'articlefeedback-beta-field-complete-label' => 'Complete', |