Index: trunk/extensions/MoodBar/MoodBar.i18n.php |
— | — | @@ -15,16 +15,17 @@ |
16 | 16 | $messages['en'] = array( |
17 | 17 | 'moodbar-desc' => 'Allows specified users to send their "mood" back to the site operator', |
18 | 18 | // Portlet link |
19 | | - 'moodbar-trigger-using' => 'Editing $1...', |
20 | 19 | 'moodbar-trigger-feedback' => 'Feedback about editing', |
21 | 20 | 'moodbar-trigger-share' => 'Share your experience', |
22 | | - 'tooltip-p-moodbar-trigger-using' => '', |
| 21 | + 'moodbar-trigger-editing' => 'Editing $1...', |
23 | 22 | 'tooltip-p-moodbar-trigger-feedback' => '', |
24 | 23 | 'tooltip-p-moodbar-trigger-share' => '', |
| 24 | + 'tooltip-p-moodbar-trigger-editing' => '', |
25 | 25 | // Overlay |
26 | 26 | 'moodbar-close' => '(close)', |
27 | | - 'moodbar-intro-using' => 'Editing $1 made me...', |
28 | | - 'moodbar-intro-feedback' => 'Feedback:', |
| 27 | + 'moodbar-intro-feedback' => 'Editing $1 made me... ', |
| 28 | + 'moodbar-intro-share' => 'My experience on $1 made me...', |
| 29 | + 'moodbar-intro-editing' => 'Editing $1 made me...', |
29 | 30 | 'moodbar-type-happy-title' => 'Happy', |
30 | 31 | 'moodbar-type-sad-title' => 'Sad', |
31 | 32 | 'moodbar-type-confused-title' => 'Confused', |
— | — | @@ -88,9 +89,9 @@ |
89 | 90 | |
90 | 91 | $messages['qqq'] = array( |
91 | 92 | 'moodbar-desc' => 'This is a feature in development. See [[mw:MoodBar 0.1/Design]] for background information.', |
92 | | - 'moodbar-trigger-using' => "Link text of the MoodBar overlay trigger. \$1 is the SITENAME. The implied sentence is ''\"Using [Sitename] made me happy/sad/...\"''. See [[mw:MoodBar 0.1/Design]] for background development information.", |
| 93 | + 'moodbar-trigger-editing' => "Link text of the MoodBar overlay trigger. \$1 is the SITENAME. The implied sentence is ''\"Using [Sitename] made me happy/sad/...\"''. See [[mw:MoodBar 0.1/Design]] for background development information.", |
93 | 94 | 'moodbar-trigger-feedback' => 'Link text of the MoodBar overlay trigger. $1 is the SITENAME.', |
94 | | - 'moodbar-intro-using' => 'Intro title of the MoodBar overlay trigger. $1 is the SITENAME.', |
| 95 | + 'moodbar-intro-editing' => 'Intro title of the MoodBar overlay trigger. $1 is the SITENAME.', |
95 | 96 | 'moodbar-intro-feedback' => 'Intro title of the MoodBar overlay trigger. $1 is the SITENAME.', |
96 | 97 | 'moodbar-close' => 'Link text of the close-button. Make sure to include parentheses. |
97 | 98 | |
— | — | @@ -119,13 +120,13 @@ |
120 | 121 | $messages['qqq'] = array( |
121 | 122 | 'moodbar-desc' => '{{desc}} |
122 | 123 | This is a feature in development. See [[mw:MoodBar 0.1/Design]] for background information.', |
123 | | - 'moodbar-trigger-using' => "Link text of the MoodBar overlay trigger. \$1 is the SITENAME. The implied sentence is ''\"Using [Sitename] made me happy/sad/...\"''. See [[mw:MoodBar 0.1/Design]] for background development information.", |
| 124 | + 'moodbar-trigger-editing' => "Link text of the MoodBar overlay trigger. \$1 is the SITENAME. The implied sentence is ''\"Using [Sitename] made me happy/sad/...\"''. See [[mw:MoodBar 0.1/Design]] for background development information.", |
124 | 125 | 'moodbar-trigger-feedback' => 'Link text of the MoodBar overlay trigger. $1 is the SITENAME.', |
125 | 126 | 'moodbar-close' => 'Link text of the close-button. Make sure to include parentheses. |
126 | 127 | |
127 | 128 | See also: |
128 | 129 | * {{msg|parentheses}}', |
129 | | - 'moodbar-intro-using' => '[[File:MoodBar-Step-1.png|right|200px]] |
| 130 | + 'moodbar-intro-editing' => '[[File:MoodBar-Step-1.png|right|200px]] |
130 | 131 | Intro title of the MoodBar overlay trigger. $1 is the SITENAME.', |
131 | 132 | 'moodbar-intro-feedback' => 'Intro title of the MoodBar overlay trigger. $1 is the SITENAME.', |
132 | 133 | 'tooltip-moodbar-what' => 'Tooltip displayed when hovering the What-link. |
— | — | @@ -150,7 +151,7 @@ |
151 | 152 | */ |
152 | 153 | $messages['be-tarask'] = array( |
153 | 154 | 'moodbar-desc' => 'Дазваляе вызначаным удзельнікам дасылаць іх «настрой» апэратару сайта', |
154 | | - 'moodbar-trigger-using' => 'Выкарыстоўваючы $1…', |
| 155 | + 'moodbar-trigger-editing' => 'Выкарыстоўваючы $1…', |
155 | 156 | 'moodbar-trigger-feedback' => 'Водгук', |
156 | 157 | ); |
157 | 158 | |
— | — | @@ -160,11 +161,11 @@ |
161 | 162 | */ |
162 | 163 | $messages['de'] = array( |
163 | 164 | 'moodbar-desc' => 'Ermöglicht es Benutzern dem Betreiber des Wikis ihre Stimmung bezüglich des Bearbeitens von Seiten mitzuteilen', |
164 | | - 'moodbar-trigger-using' => 'Bearbeite $1 …', |
| 165 | + 'moodbar-trigger-editing' => 'Bearbeite $1 …', |
165 | 166 | 'moodbar-trigger-feedback' => 'Rückmeldung zum Bearbeiten', |
166 | 167 | 'moodbar-trigger-share' => 'Teile uns deinen Eindruck mit', |
167 | 168 | 'moodbar-close' => '(schließen)', |
168 | | - 'moodbar-intro-using' => '$1 zu bearbeiten macht mich …', |
| 169 | + 'moodbar-intro-editing' => '$1 zu bearbeiten macht mich …', |
169 | 170 | 'moodbar-intro-feedback' => 'Rückmeldung:', |
170 | 171 | 'moodbar-type-happy-title' => 'Glücklich', |
171 | 172 | 'moodbar-type-sad-title' => 'Traurig', |
— | — | @@ -264,7 +265,7 @@ |
265 | 266 | */ |
266 | 267 | $messages['gl'] = array( |
267 | 268 | 'moodbar-desc' => 'Permite que os usuarios especificados envíen ao operador do sitio o seu "humor"', |
268 | | - 'moodbar-trigger-using' => 'Usando $1...', |
| 269 | + 'moodbar-trigger-editing' => 'Usando $1...', |
269 | 270 | 'moodbar-trigger-feedback' => 'Comentarios', |
270 | 271 | ); |
271 | 272 | |
— | — | @@ -273,10 +274,10 @@ |
274 | 275 | */ |
275 | 276 | $messages['he'] = array( |
276 | 277 | 'moodbar-desc' => 'מתן אפשרות למשתמשם לשלוח את "מצב הרוח" שלהם למפעיל האתר', |
277 | | - 'moodbar-trigger-using' => 'עריכה $1...', |
| 278 | + 'moodbar-trigger-editing' => 'עריכה $1...', |
278 | 279 | 'moodbar-trigger-feedback' => 'משוב על עריכה', |
279 | 280 | 'moodbar-close' => '(סגירה)', |
280 | | - 'moodbar-intro-using' => 'עריכת $1 גרמה לי ...', |
| 281 | + 'moodbar-intro-editing' => 'עריכת $1 גרמה לי ...', |
281 | 282 | 'moodbar-intro-feedback' => 'משוב:', |
282 | 283 | 'moodbar-type-happy-title' => 'שמחה', |
283 | 284 | 'moodbar-type-sad-title' => 'עצב', |
— | — | @@ -306,11 +307,11 @@ |
307 | 308 | */ |
308 | 309 | $messages['ia'] = array( |
309 | 310 | 'moodbar-desc' => 'Permitte al usatores specificate de inviar lor "humor" retro al operator del sito', |
310 | | - 'moodbar-trigger-using' => 'Modificar $1...', |
| 311 | + 'moodbar-trigger-editing' => 'Modificar $1...', |
311 | 312 | 'moodbar-trigger-feedback' => 'Commentos super le modification', |
312 | 313 | 'moodbar-trigger-share' => 'Divider tu experientia', |
313 | 314 | 'moodbar-close' => '(clauder)', |
314 | | - 'moodbar-intro-using' => 'Le uso de $1 me rendeva...', |
| 315 | + 'moodbar-intro-editing' => 'Le uso de $1 me rendeva...', |
315 | 316 | 'moodbar-intro-feedback' => 'Reaction:', |
316 | 317 | 'moodbar-type-happy-title' => 'Felice', |
317 | 318 | 'moodbar-type-sad-title' => 'Triste', |
— | — | @@ -376,7 +377,7 @@ |
377 | 378 | */ |
378 | 379 | $messages['lb'] = array( |
379 | 380 | 'moodbar-desc' => 'Erméiglecht et spezifesche Benotzer fir dem Responsabele vum Site hir Stëmmung ze schécken', |
380 | | - 'moodbar-trigger-using' => 'Ännert $1...', |
| 381 | + 'moodbar-trigger-editing' => 'Ännert $1...', |
381 | 382 | 'moodbar-trigger-feedback' => "Feedback iwwert d'Änneren", |
382 | 383 | 'moodbar-close' => '(zoumaachen)', |
383 | 384 | 'moodbar-intro-feedback' => 'Feedback:', |
— | — | @@ -412,11 +413,11 @@ |
413 | 414 | */ |
414 | 415 | $messages['mk'] = array( |
415 | 416 | 'moodbar-desc' => 'Им овозможува на одредени корисници да му го соопштуваат нивното „расположение“ на операторот на мрежното место', |
416 | | - 'moodbar-trigger-using' => 'Уредување на $1...', |
| 417 | + 'moodbar-trigger-editing' => 'Уредување на $1...', |
417 | 418 | 'moodbar-trigger-feedback' => 'Мислења за уредувањето', |
418 | 419 | 'moodbar-trigger-share' => 'Споделете го вашето искуство', |
419 | 420 | 'moodbar-close' => '(затвори)', |
420 | | - 'moodbar-intro-using' => 'Уредувањето на $1 ме...', |
| 421 | + 'moodbar-intro-editing' => 'Уредувањето на $1 ме...', |
421 | 422 | 'moodbar-intro-feedback' => 'Мислења', |
422 | 423 | 'moodbar-type-happy-title' => 'усреќи', |
423 | 424 | 'moodbar-type-sad-title' => 'натажи', |
— | — | @@ -472,11 +473,11 @@ |
473 | 474 | */ |
474 | 475 | $messages['nl'] = array( |
475 | 476 | 'moodbar-desc' => 'Laat bepaalde gebruikers toe hun "gemoedstoestand" naar de sitebeheerders te verzenden', |
476 | | - 'moodbar-trigger-using' => 'Het bewerken van $1...', |
| 477 | + 'moodbar-trigger-editing' => 'Het bewerken van $1...', |
477 | 478 | 'moodbar-trigger-feedback' => 'Terugkoppeling over het bewerken', |
478 | 479 | 'moodbar-trigger-share' => 'Deel uw ervaring', |
479 | 480 | 'moodbar-close' => '(sluiten)', |
480 | | - 'moodbar-intro-using' => 'Het gebruiken van $1 maakte mij...', |
| 481 | + 'moodbar-intro-editing' => 'Het gebruiken van $1 maakte mij...', |
481 | 482 | 'moodbar-intro-feedback' => 'Terugkoppeling:', |
482 | 483 | 'moodbar-type-happy-title' => 'Blij', |
483 | 484 | 'moodbar-type-sad-title' => 'Triest', |
— | — | @@ -524,11 +525,11 @@ |
525 | 526 | */ |
526 | 527 | $messages['pt'] = array( |
527 | 528 | 'moodbar-desc' => 'Permite que os utilizadores especificados enviem ao operador do site uma indicação do seu estado de espírito', |
528 | | - 'moodbar-trigger-using' => 'A editar $1...', |
| 529 | + 'moodbar-trigger-editing' => 'A editar $1...', |
529 | 530 | 'moodbar-trigger-feedback' => 'Comentários sobre edição', |
530 | 531 | 'moodbar-trigger-share' => 'Partilhe a sua experiência', |
531 | 532 | 'moodbar-close' => '(fechar)', |
532 | | - 'moodbar-intro-using' => 'Usar a $1 tornou-me...', |
| 533 | + 'moodbar-intro-editing' => 'Usar a $1 tornou-me...', |
533 | 534 | 'moodbar-intro-feedback' => 'Comentários:', |
534 | 535 | 'moodbar-type-happy-title' => 'Feliz', |
535 | 536 | 'moodbar-type-sad-title' => 'Triste', |
Index: trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.css |
— | — | @@ -51,18 +51,6 @@ |
52 | 52 | font-size: 12px; |
53 | 53 | } |
54 | 54 | |
55 | | -.mw-moodBar-overlayWhat > a:hover { |
56 | | - text-decoration: none !important; |
57 | | -} |
58 | | - |
59 | | -a:hover .mw-moodBar-overlayWhatLabel { |
60 | | - text-decoration: underline; |
61 | | -} |
62 | | - |
63 | | -.mw-moodBar-overlayWhatTrigger { |
64 | | - text-decoration: none; |
65 | | -} |
66 | | - |
67 | 55 | .mw-moodBar-form, |
68 | 56 | .mw-moodBar-overlayWhatContent { |
69 | 57 | display: none; |
Index: trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.js |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | <div class="mw-moodBar-overlayContent"></div>\ |
17 | 17 | </div></div>', |
18 | 18 | userinput: '\ |
19 | | - <div class="mw-moodBar-overlayTitle"><html:msg key="moodbar-intro-using" /></div>\ |
| 19 | + <div class="mw-moodBar-overlayTitle"><html:msg key="INTROTITLE" /></div>\ |
20 | 20 | <div class="mw-moodBar-types"></div>\ |
21 | 21 | <div class="mw-moodBar-form">\ |
22 | 22 | <div class="mw-moodBar-formTitle">\ |
— | — | @@ -59,7 +59,8 @@ |
60 | 60 | event: { |
61 | 61 | trigger: function( e ) { |
62 | 62 | e.preventDefault(); |
63 | | - if ( !mb.ui.overlay.is( ':visible' ) ) { |
| 63 | + if ( mb.ui.overlay.is( ':hidden' ) ) { |
| 64 | + mb.swapContent( mb.tpl.userinput ); |
64 | 65 | mb.ui.overlay.show(); |
65 | 66 | } else { |
66 | 67 | mb.ui.overlay.hide(); |
— | — | @@ -94,22 +95,8 @@ |
95 | 96 | } |
96 | 97 | }, |
97 | 98 | |
98 | | - core: function() { |
99 | | - var msgOptions = { params: {} }; |
100 | | - msgOptions.params['moodbar-intro-using'] = [mw.config.get( 'wgSiteName' )]; |
101 | | - |
102 | | - // Create overlay |
103 | | - mb.ui.overlay = $( mb.tpl.overlayBase ) |
104 | | - // Fill content with user input screen |
105 | | - .find( '.mw-moodBar-overlayContent' ) |
106 | | - .html( mb.tpl.userinput ) |
107 | | - .end() |
108 | | - // Handle all html:msgs |
109 | | - .localize( msgOptions ) |
110 | | - // Bind close-toggle |
111 | | - .find( '.mw-moodBar-overlayClose' ) |
112 | | - .click( mb.event.trigger ) |
113 | | - .end() |
| 99 | + prepareUserinputContent: function( overlay ) { |
| 100 | + overlay |
114 | 101 | // Populate type selector |
115 | 102 | .find( '.mw-moodBar-types' ) |
116 | 103 | .append( function() { |
— | — | @@ -166,7 +153,7 @@ |
167 | 154 | .find( '.mw-moodBar-overlayWhatContent' ) |
168 | 155 | .html( |
169 | 156 | function() { |
170 | | - var message, linkMessage, link, |
| 157 | + var message, linkMessage, link, |
171 | 158 | disableMsg, disableLink, out; |
172 | 159 | |
173 | 160 | message = mw.msg( 'moodbar-what-content' ); |
— | — | @@ -225,7 +212,19 @@ |
226 | 213 | $.moodBar.submit( mb.feedbackItem ); |
227 | 214 | } ) |
228 | 215 | .end(); |
| 216 | + }, |
229 | 217 | |
| 218 | + core: function() { |
| 219 | + |
| 220 | + // Create overlay |
| 221 | + mb.ui.overlay = $( mb.tpl.overlayBase ) |
| 222 | + .localize() |
| 223 | + // Bind close-toggle |
| 224 | + .find( '.mw-moodBar-overlayClose' ) |
| 225 | + .click( mb.event.trigger ) |
| 226 | + .end(); |
| 227 | + mb.swapContent( mb.tpl.userinput ); |
| 228 | + |
230 | 229 | mb.ui.overlay |
231 | 230 | // Inject overlay |
232 | 231 | .appendTo( 'body' ) |
— | — | @@ -237,11 +236,25 @@ |
238 | 237 | // Bind triger |
239 | 238 | mb.ui.trigger.click( mb.event.trigger ); |
240 | 239 | }, |
| 240 | + |
241 | 241 | swapContent: function( tpl ) { |
| 242 | + var msgOptions = { |
| 243 | + keys: { |
| 244 | + INTROTITLE: 'moodbar-intro-' + mb.conf.bucketKey |
| 245 | + }, |
| 246 | + params: { |
| 247 | + INTROTITLE: [mw.config.get( 'wgSiteName' )] |
| 248 | + } |
| 249 | + }; |
| 250 | + |
242 | 251 | mb.ui.overlay |
243 | 252 | .find( '.mw-moodBar-overlayContent' ) |
244 | 253 | .html( tpl ) |
245 | | - .localize(); |
| 254 | + .localize( msgOptions ); |
| 255 | + |
| 256 | + if ( tpl == mb.tpl.userinput ) { |
| 257 | + mb.prepareUserinputContent( mb.ui.overlay ); |
| 258 | + } |
246 | 259 | return true; |
247 | 260 | } |
248 | 261 | } ); |
Index: trunk/extensions/MoodBar/MoodBar.php |
— | — | @@ -34,7 +34,6 @@ |
35 | 35 | |
36 | 36 | // User rights |
37 | 37 | $wgAvailableRights[] = 'moodbar-view'; |
38 | | -$wgGroupPermissions['moodbar']['moodbar-view'] = true; |
39 | 38 | |
40 | 39 | // Internationalisation |
41 | 40 | $wgExtensionMessagesFiles['MoodBar'] = dirname(__FILE__).'/MoodBar.i18n.php'; |
— | — | @@ -45,18 +44,16 @@ |
46 | 45 | 'remoteExtPath' => 'MoodBar/modules' |
47 | 46 | ); |
48 | 47 | |
49 | | -$oldVersion = version_compare( $wgVersion, '1.17', '<=' ); |
50 | | - |
51 | 48 | $wgResourceModules['ext.moodBar.init'] = $mbResourceTemplate + array( |
52 | 49 | 'styles' => 'ext.moodBar/ext.moodBar.init.css', |
53 | 50 | 'scripts' => 'ext.moodBar/ext.moodBar.init.js', |
54 | 51 | 'messages' => array( |
55 | | - 'moodbar-trigger-using', |
56 | 52 | 'moodbar-trigger-feedback', |
57 | 53 | 'moodbar-trigger-share', |
| 54 | + 'moodbar-trigger-editing', |
58 | 55 | 'tooltip-p-moodbar-trigger-feedback', |
59 | | - 'tooltip-p-moodbar-trigger-using', |
60 | 56 | 'tooltip-p-moodbar-trigger-share', |
| 57 | + 'tooltip-p-moodbar-trigger-editing', |
61 | 58 | ), |
62 | 59 | 'position' => 'top', |
63 | 60 | 'dependencies' => array( |
— | — | @@ -65,6 +62,8 @@ |
66 | 63 | ), |
67 | 64 | ); |
68 | 65 | |
| 66 | +$oldVersion = version_compare( $wgVersion, '1.17', '<=' ); |
| 67 | + |
69 | 68 | if ( !$oldVersion ) { |
70 | 69 | $wgResourceModules['ext.moodBar.init']['dependencies'][] = 'mediawiki.user'; |
71 | 70 | } |
— | — | @@ -74,8 +73,9 @@ |
75 | 74 | 'scripts' => 'ext.moodBar/ext.moodBar.core.js', |
76 | 75 | 'messages' => array( |
77 | 76 | 'moodbar-close', |
78 | | - 'moodbar-intro-using', |
79 | 77 | 'moodbar-intro-feedback', |
| 78 | + 'moodbar-intro-share', |
| 79 | + 'moodbar-intro-editing', |
80 | 80 | 'moodbar-type-happy-title', |
81 | 81 | 'moodbar-type-sad-title', |
82 | 82 | 'moodbar-type-confused-title', |
— | — | @@ -131,10 +131,10 @@ |
132 | 132 | 'buckets' => |
133 | 133 | array( |
134 | 134 | 'feedback' => 80, |
135 | | - 'using' => 10, |
136 | 135 | 'share' => 10, |
| 136 | + 'editing' => 10, |
137 | 137 | ), |
138 | | - 'version' => 2, |
| 138 | + 'version' => 3, |
139 | 139 | 'expires' => 30, |
140 | 140 | ), |
141 | 141 | 'infoUrl' => 'http://www.mediawiki.org/wiki/MoodBar', |