From fb2d34f7391679689b1a657e3db479c551ea0ff0 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Thu, 8 Feb 2018 09:47:15 +0100 Subject: [PATCH] Support Shift+click in server export --- adminer/dump.inc.php | 5 +++-- adminer/static/editing.js | 13 +++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/adminer/dump.inc.php b/adminer/dump.inc.php index 9538e778..4df94f9b 100644 --- a/adminer/dump.inc.php +++ b/adminer/dump.inc.php @@ -165,6 +165,7 @@ echo "" . lang('Data') . "" . html_select('data_style', $data_style, $type) { $prefix = preg_replace('~_.*~', '', $name); $checked = ($TABLE == "" || $TABLE == (substr($TABLE, -1) == "%" ? "$prefix%" : $name)); //! % may be part of table name - $print = "
" . checkbox("tables[]", $name, $checked, $name, "checkboxClick.call(this, event); formUncheck('check-tables');", "block"); + $print = "
" . checkbox("tables[]", $name, $checked, $name, "formUncheck('check-tables');", "block"); if ($type !== null && !preg_match('~table~i', $type)) { $views .= "$print\n"; } else { - echo "$print\n"; + echo "$print\n"; } $prefixes[$prefix]++; } diff --git a/adminer/static/editing.js b/adminer/static/editing.js index a23e313a..6e42cfe3 100644 --- a/adminer/static/editing.js +++ b/adminer/static/editing.js @@ -404,6 +404,19 @@ function partitionNameChange() { +/** Uncheck 'all' checkbox +* @param MouseEvent +* @this HTMLTableElement +*/ +function dumpClick(event) { + var el = parentTag(getTarget(event), 'label'); + if (el) { + checkboxClick.call(el.firstChild, event); + } +} + + + /** Add row for foreign key * @this HTMLSelectElement */