1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-21 13:51:33 +02:00

Use the fact that we handle oninput in whisper()

This commit is contained in:
Jakub Vrana
2018-01-13 09:07:18 +01:00
parent e255ba9aa4
commit f457053d85
2 changed files with 33 additions and 21 deletions

View File

@@ -461,7 +461,11 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
if ($options !== null) {
return (is_array($options)
? "<select$attrs>" . optionlist($options, $value, true) . "</select>"
: "<input value='" . h($value) . "'$attrs class='hidden'><input value='" . h($options) . "' class='jsonly' oninput=\"whisper.call(this, '" . h(ME . "script=complete&source=" . urlencode($table) . "&field=" . urlencode($field["field"])) . "&value=');\"><div onclick='return whisperClick(event, this.previousSibling);'></div>"
: "<input value='" . h($value) . "'$attrs class='hidden'>"
. "<input value='" . h($options) . "' class='jsonly'>"
. "<div></div>"
. script("qsl('input').oninput = partial(whisper, '" . ME . "script=complete&source=" . urlencode($table) . "&field=" . urlencode($field["field"]) . "&value=');
qsl('div').onclick = whisperClick;", "")
);
}
if (like_bool($field)) {