1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-28 16:49:57 +02:00

Use @this in selectFieldChange

This commit is contained in:
Jakub Vrana
2018-01-12 12:50:09 +01:00
parent 3b0e1cf289
commit e5c52589ec
3 changed files with 10 additions and 11 deletions

View File

@@ -94,9 +94,10 @@ function dbChange() {
/** Check whether the query will be executed with index
* @param HTMLFormElement
* @this HTMLElement
*/
function selectFieldChange(form) {
function selectFieldChange() {
var form = this.form;
var ok = (function () {
var inputs = qsa('input', form);
for (var i=0; i < inputs.length; i++) {

View File

@@ -357,9 +357,7 @@ function menuOut() {
*/
function selectAddRow() {
var field = this;
field.onchange = function () {
selectFieldChange(field.form);
};
field.onchange = selectFieldChange;
field.onchange();
var row = cloneNode(field.parentNode);
var selects = qsa('select', row);