]> git.joonet.de Git - adminer.git/commitdiff
Click on row selects it (fixes #2844098)
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Tue, 25 Aug 2009 10:25:56 +0000 (10:25 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Tue, 25 Aug 2009 10:25:56 +0000 (10:25 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1003 7c3ca157-0c34-0410-bff1-cbf682f78f5c

adminer/db.inc.php
adminer/functions.js
adminer/processlist.inc.php
adminer/select.inc.php
changes.txt

index beb9e16e2aa38e3e13cfdf0089deba69708ded98..31b7a293c29c4aa9abd90a23d92a1f017b7e1ad9 100644 (file)
@@ -48,7 +48,7 @@ if (!$table_status) {
        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"];
index b06af09ada7d913502904101ff0e207b783fe148..965748ee7ee2b31a1d1affa07fa646572d2a5905 100644 (file)
@@ -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) {
index d9f49b3a5db8d5bb50e27202401ec8692bc7b069..df800e9475f9e11c2f843ad7cea17436ca3ecff5 100644 (file)
@@ -13,7 +13,7 @@ page_header(lang('Process list'), $error);
 ?>
 
 <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++) {
index 21a3946414fc003c0feecdd6abffff7772524aef..ce6400543e90f25917d6a74ba16cbf2969d0b099 100644 (file)
@@ -199,7 +199,7 @@ if (!$columns) {
                                }
                        }
                        
-                       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);
index 41197ea7b15b469004454516acdf3a1576a66a95..28cc0a0bb34990d8e860ddd18601aeffd4266650 100644 (file)
@@ -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