Lines 317-322
Link Here
|
317 |
[% MACRO jsinclude BLOCK %] |
317 |
[% MACRO jsinclude BLOCK %] |
318 |
<script> |
318 |
<script> |
319 |
var active_table = "#article-requests-pending"; |
319 |
var active_table = "#article-requests-pending"; |
|
|
320 |
var last_cancel_reason; |
320 |
$(document).ready(function() { |
321 |
$(document).ready(function() { |
321 |
$('#article-request-tabs').tabs({ |
322 |
$('#article-request-tabs').tabs({ |
322 |
activate: function( activate_event, activate_ui ) { |
323 |
activate: function( activate_event, activate_ui ) { |
Lines 376-381
Link Here
|
376 |
} |
377 |
} |
377 |
|
378 |
|
378 |
function HandleMulti( fnHandler, id, a ) { |
379 |
function HandleMulti( fnHandler, id, a ) { |
|
|
380 |
last_cancel_reason = undefined; |
379 |
if( id !== 0 ) { fnHandler( id, a ); return; } |
381 |
if( id !== 0 ) { fnHandler( id, a ); return; } |
380 |
$( active_table + " input[type='checkbox']:checked").each(function() { |
382 |
$( active_table + " input[type='checkbox']:checked").each(function() { |
381 |
fnHandler( $(this).attr('reqid'), $(this).closest('tr').find('td.ar-actions div a') ); |
383 |
fnHandler( $(this).attr('reqid'), $(this).closest('tr').find('td.ar-actions div a') ); |
Lines 388-395
Link Here
|
388 |
} |
390 |
} |
389 |
|
391 |
|
390 |
function Cancel( id, a ) { |
392 |
function Cancel( id, a ) { |
391 |
notes = prompt(_("Reason for cancellation:")); |
393 |
if( last_cancel_reason === undefined ) last_cancel_reason = prompt(_("Please specify the reason for cancelling selected item(s):")); |
392 |
if ( notes == null ) { |
394 |
if ( last_cancel_reason === null ) { |
393 |
return; |
395 |
return; |
394 |
} |
396 |
} |
395 |
|
397 |
|
Lines 400-406
Link Here
|
400 |
data: { |
402 |
data: { |
401 |
action: 'cancel', |
403 |
action: 'cancel', |
402 |
id: id, |
404 |
id: id, |
403 |
notes: notes |
405 |
notes: last_cancel_reason |
404 |
}, |
406 |
}, |
405 |
success: function( data ) { |
407 |
success: function( data ) { |
406 |
a.closest('tr').remove(); |
408 |
a.closest('tr').remove(); |
407 |
- |
|
|