Index: trunk/extensions/MoodBar/MoodBar.i18n.php |
— | — | @@ -30,8 +30,8 @@ |
31 | 31 | 'tooltip-moodbar-what' => 'Learn more about this feature', |
32 | 32 | 'moodbar-what-target' => 'http://www.mediawiki.org/wiki/MoodBar', |
33 | 33 | 'moodbar-what-label' => 'What is this?', |
34 | | - 'moodbar-what-expanded' => '▶', // Ignore, do not translate. ▼ |
35 | | - 'moodbar-what-collapsed' => '▼', // Ignore, do not translate. ▶ |
| 34 | + 'moodbar-what-collapsed' => '▶', // Ignore, do not translate. ▼ |
| 35 | + 'moodbar-what-expanded' => '▼', // Ignore, do not translate. ▶ |
36 | 36 | 'moodbar-what-content' => 'This feature is designed to help the Wikipedia community understand the experience of people editing Wikipedia. |
37 | 37 | For more information, please visit the $1.', |
38 | 38 | 'moodbar-what-link' => 'feature page', |
— | — | @@ -40,6 +40,8 @@ |
41 | 41 | 'moodbar-form-note' => '140 character maximum', |
42 | 42 | 'moodbar-form-note-dynamic' => '$1 characters remaining', |
43 | 43 | 'moodbar-form-submit' => 'Send Feedback ▶', |
| 44 | + 'moodbar-form-policy-text' => 'By submitting, $1', |
| 45 | + 'moodbar-form-policy-label' => 'our policy', |
44 | 46 | // Special:MoodBar |
45 | 47 | 'right-moodbar-view' => 'View and export MoodBar feedback', |
46 | 48 | 'moodbar-admin-title' => 'MoodBar feedback', |
— | — | @@ -91,6 +93,14 @@ |
92 | 94 | * {{msg|moodbar-what-label}}', |
93 | 95 | 'moodbar-what-target' => 'Complete URL (including http://) or article name where more info can be found.', |
94 | 96 | 'moodbar-what-label' => 'Link text for the page where more info abut MoodBar can be found.', |
| 97 | + 'moodbar-form-policy-text' => 'Text displayed below the input area. |
| 98 | + |
| 99 | +See also: |
| 100 | +* {{msg|moodbar-form-policy-label}}', |
| 101 | + 'moodbar-form-policy-label' => 'Label text for the link to the privacy policy,. |
| 102 | + |
| 103 | +See also: |
| 104 | +* {{msg|moodbar-form-policy-text}}', |
95 | 105 | ); |
96 | 106 | |
97 | 107 | /** Message documentation (Message documentation) |
Index: trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.css |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | /* Overlay styling */ |
3 | | -#mw-moodBar-overlay { |
| 3 | +#mw-moodBar-overlayWrap { |
4 | 4 | position: absolute; |
5 | 5 | top: 4em; |
6 | 6 | left: 10.2em; |
— | — | @@ -8,11 +8,14 @@ |
9 | 9 | background: #fafafa; |
10 | 10 | border: 1px solid #0645ad; |
11 | 11 | border-radius: 40px; |
12 | | - padding: 22px 22px; |
13 | 12 | box-shadow: 7px 7px 15px rgba(0, 0, 0, 0.5); |
14 | 13 | display: none; |
15 | 14 | } |
16 | 15 | |
| 16 | +#mw-moodBar-overlay { |
| 17 | + margin: 22px 22px; |
| 18 | +} |
| 19 | + |
17 | 20 | .mw-moodBar-overlayTitle { |
18 | 21 | font-weight: bold; |
19 | 22 | white-space: nowrap; |
— | — | @@ -60,6 +63,7 @@ |
61 | 64 | |
62 | 65 | .mw-moodBar-formInput { |
63 | 66 | width: 100%; |
| 67 | + outline: none; |
64 | 68 | } |
65 | 69 | |
66 | 70 | .mw-moodBar-formSubmit { |
Index: trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.js |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | |
12 | 12 | tpl: { |
13 | 13 | overlay: '\ |
14 | | - <div id="mw-moodBar-overlay">\ |
| 14 | + <div id="mw-moodBar-overlayWrap"><div id="mw-moodBar-overlay">\ |
15 | 15 | <span class="mw-moodBar-overlayClose"><a href="#"><html:msg key="moodbar-close" /></a></span>\ |
16 | 16 | <div class="mw-moodBar-overlayTitle"><html:msg key="moodbar-intro-using" /></div>\ |
17 | 17 | <div class="mw-moodBar-types"></div>\ |
— | — | @@ -19,8 +19,9 @@ |
20 | 20 | <span class="mw-moodBar-formNote"><html:msg key="moodbar-form-note" /></span>\ |
21 | 21 | <html:msg key="moodbar-form-title" />\ |
22 | 22 | </div>\ |
23 | | - <input type="text" maxlength="140" class="mw-moodBar-formInput" />\ |
| 23 | + <textarea maxlength="140" class="mw-moodBar-formInput" /></textarea>\ |
24 | 24 | <input type="button" class="mw-moodBar-formSubmit" />\ |
| 25 | + \ |
25 | 26 | </div>\ |
26 | 27 | <span class="mw-moodBar-overlayWhat">\ |
27 | 28 | <a title-msg="tooltip-moodbar-what">\ |
— | — | @@ -29,7 +30,7 @@ |
30 | 31 | </a>\ |
31 | 32 | <div class="mw-moodBar-overlayWhatContent"></div>\ |
32 | 33 | </span>\ |
33 | | - </div>', |
| 34 | + </div></div>', |
34 | 35 | type: '\ |
35 | 36 | <div class="mw-moodBar-type mw-moodBar-type-$1" rel="$1">\ |
36 | 37 | <span class="mw-moodBar-typeTitle"><html:msg key="moodbar-type-$1-title" /></span>\ |
— | — | @@ -56,7 +57,7 @@ |
57 | 58 | alert(1); |
58 | 59 | } else { |
59 | 60 | alert(0); |
60 | | - } |
| 61 | + } |
61 | 62 | } |
62 | 63 | }, |
63 | 64 | |
— | — | @@ -93,7 +94,7 @@ |
94 | 95 | .removeClass( 'mw-moodBar-selected' ); |
95 | 96 | } ) |
96 | 97 | .get( 0 ) |
97 | | - ); |
| 98 | + ); |
98 | 99 | } ); |
99 | 100 | return elems; |
100 | 101 | } ) |
— | — | @@ -128,19 +129,15 @@ |
129 | 130 | .html( |
130 | 131 | function() { |
131 | 132 | var message, linkMessage, link; |
132 | | - |
133 | | - message = mw.message('moodbar-what-content'); |
134 | | - linkMessage = mw.msg('moodbar-what-link'); |
135 | | - link = mw.html.element('a', |
136 | | - { |
137 | | - 'href' : mb.conf.infoUrl, |
138 | | - 'title' : linkMessage |
| 133 | + |
| 134 | + message = mw.message( 'moodbar-what-content' ); |
| 135 | + linkMessage = mw.msg( 'moodbar-what-link' ); |
| 136 | + link = mw.html.element( 'a', { |
| 137 | + 'href': mb.conf.infoUrl, |
| 138 | + 'title': linkMessage |
139 | 139 | }, linkMessage ); |
140 | | - |
141 | | - message = message.escaped(); |
142 | | - message = message.replace( /\$1/, link ); |
143 | | - |
144 | | - return message; |
| 140 | + |
| 141 | + return message.escaped().replace( /\$1/, link ); |
145 | 142 | } |
146 | 143 | ) |
147 | 144 | .end() |
— | — | @@ -148,15 +145,20 @@ |
149 | 146 | .find( '.mw-moodBar-formSubmit' ) |
150 | 147 | .val( mw.msg( 'moodbar-form-submit' ) ) |
151 | 148 | .click( function() { |
152 | | - |
| 149 | + mb.feedbackItem.comment = mb.ui.overlay.find( 'mw-moodBar-formInput' ).val(); |
153 | 150 | } ) |
154 | 151 | .end(); |
155 | 152 | |
156 | | - // Inject overlay |
157 | | - mb.ui.overlay.appendTo( 'body' ); |
| 153 | + mb.ui.overlay |
| 154 | + // Inject overlay |
| 155 | + .appendTo( 'body' ) |
| 156 | + // Fix the width after the icons and titles are localized and inserted |
| 157 | + .width( function( i, width ) { |
| 158 | + return width; |
| 159 | + } ); |
158 | 160 | |
159 | 161 | // Bind triger |
160 | | - mb.ui.trigger.click( mb.event.trigger ); |
| 162 | + mb.ui.trigger.click( mb.event.trigger ); |
161 | 163 | } |
162 | 164 | } ); |
163 | 165 | |
Index: trunk/extensions/MoodBar/MoodBar.php |
— | — | @@ -81,6 +81,8 @@ |
82 | 82 | 'moodbar-form-title', |
83 | 83 | 'moodbar-form-note', |
84 | 84 | 'moodbar-form-note-dynamic', |
| 85 | + 'moodbar-form-policy-text', |
| 86 | + 'moodbar-form-policy-label', |
85 | 87 | 'moodbar-form-submit', |
86 | 88 | ), |
87 | 89 | 'dependencies' => array( |