r106161 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106160‎ | r106161 | r106162 >
Date:01:47, 14 December 2011
Author:rmoen
Status:resolved (Comments)
Tags:
Comment:
add correct link, target blank, and title to moodbar terms anchor, add language support for new terms title & removed red border from feedback / response textboxes on negative remaining chars
Modified paths:
  • /trunk/extensions/MoodBar/MoodBar.i18n.php (modified) (history)
  • /trunk/extensions/MoodBar/MoodBar.php (modified) (history)
  • /trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js (modified) (history)
  • /trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/MoodBar.i18n.php
@@ -44,6 +44,7 @@
4545 'moodbar-what-link' => 'feature page',
4646 'moodbar-privacy' => 'By submitting, you agree to transparency under these $1.',
4747 'moodbar-privacy-link' => 'terms',
 48+ 'moodbar-privacy-link-title' => 'Terms of Use',
4849 'moodbar-disable-link' => "I'm not interested. Please disable this feature.",
4950 'moodbar-form-title' => 'Because...',
5051 'moodbar-form-note' => '140 character maximum',
@@ -222,6 +223,7 @@
223224
224225 See [[Thread:Support/About MediaWiki:Moodbar-privacy/en (2)/reply (4)|discussion]].',
225226 'moodbar-privacy-link' => 'This is the anchor text being used in the link replacing $1 in the message {{msg-mw|moodbar-privacy}}',
 227+ 'moodbar-privacy-link-title' => 'This is the title of the anchor link being used for the privacy message',
226228 'moodbar-form-note-dynamic' => 'Should support plural.',
227229 'moodbar-form-policy-text' => 'Text displayed below the input area.
228230
Index: trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.js
@@ -258,7 +258,8 @@
259259 linkMessage = mw.msg( 'moodbar-what-link' );
260260 link = mw.html.element( 'a', {
261261 'href': mb.conf.infoUrl,
262 - 'title': linkMessage
 262+ 'title': linkMessage,
 263+ 'target': '_blank'
263264 }, linkMessage );
264265
265266 out = mw.html.escape( message )
@@ -287,13 +288,15 @@
288289 .find( '.mw-moodBar-privacy' )
289290 .html(
290291 function() {
291 - var message, linkMessage, link;
 292+ var message, linkMessage, linkTitle, link;
292293
293294 message = mw.msg( 'moodbar-privacy' );
294295 linkMessage = mw.msg( 'moodbar-privacy-link' );
 296+ linkTitle = mw.msg( 'moodbar-privacy-link-title' );
295297 link = mw.html.element( 'a', {
296298 'href': mb.conf.privacyUrl,
297 - 'title': linkMessage
 299+ 'title': linkTitle,
 300+ 'target': '_blank'
298301 }, linkMessage );
299302
300303 return mw.html.escape( message )
@@ -348,7 +351,6 @@
349352 */
350353 on_negative: function( t_obj ) {
351354 $( t_obj )
352 - .addClass('mw-moodBar-feedback-invalid')
353355 .parent().prev()
354356 .find('.mw-moodBar-formNote')
355357 .addClass('red-bold');
@@ -359,7 +361,6 @@
360362 */
361363 on_positive: function( t_obj ) {
362364 $( t_obj )
363 - .removeClass( 'mw-moodBar-feedback-invalid')
364365 .parent().prev()
365366 .find('.mw-moodBar-formNote')
366367 .removeClass('red-bold');
Index: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js
@@ -470,7 +470,6 @@
471471 */
472472 on_negative: function( t_obj ) {
473473 $( t_obj )
474 - .addClass('fbd-response-text-invalid')
475474 .prev()
476475 .find('span')
477476 .addClass('red-bold');
@@ -481,7 +480,6 @@
482481 */
483482 on_positive: function( t_obj ) {
484483 $( t_obj )
485 - .removeClass( 'fbd-response-text-invalid')
486484 .prev()
487485 .find('span')
488486 .removeClass('red-bold');
Index: trunk/extensions/MoodBar/MoodBar.php
@@ -148,6 +148,7 @@
149149 'moodbar-form-submit',
150150 'moodbar-privacy',
151151 'moodbar-privacy-link',
 152+ 'moodbar-privacy-link-title',
152153 'moodbar-disable-link',
153154 'moodbar-loading-title',
154155 'moodbar-error-title',
@@ -250,6 +251,6 @@
251252 'expires' => 30,
252253 ),
253254 'infoUrl' => 'http://www.mediawiki.org/wiki/MoodBar',
254 - 'privacyUrl' => 'about:blank',
 255+ 'privacyUrl' => 'http://wikimediafoundation.org/wiki/Feedback_privacy_statement',
255256 'disableExpiration' => 365,
256257 );
\ No newline at end of file

Follow-up revisions

RevisionCommit summaryAuthorDate
r106222revert privacyUrl to blank for default as this is configured in LocalSettings...rmoen18:49, 14 December 2011

Comments

#Comment by P858snake (talk | contribs)   01:58, 14 December 2011
+	'privacyUrl' => '[http://wikimediafoundation.org/wiki/Feedback_privacy_statement', http://wikimediafoundation.org/wiki/Feedback_privacy_statement',]

Although this is a primarily a WMF extension, I'm not sure we should default that url to point to the foundation in the extension.

#Comment by Robmoen (talk | contribs)   17:12, 14 December 2011

I understand. Do you suggest I create another dreadful global variable and put it in the LocalSettings.php ?

#Comment by Robmoen (talk | contribs)   18:46, 14 December 2011

Ahh, it is in LocalSettings as a global. I'll follow up.

Status & tagging log