Fixed print view multi submit

This commit is contained in:
Rouslan Placella 2012-08-03 18:23:47 +02:00
parent dc04f8f80a
commit 289f66ea1b

View File

@ -133,6 +133,31 @@ function PMA_adjustTotals() {
}
AJAX.registerOnload('db_structure.js', function() {
/**
* Handler for the print view multisubmit.
* All other multi submits can be handled via ajax, but this one needs
* special treatment as the results need to open in another browser window
*/
$('#tablesForm').submit(function (event) {
var $form = $(this);
if ($form.find('select[name=submit_mult]').val() === 'print') {
event.preventDefault();
event.stopPropagation();
$('form#clone').remove();
var $clone = $form
.clone()
.hide()
.appendTo('body');
$clone
.find('select[name=submit_mult]')
.val('print');
$clone
.attr('target', 'printview')
.attr('id', 'clone')
.submit();
}
});
/**
* Ajax Event handler for 'Insert Table'
*