diff options
author | Rouslan Placella <rouslan@placella.com> | 2012-08-03 20:23:47 +0400 |
---|---|---|
committer | Rouslan Placella <rouslan@placella.com> | 2012-10-31 00:24:00 +0400 |
commit | 289f66ea1b7fe2e7d33f8a0cc75f49317bf37ddb (patch) | |
tree | 3d90414c3c0f5740aeef22c7ddfc3cddb19f3e56 /js/db_structure.js | |
parent | dc04f8f80ab6013fbf17cc270fc1bae682b541bf (diff) |
Fixed print view multi submit
Diffstat (limited to 'js/db_structure.js')
-rw-r--r-- | js/db_structure.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/js/db_structure.js b/js/db_structure.js index 815ce0b5af..5cec48bae8 100644 --- a/js/db_structure.js +++ b/js/db_structure.js @@ -134,6 +134,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' * * @see $cfg['AjaxEnable'] |