diff --git a/adminer/include/design.inc.php b/adminer/include/design.inc.php index 6bbcf564..fb13af2d 100644 --- a/adminer/include/design.inc.php +++ b/adminer/include/design.inc.php @@ -32,7 +32,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") { -');"> +');"> diff --git a/adminer/static/functions.js b/adminer/static/functions.js index df574a4d..7dd950d9 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -312,6 +312,20 @@ function bodyKeydown(event, button) { return true; } +/** Open form to a new window on Ctrl+click or Shift+click +* @param MouseEvent +*/ +function bodyClick(event) { + var target = event.target || event.srcElement; + if ((event.ctrlKey || event.shiftKey) && target.type == 'submit' && /input/i.test(target.tagName)) { + target.form.target = '_blank'; + setTimeout(function () { + // if (event.ctrlKey) { focus(); } doesn't work + target.form.target = ''; + }, 0); + } +} + /** Change focus by Ctrl+Up or Ctrl+Down diff --git a/changes.txt b/changes.txt index 12cc41fb..4755b9f7 100644 --- a/changes.txt +++ b/changes.txt @@ -4,6 +4,7 @@ Edit strings with \n in textarea Time out long running database list and select count Use VALUES() in INSERT+UPDATE export Style logout button as link +Ctrl+click and Shift+click on button opens form to a blank window selectQueryBuild() method (customization) Serbian translation