mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fixed: No confirm on delete permanently (footer button), saved histories
This commit is contained in:
@@ -541,4 +541,28 @@ function check_all_items() {
|
||||
}
|
||||
}
|
||||
init_grid_elements();
|
||||
}
|
||||
|
||||
|
||||
// confirmation/submission of operation request
|
||||
function submit_operation(selected_button, confirmation_text)
|
||||
{
|
||||
// verify in any item is selected
|
||||
var number_of_checked_ids = $('input[name="id"]:checked').length;
|
||||
if (!number_of_checked_ids > 0)
|
||||
return false;
|
||||
|
||||
// show confirmation box
|
||||
if (confirmation_text != 'None' && confirmation_text != '')
|
||||
if(!confirm(confirmation_text))
|
||||
return false;
|
||||
|
||||
// set up hidden field to parse the command/operation to controller
|
||||
$('#operation').val(selected_button.value);
|
||||
|
||||
// submit form
|
||||
selected_button.form.submit();
|
||||
|
||||
// return
|
||||
return true;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -459,12 +459,14 @@
|
||||
## Grid operations for multiple items.
|
||||
%if show_item_checkboxes:
|
||||
<tr>
|
||||
## place holder for multiple operation commands
|
||||
<input type="hidden" id="operation" name="operation" value="">
|
||||
<td></td>
|
||||
<td colspan="100">
|
||||
For <span class="grid-selected-count"></span> selected ${items_plural}:
|
||||
%for operation in grid.operations:
|
||||
%if operation.allow_multiple:
|
||||
<input type="submit" name="operation" value="${operation.label}" class="action-button">
|
||||
<input type="button" value="${operation.label}" class="action-button" onclick="submit_operation(this, '${operation.confirm}')">
|
||||
%endif
|
||||
%endfor
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user