Open form to a new window on Ctrl+click or Shift+click
This commit is contained in:
parent
541561be4d
commit
4cb14deac1
|
@ -32,7 +32,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<body class="<?php echo lang('ltr'); ?> nojs" onkeydown="bodyKeydown(event);" onload="bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info, 0, 3) : ""); ?>');<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " verifyVersion();"); ?>">
|
<body class="<?php echo lang('ltr'); ?> nojs" onkeydown="bodyKeydown(event);" onclick="bodyClick(event);" onload="bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info, 0, 3) : ""); ?>');<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " verifyVersion();"); ?>">
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
document.body.className = document.body.className.replace(/ nojs/, ' js');
|
document.body.className = document.body.className.replace(/ nojs/, ' js');
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -312,6 +312,20 @@ function bodyKeydown(event, button) {
|
||||||
return true;
|
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
|
/** Change focus by Ctrl+Up or Ctrl+Down
|
||||||
|
|
|
@ -4,6 +4,7 @@ Edit strings with \n in textarea
|
||||||
Time out long running database list and select count
|
Time out long running database list and select count
|
||||||
Use VALUES() in INSERT+UPDATE export
|
Use VALUES() in INSERT+UPDATE export
|
||||||
Style logout button as link
|
Style logout button as link
|
||||||
|
Ctrl+click and Shift+click on button opens form to a blank window
|
||||||
selectQueryBuild() method (customization)
|
selectQueryBuild() method (customization)
|
||||||
Serbian translation
|
Serbian translation
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue