r109244 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109243‎ | r109244 | r109245 >
Date:23:17, 17 January 2012
Author:rmoen
Status:ok
Tags:
Comment:
add to feedback dashboard on moodbar success template.
Modified paths:
  • /trunk/extensions/MoodBar/MoodBar.i18n.php (modified) (history)
  • /trunk/extensions/MoodBar/MoodBar.php (modified) (history)
  • /trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/MoodBar.i18n.php
@@ -50,6 +50,7 @@
5151 'moodbar-privacy' => 'By submitting, you agree to transparency under these $1.',
5252 'moodbar-privacy-link' => 'terms',
5353 'moodbar-privacy-link-title' => 'Terms of Use',
 54+ 'moodbar-fbd-link-title' => 'feedback',
5455 'moodbar-disable-link' => "I'm not interested. Please disable this feature.",
5556 'moodbar-form-title' => 'Because...',
5657 'moodbar-form-note' => '140 character maximum',
@@ -61,7 +62,7 @@
6263 'moodbar-success-title' => 'Thanks!',
6364 'moodbar-error-title' => 'Oops!',
6465 'moodbar-loading-subtitle' => 'We are sharing your feedback…',
65 - 'moodbar-success-subtitle' => 'Sharing your editing experience helps us improve $1.',
 66+ 'moodbar-success-subtitle' => 'Sharing your {{FBD-LINK}} helps us improve $1.',
6667 'moodbar-error-subtitle' => 'Something went wrong! Please try sharing your feedback again later.',
6768 'moodbar-blocked-title' => 'Oops!',
6869 'moodbar-blocked-subtitle' => 'You have been blocked from editing.',
@@ -252,6 +253,7 @@
253254 See [[Thread:Support/About MediaWiki:Moodbar-privacy/en (2)/reply (4)|discussion]].',
254255 'moodbar-privacy-link' => 'This is the anchor text being used in the link replacing $1 in the message {{msg-mw|moodbar-privacy}}',
255256 'moodbar-privacy-link-title' => 'This is the title of the anchor link being used for the privacy message',
 257+ 'moodbar-fbd-link-title' => 'This is the title of the link to the Feedback Dashboard page. Shown after leaving moodbar feedback.',
256258 'moodbar-form-note-dynamic' => 'Should support plural.',
257259 'moodbar-form-policy-text' => 'Text displayed below the input area.
258260
@@ -264,7 +266,9 @@
265267 'moodbar-loading-title' => 'Title of the screen when the widget is loading.',
266268 'moodbar-success-title' => 'Title of the screen after the feedback was successfully submitted.',
267269 'moodbar-error-title' => 'Title of the screen when after an error occurred and submission aborted.',
268 - 'moodbar-success-subtitle' => 'Subtitle of screen when feedback was successfullyully submitted. $1 is the SITENAME',
 270+ 'moodbar-success-subtitle' => 'Subtitle of screen when feedback was successfullyully submitted.
 271+{{FBD-LINK}} Not required, replaced with link to FeedbackDashboard
 272+{{$1}} Not required, Wiki SITENAME',
269273 'moodbar-error-subtitle' => 'Subtitle of screen when an error occurred. $1 is the SITENAME',
270274 'moodbar-blocked-title' => 'Title of the screen after blocked user attempts to post feedback.',
271275 'moodbar-blocked-subtitle' => 'Subtitle of screen after blocked user attempts to post feedback.',
Index: trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.js
@@ -379,6 +379,22 @@
380380 });
381381 },
382382
 383+ prepareSuccess: function( overlay ) {
 384+
 385+ var fbdLink = mw.html.element('a', {
 386+ 'href' : mb.conf.feedbackDashboardUrl,
 387+ 'target': '_blank'
 388+ }, mw.msg ( 'moodbar-fbd-link-title' ));
 389+
 390+ var subTitle = overlay
 391+ .find('.mw-moodBar-state-subtitle');
 392+ var subTitleText = subTitle
 393+ .text()
 394+ .replace( new RegExp( $.escapeRE('{{FBD-LINK}}'), 'g' ), fbdLink );
 395+ subTitle.html(subTitleText);
 396+
 397+ },
 398+
383399 prepareEmailInput: function ( overlay ) {
384400 overlay
385401 .find('#mw-moodBar-emailInput')
@@ -488,6 +504,9 @@
489505 if (tpl == mb.tpl.emailconfirmation) {
490506 mb.prepareEmailVerification ( mb.ui.overlay );
491507 }
 508+ if (tpl == mb.tpl.success) {
 509+ mb.prepareSuccess( mb.ui.overlay );
 510+ }
492511 return true;
493512 },
494513
Index: trunk/extensions/MoodBar/MoodBar.php
@@ -174,6 +174,7 @@
175175 'moodbar-email-confirm-desc',
176176 'moodbar-email-resend-confirmation',
177177 'moodbar-email-optout',
 178+ 'moodbar-fbd-link-title',
178179 ),
179180 'dependencies' => array(
180181 'mediawiki.util',
@@ -259,6 +260,7 @@
260261 'expires' => 30,
261262 ),
262263 'infoUrl' => 'http://www.mediawiki.org/wiki/MoodBar',
 264+ 'feedbackDashboardUrl'=> 'about:blank',
263265 'privacyUrl' => 'about:blank',
264266 'disableExpiration' => 365,
265267 );

Status & tagging log