diff --git a/adminer/select.inc.php b/adminer/select.inc.php
index f165d1a2..4fdf439f 100644
--- a/adminer/select.inc.php
+++ b/adminer/select.inc.php
@@ -440,8 +440,10 @@ if (!$columns && support("table")) {
echo "
" . ($text ? "" : "");
} else {
$long = strpos($val, "...");
- echo " | $val | ";
- echo script("qsl('td').onclick = partialArg(selectClick, " . ($long ? 2 : ($text ? 1 : 0)) . ($editable ? "" : ", '" . h(lang('Use edit link to modify this value.')) . "'") . ");", "");
+ echo "$val | "
+ ;
}
}
}
diff --git a/adminer/static/functions.js b/adminer/static/functions.js
index effb3aa7..7bdd8801 100644
--- a/adminer/static/functions.js
+++ b/adminer/static/functions.js
@@ -246,6 +246,13 @@ function formChecked(el, name) {
* @param [boolean] force click
*/
function tableClick(event, click) {
+ var td = parentTag(getTarget(event), 'td');
+ var text;
+ if (td && (text = td.getAttribute('data-text'))) {
+ if (selectClick.call(td, event, +text, td.getAttribute('data-warning'))) {
+ return;
+ }
+ }
click = (click || !window.getSelection || getSelection().isCollapsed);
var el = getTarget(event);
while (!isTag(el, 'tr')) {
@@ -667,6 +674,7 @@ function ajaxForm(form, message, button) {
* @param MouseEvent
* @param number display textarea instead of input, 2 - load long text
* @param [string] warning to display
+* @return boolean
* @this HTMLElement
*/
function selectClick(event, text, warning) {
@@ -676,7 +684,8 @@ function selectClick(event, text, warning) {
return;
}
if (warning) {
- return alert(warning);
+ alert(warning);
+ return true;
}
var original = td.innerHTML;
text = text || /\n/.test(original);
@@ -732,6 +741,7 @@ function selectClick(event, text, warning) {
range.moveEnd('character', -input.value.length + pos);
range.select();
}
+ return true;
}
diff --git a/changes.txt b/changes.txt
index fe6e1352..eb5d5cb3 100644
--- a/changes.txt
+++ b/changes.txt
@@ -1,4 +1,5 @@
Adminer 4.6.1-dev:
+Speed up rendering of long tables
MySQL: Support non-utf8 charset in search in column
MySQL: Support geometry in MySQL 8 (bug #574)
SQLite: Allow deleting PRIMARY KEY from tables with auto increment