Open database to a new window after selecting it with Ctrl
This commit is contained in:
parent
aba9d23ba2
commit
e4d5835dab
|
@ -808,8 +808,13 @@ username.form['auth[driver]'].onchange();
|
||||||
?>
|
?>
|
||||||
<form action="">
|
<form action="">
|
||||||
<p id="dbs">
|
<p id="dbs">
|
||||||
<?php hidden_fields_get(); ?>
|
<?php
|
||||||
<?php echo ($databases ? html_select("db", array("" => "(" . lang('database') . ")") + $databases, DB, "this.form.submit();") : '<input name="db" value="' . h(DB) . '" autocapitalize="off">'); ?>
|
hidden_fields_get();
|
||||||
|
echo ($databases
|
||||||
|
? '<select name="db" onmousedown="dbMouseDown(event, this);" onchange="dbChange(this);">' . optionlist(array("" => "(" . lang('database') . ")") + $databases, DB) . '</select>'
|
||||||
|
: '<input name="db" value="' . h(DB) . '" autocapitalize="off">'
|
||||||
|
);
|
||||||
|
?>
|
||||||
<input type="submit" value="<?php echo lang('Use'); ?>"<?php echo ($databases ? " class='hidden'" : ""); ?>>
|
<input type="submit" value="<?php echo lang('Use'); ?>"<?php echo ($databases ? " class='hidden'" : ""); ?>>
|
||||||
<?php
|
<?php
|
||||||
if ($missing != "db" && DB != "" && $connection->select_db(DB)) {
|
if ($missing != "db" && DB != "" && $connection->select_db(DB)) {
|
||||||
|
|
|
@ -75,6 +75,37 @@ function loginDriver(driver) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var dbCtrl;
|
||||||
|
var dbPrevious;
|
||||||
|
|
||||||
|
/** Check if database should be opened to a new window
|
||||||
|
* @param MouseEvent
|
||||||
|
* @param HTMLSelectElement
|
||||||
|
*/
|
||||||
|
function dbMouseDown(event, el) {
|
||||||
|
dbCtrl = isCtrl(event);
|
||||||
|
if (dbPrevious == undefined) {
|
||||||
|
dbPrevious = el.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Load database after selecting it
|
||||||
|
* @param HTMLSelectElement
|
||||||
|
*/
|
||||||
|
function dbChange(el) {
|
||||||
|
if (dbCtrl) {
|
||||||
|
el.form.target = '_blank';
|
||||||
|
}
|
||||||
|
el.form.submit();
|
||||||
|
el.form.target = '';
|
||||||
|
if (dbCtrl && dbPrevious != undefined) {
|
||||||
|
el.value = dbPrevious;
|
||||||
|
dbPrevious = undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** Handle Tab and Esc in textarea
|
/** Handle Tab and Esc in textarea
|
||||||
* @param HTMLTextAreaElement
|
* @param HTMLTextAreaElement
|
||||||
* @param KeyboardEvent
|
* @param KeyboardEvent
|
||||||
|
|
|
@ -5,6 +5,7 @@ Recover original view, trigger, routine if creating fails
|
||||||
Allow loading more data with inline edit (bug #3605531)
|
Allow loading more data with inline edit (bug #3605531)
|
||||||
Stay on the same page after deleting rows (bug #3605845)
|
Stay on the same page after deleting rows (bug #3605845)
|
||||||
Handle max_input_vars
|
Handle max_input_vars
|
||||||
|
Open database to a new window after selecting it with Ctrl
|
||||||
Disable autocapitalize in identifiers on mobile browsers
|
Disable autocapitalize in identifiers on mobile browsers
|
||||||
MySQL: Compatibility with MySQL 5.6
|
MySQL: Compatibility with MySQL 5.6
|
||||||
MySQL: Move ALTER export to plugin
|
MySQL: Move ALTER export to plugin
|
||||||
|
|
Loading…
Reference in a new issue