Open schema to new tab on Ctrl+click
This commit is contained in:
parent
5f370927f1
commit
2cf2021995
|
@ -812,17 +812,16 @@ username.form['auth[driver]'].onchange();
|
||||||
<form action="">
|
<form action="">
|
||||||
<p id="dbs">
|
<p id="dbs">
|
||||||
<?php
|
<?php
|
||||||
hidden_fields_get();
|
hidden_fields_get();
|
||||||
echo ($databases
|
$db_events = " onmousedown='dbMouseDown(event, this);' onchange='dbChange(this);'";
|
||||||
? '<select name="db" onmousedown="dbMouseDown(event, this);" onchange="dbChange(this);">' . optionlist(array("" => "(" . lang('database') . ")") + $databases, DB) . '</select>'
|
echo ($databases
|
||||||
|
? "<select name='db'$db_events>" . optionlist(array("" => "(" . lang('database') . ")") + $databases, DB) . "</select>"
|
||||||
: '<input name="db" value="' . h(DB) . '" autocapitalize="off">'
|
: '<input name="db" value="' . h(DB) . '" autocapitalize="off">'
|
||||||
);
|
);
|
||||||
?>
|
echo "<input type='submit' value='" . lang('Use') . "'" . ($databases ? " class='hidden'" : "") . ">\n";
|
||||||
<input type="submit" value="<?php echo lang('Use'); ?>"<?php echo ($databases ? " class='hidden'" : ""); ?>>
|
|
||||||
<?php
|
|
||||||
if ($missing != "db" && DB != "" && $connection->select_db(DB)) {
|
if ($missing != "db" && DB != "" && $connection->select_db(DB)) {
|
||||||
if (support("scheme")) {
|
if (support("scheme")) {
|
||||||
echo "<br>" . html_select("ns", array("" => "(" . lang('schema') . ")") + schemas(), $_GET["ns"], "this.form.submit();");
|
echo "<br><select name='ns'$db_events>" . optionlist(array("" => "(" . lang('schema') . ")") + schemas(), $_GET["ns"]) . "</select>";
|
||||||
if ($_GET["ns"] != "") {
|
if ($_GET["ns"] != "") {
|
||||||
set_schema($_GET["ns"]);
|
set_schema($_GET["ns"]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ function loginDriver(driver) {
|
||||||
|
|
||||||
|
|
||||||
var dbCtrl;
|
var dbCtrl;
|
||||||
var dbPrevious;
|
var dbPrevious = {};
|
||||||
|
|
||||||
/** Check if database should be opened to a new window
|
/** Check if database should be opened to a new window
|
||||||
* @param MouseEvent
|
* @param MouseEvent
|
||||||
|
@ -84,8 +84,8 @@ var dbPrevious;
|
||||||
*/
|
*/
|
||||||
function dbMouseDown(event, el) {
|
function dbMouseDown(event, el) {
|
||||||
dbCtrl = isCtrl(event);
|
dbCtrl = isCtrl(event);
|
||||||
if (dbPrevious == undefined) {
|
if (dbPrevious[el.name] == undefined) {
|
||||||
dbPrevious = el.value;
|
dbPrevious[el.name] = el.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,9 +98,9 @@ function dbChange(el) {
|
||||||
}
|
}
|
||||||
el.form.submit();
|
el.form.submit();
|
||||||
el.form.target = '';
|
el.form.target = '';
|
||||||
if (dbCtrl && dbPrevious != undefined) {
|
if (dbCtrl && dbPrevious[el.name] != undefined) {
|
||||||
el.value = dbPrevious;
|
el.value = dbPrevious[el.name];
|
||||||
dbPrevious = undefined;
|
dbPrevious[el.name] = undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue