mirror of
https://github.com/vrana/adminer.git
synced 2025-08-25 23:36:20 +02:00
Add javascript move for editing
This commit is contained in:
committed by
Jakub Vrana
parent
8dd971ca5e
commit
64a49e95e8
@@ -271,6 +271,22 @@ function editingRemoveRow(button, name) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Move table row for field
|
||||
* @param HTMLInputElement
|
||||
* @param boolean direction to move row, true for up or false for down
|
||||
* @return boolean
|
||||
*/
|
||||
function editingMoveRow(button, dir){
|
||||
var row = parentTag(button, 'tr');
|
||||
if (!('nextElementSibling' in row)) {
|
||||
return false;
|
||||
}
|
||||
row.parentNode.insertBefore(row, dir
|
||||
? row.previousElementSibling
|
||||
: row.nextElementSibling ? row.nextElementSibling.nextElementSibling : row.parentNode.firstChild);
|
||||
return true;
|
||||
}
|
||||
|
||||
var lastType = '';
|
||||
|
||||
/** Clear length and hide collation or unsigned
|
||||
|
Reference in New Issue
Block a user