Index: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | /** |
3 | 3 | * AJAX code for Special:MoodBarFeedback |
4 | 4 | */ |
5 | | -jQuery( function( $ ) { |
| 5 | +jQuery( function( $ ) { |
6 | 6 | /** |
7 | 7 | * Saved form state |
8 | 8 | */ |
— | — | @@ -258,12 +258,15 @@ |
259 | 259 | showItemError( $item, error_str ); |
260 | 260 | }; |
261 | 261 | |
| 262 | + var reason = prompt("Reason for this action?"); |
| 263 | + |
262 | 264 | $.post( mw.util.wikiScript('api'), |
263 | 265 | $.extend( { |
264 | 266 | 'action' : 'feedbackdashboard', |
265 | 267 | 'token' : mw.user.tokens.get('editToken'), |
266 | 268 | 'item' : item_id, |
267 | | - 'format' : 'json' |
| 269 | + 'format' : 'json', |
| 270 | + 'reason' : reason |
268 | 271 | }, params ), |
269 | 272 | function(response) { |
270 | 273 | if ( response && response.feedbackdashboard ) { |
— | — | @@ -342,4 +345,5 @@ |
343 | 346 | loadComments( 'filter' ); |
344 | 347 | } |
345 | 348 | } |
| 349 | + |
346 | 350 | } ); |