Return false from editingRemoveRow
This commit is contained in:
parent
efcf37d162
commit
068ee71bf7
|
@ -280,7 +280,7 @@ echo checkbox("fields[$i][has_default]", 1, $field["has_default"], "", "", "", "
|
|||
. "<input type='image' class='icon' name='up[$i]' src='../adminer/static/up.gif' alt='^' title='" . lang('Move up') . "' onclick='return !editingMoveRow.call(this, 1);'> "
|
||||
. "<input type='image' class='icon' name='down[$i]' src='../adminer/static/down.gif' alt='v' title='" . lang('Move down') . "' onclick='return !editingMoveRow.call(this, 0);'> "
|
||||
: "");
|
||||
echo ($orig == "" || support("drop_col") ? "<input type='image' class='icon' name='drop_col[$i]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick=\"return !editingRemoveRow.call(this, 'fields\$1[field]');\">" : "");
|
||||
echo ($orig == "" || support("drop_col") ? "<input type='image' class='icon' name='drop_col[$i]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick=\"return editingRemoveRow.call(this, 'fields\$1[field]');\">" : "");
|
||||
echo "\n";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ foreach ($row["indexes"] as $index) {
|
|||
}
|
||||
|
||||
echo "<td><input name='indexes[$j][name]' value='" . h($index["name"]) . "' autocapitalize='off' aria-labelledby='label-name'>\n";
|
||||
echo "<td><input type='image' class='icon' name='drop_col[$j]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick=\"return !editingRemoveRow.call(this, 'indexes\$1[type]');\">\n";
|
||||
echo "<td><input type='image' class='icon' name='drop_col[$j]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick=\"return editingRemoveRow.call(this, 'indexes\$1[type]');\">\n";
|
||||
}
|
||||
$j++;
|
||||
}
|
||||
|
|
|
@ -258,14 +258,14 @@ function editingAddRow(focus) {
|
|||
|
||||
/** Remove table row for field
|
||||
* @param string
|
||||
* @return boolean
|
||||
* @return boolean false
|
||||
* @this HTMLInputElement
|
||||
*/
|
||||
function editingRemoveRow(name) {
|
||||
var field = formField(this.form, this.name.replace(/[^\[]+(.+)/, name));
|
||||
field.parentNode.removeChild(field);
|
||||
parentTag(this, 'tr').style.display = 'none';
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Move table row for field
|
||||
|
|
Loading…
Reference in a new issue