r103112 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103111‎ | r103112 | r103113 >
Date:01:24, 15 November 2011
Author:rmoen
Status:resolved (Comments)
Tags:
Comment:
added reason prompt when admin hides or restores a comment
Modified paths:
  • /trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js
@@ -1,7 +1,7 @@
22 /**
33 * AJAX code for Special:MoodBarFeedback
44 */
5 -jQuery( function( $ ) {
 5+jQuery( function( $ ) {
66 /**
77 * Saved form state
88 */
@@ -258,12 +258,15 @@
259259 showItemError( $item, error_str );
260260 };
261261
 262+ var reason = prompt("Reason for this action?");
 263+
262264 $.post( mw.util.wikiScript('api'),
263265 $.extend( {
264266 'action' : 'feedbackdashboard',
265267 'token' : mw.user.tokens.get('editToken'),
266268 'item' : item_id,
267 - 'format' : 'json'
 269+ 'format' : 'json',
 270+ 'reason' : reason
268271 }, params ),
269272 function(response) {
270273 if ( response && response.feedbackdashboard ) {
@@ -342,4 +345,5 @@
343346 loadComments( 'filter' );
344347 }
345348 }
 349+
346350 } );

Follow-up revisions

RevisionCommit summaryAuthorDate
r103218required inline action reason, added localizationrmoen20:14, 15 November 2011

Comments

#Comment by Catrope (talk | contribs)   10:10, 15 November 2011
+		var reason = prompt("Reason for this action?");

Hardcoded English is not acceptable. All interface texts must be translatable.

#Comment by Nikerabbit (talk | contribs)   11:30, 15 November 2011

Trailing whitespace was added to line 4.

#Comment by Robmoen (talk | contribs)   00:00, 16 November 2011

follow up to r103112 fixed in r103218. Removed prompt and replaced with entirely new method. Added localization.

Status & tagging log