Index: trunk/extensions/MoodBar/MoodBar.i18n.php |
— | — | @@ -35,7 +35,9 @@ |
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', |
39 | | - 'moodbar-disable' => "I'm not interested. Please disable this feature.", |
| 39 | + 'moodbar-privacy' => 'By submitting, you agree that we may use your feedback as explained in $1.', |
| 40 | + 'moodbar-privacy-link' => 'our policy', |
| 41 | + 'moodbar-disable-link' => "I'm not interested. Please disable this feature.", |
40 | 42 | 'moodbar-form-title' => 'Because...', |
41 | 43 | 'moodbar-form-note' => '140 character maximum', |
42 | 44 | 'moodbar-form-note-dynamic' => '$1 characters remaining', |
Index: trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.css |
— | — | @@ -41,6 +41,7 @@ |
42 | 42 | } |
43 | 43 | |
44 | 44 | .mw-moodBar-typeTitle, |
| 45 | +.mw-moodBar-privacy, |
45 | 46 | .mw-moodBar-overlayWhat { |
46 | 47 | font-size: 12px; |
47 | 48 | } |
Index: trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.js |
— | — | @@ -20,6 +20,7 @@ |
21 | 21 | <html:msg key="moodbar-form-title" />\ |
22 | 22 | </div>\ |
23 | 23 | <textarea maxlength="140" class="mw-moodBar-formInput" /></textarea>\ |
| 24 | + <div class="mw-moodBar-privacy"></div>\ |
24 | 25 | <input type="button" class="mw-moodBar-formSubmit" />\ |
25 | 26 | \ |
26 | 27 | </div>\ |
— | — | @@ -133,7 +134,8 @@ |
134 | 135 | .find( '.mw-moodBar-overlayWhatContent' ) |
135 | 136 | .html( |
136 | 137 | function() { |
137 | | - var message, linkMessage, link; |
| 138 | + var message, linkMessage, link, |
| 139 | + disableMsg, disableLink, out; |
138 | 140 | |
139 | 141 | message = mw.message( 'moodbar-what-content' ); |
140 | 142 | linkMessage = mw.msg( 'moodbar-what-link' ); |
— | — | @@ -142,6 +144,40 @@ |
143 | 145 | 'title': linkMessage |
144 | 146 | }, linkMessage ); |
145 | 147 | |
| 148 | + out = message.escaped().replace( /\$1/, link ); |
| 149 | + out = mw.html.element( 'p', {}, |
| 150 | + new mw.html.Raw( out ) |
| 151 | + ); |
| 152 | + |
| 153 | + disableMsg = mw.msg( 'moodbar-disable-link' ) |
| 154 | + disableLink = mw.html.element( 'a', { |
| 155 | + 'href' : '#', |
| 156 | + 'class' : 'mw-moodBar-disable' |
| 157 | + }, disableMsg ); |
| 158 | + |
| 159 | + out += mw.html.element( 'p', {}, |
| 160 | + new mw.html.Raw( disableLink ) |
| 161 | + ); |
| 162 | + |
| 163 | + return out; |
| 164 | + } |
| 165 | + ) |
| 166 | + .find('.mw-moodBar-disable') |
| 167 | + .click( mb.event.disable ) |
| 168 | + .end() |
| 169 | + .end() |
| 170 | + .find( '.mw-moodBar-privacy' ) |
| 171 | + .html( |
| 172 | + function() { |
| 173 | + var message, linkMessage, link; |
| 174 | + |
| 175 | + message = mw.message( 'moodbar-privacy' ); |
| 176 | + linkMessage = mw.msg( 'moodbar-privacy-link' ); |
| 177 | + link = mw.html.element( 'a', { |
| 178 | + 'href': mb.conf.privacyUrl, |
| 179 | + 'title': linkMessage |
| 180 | + }, linkMessage ); |
| 181 | + |
146 | 182 | return message.escaped().replace( /\$1/, link ); |
147 | 183 | } |
148 | 184 | ) |
Index: trunk/extensions/MoodBar/MoodBar.php |
— | — | @@ -84,6 +84,9 @@ |
85 | 85 | 'moodbar-form-policy-text', |
86 | 86 | 'moodbar-form-policy-label', |
87 | 87 | 'moodbar-form-submit', |
| 88 | + 'moodbar-privacy', |
| 89 | + 'moodbar-privacy-link', |
| 90 | + 'moodbar-disable-link', |
88 | 91 | ), |
89 | 92 | 'dependencies' => array( |
90 | 93 | 'mediawiki.util', |
— | — | @@ -122,4 +125,5 @@ |
123 | 126 | 'expires' => 30, |
124 | 127 | ), |
125 | 128 | 'infoUrl' => 'http://www.mediawiki.org/wiki/MoodBar', |
| 129 | + 'privacyUrl' => 'about:blank', |
126 | 130 | ); |