Don't select row on double click
This commit is contained in:
parent
7865695a86
commit
7015fd9706
|
@ -54,7 +54,7 @@ if ($adminer->homepage()) {
|
|||
if ($_POST["search"] && $_POST["query"] != "") {
|
||||
search_tables();
|
||||
}
|
||||
echo "<table cellspacing='0' class='nowrap checkable' onclick='tableClick(event);'>\n";
|
||||
echo "<table cellspacing='0' class='nowrap checkable' onclick='tableClick(event);' ondblclick='tableClick(event, true);'>\n";
|
||||
echo '<thead><tr class="wrap"><td><input id="check-all" type="checkbox" onclick="formCheck(this, /^(tables|views)\[/);">';
|
||||
echo '<th>' . lang('Table');
|
||||
echo '<td>' . lang('Engine');
|
||||
|
|
|
@ -29,7 +29,7 @@ function connect_error() {
|
|||
$scheme = support("scheme");
|
||||
$collations = collations();
|
||||
echo "<form action='' method='post'>\n";
|
||||
echo "<table cellspacing='0' class='checkable' onclick='tableClick(event);'>\n";
|
||||
echo "<table cellspacing='0' class='checkable' onclick='tableClick(event);' ondblclick='tableClick(event, true);'>\n";
|
||||
echo "<thead><tr><td> <th>" . lang('Database') . "<td>" . lang('Collation') . "<td>" . lang('Tables') . "</thead>\n";
|
||||
foreach ($databases as $db) {
|
||||
$root = h(ME) . "db=" . urlencode($db);
|
||||
|
|
|
@ -13,7 +13,7 @@ page_header(lang('Process list'), $error);
|
|||
?>
|
||||
|
||||
<form action="" method="post">
|
||||
<table cellspacing="0" onclick="tableClick(event);" class="nowrap checkable">
|
||||
<table cellspacing="0" onclick="tableClick(event);" ondblclick="tableClick(event, true);" class="nowrap checkable">
|
||||
<?php
|
||||
// HTML valid because there is always at least one process
|
||||
$i = -1;
|
||||
|
|
|
@ -282,7 +282,7 @@ if (!$columns) {
|
|||
} else {
|
||||
$backward_keys = $adminer->backwardKeys($TABLE, $table_name);
|
||||
|
||||
echo "<table id='table' cellspacing='0' class='nowrap checkable' onclick='tableClick(event);' onkeydown='return editingKeydown(event);'>\n";
|
||||
echo "<table id='table' cellspacing='0' class='nowrap checkable' onclick='tableClick(event);' ondblclick='tableClick(event, true);' onkeydown='return editingKeydown(event);'>\n";
|
||||
echo "<thead><tr>" . (!$group && $select ? "" : "<td><input type='checkbox' id='all-page' onclick='formCheck(this, /check/);'> <a href='" . h($_GET["modify"] ? remove_from_uri("modify") : $_SERVER["REQUEST_URI"] . "&modify=1") . "'>" . lang('edit') . "</a>");
|
||||
$names = array();
|
||||
$functions = array();
|
||||
|
|
|
@ -114,9 +114,10 @@ function formChecked(el, name) {
|
|||
|
||||
/** Select clicked row
|
||||
* @param MouseEvent
|
||||
* @param [boolean] force click
|
||||
*/
|
||||
function tableClick(event) {
|
||||
var click = (!window.getSelection || getSelection().isCollapsed);
|
||||
function tableClick(event, click) {
|
||||
click = (click || !window.getSelection || getSelection().isCollapsed);
|
||||
var el = event.target || event.srcElement;
|
||||
while (!/^tr$/i.test(el.tagName)) {
|
||||
if (/^(table|a|input|textarea)$/i.test(el.tagName)) {
|
||||
|
@ -130,7 +131,7 @@ function tableClick(event) {
|
|||
}
|
||||
el = el.firstChild.firstChild;
|
||||
if (click) {
|
||||
el.click && el.click();
|
||||
el.checked = !el.checked;
|
||||
el.onclick && el.onclick();
|
||||
}
|
||||
trCheck(el);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
Adminer 3.6.2-dev:
|
||||
Edit values by Ctrl+click instead of double click
|
||||
Don't select row on double click
|
||||
Shorten values in varchar fields
|
||||
Display table default values on wide screens
|
||||
Fix switching language on first load
|
||||
|
|
Loading…
Reference in a new issue