Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Click on row selects it (fixes #2844098)

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1003 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
commit bcff0255eede5d380c3d6e01fcd39c7247292041 1 parent 83f3b40
jakubvrana authored
View
2  adminer/db.inc.php
@@ -48,7 +48,7 @@
echo "<p class='message'>" . lang('No tables.') . "\n";
} else {
echo "<form action='' method='post'>\n";
- echo "<table cellspacing='0' class='nowrap'>\n";
+ echo "<table cellspacing='0' class='nowrap' onclick='table_click(event);'>\n";
echo '<thead><tr class="wrap"><td><input id="check-all" type="checkbox" onclick="form_check(this, /^(tables|views)\[/);"><th>' . lang('Table') . '<td>' . lang('Engine') . '<td>' . lang('Collation') . '<td>' . lang('Data Length') . '<td>' . lang('Index Length') . '<td>' . lang('Data Free') . '<td>' . lang('Auto Increment') . '<td>' . lang('Rows') . '<td>' . lang('Comment') . "</thead>\n";
foreach ($table_status as $row) {
$name = $row["Name"];
View
13 adminer/functions.js
@@ -26,6 +26,19 @@ function form_uncheck(id) {
document.getElementById(id).checked = false;
}
+function table_click(event) {
+ var target = event.target || event.srcElement;
+ while (!/^tr$/i.test(target.tagName)) {
+ if (/^(table|a|input)$/i.test(target.tagName)) {
+ return;
+ }
+ target = target.parentNode;
+ }
+ var input = target.firstChild.firstChild;
+ input.click && input.click();
+ input.onclick && input.onclick();
+}
+
function select_add_row(field) {
View
2  adminer/processlist.inc.php
@@ -13,7 +13,7 @@
?>
<form action="" method="post">
-<table cellspacing="0">
+<table cellspacing="0" onclick="table_click(event);">
<?php
$result = $dbh->query("SHOW PROCESSLIST");
for ($i=0; $row = $result->fetch_assoc(); $i++) {
View
2  adminer/select.inc.php
@@ -199,7 +199,7 @@
}
}
- echo "<table cellspacing='0' class='nowrap'>\n";
+ echo "<table cellspacing='0' class='nowrap' onclick='table_click(event);'>\n";
echo "<thead><tr><td><input type='checkbox' id='all-page' onclick='form_check(this, /check/);'>";
$names = array();
reset($select);
View
1  changes.txt
@@ -2,6 +2,7 @@ Adminer 2.1.0:
Edit default values directly in table creation
Display column comments in table overview
Respect max_allowed_packet in CSV import
+Click on row selects it
Fix Editor date format
Fix long SQL query crash (bug #2839231)
Traditional Chinese translation
Please sign in to comment.
Something went wrong with that request. Please try again.