1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 01:24:17 +02:00

Add javascript move for editing

This commit is contained in:
Jonathan Vollebregt
2016-05-31 20:36:00 +02:00
committed by Jakub Vrana
parent 8dd971ca5e
commit 64a49e95e8
3 changed files with 18 additions and 4 deletions

View File

@@ -277,8 +277,8 @@ echo checkbox("fields[$i][has_default]", 1, $field["has_default"], "", "", "", "
echo "<td>";
echo (support("move_col") ?
"<input type='image' class='icon' name='add[$i]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "' onclick='return !editingAddRow(this, 1);'>&nbsp;"
. "<input type='image' class='icon' name='up[$i]' src='../adminer/static/up.gif' alt='^' title='" . lang('Move up') . "'>&nbsp;"
. "<input type='image' class='icon' name='down[$i]' src='../adminer/static/down.gif' alt='v' title='" . lang('Move down') . "'>&nbsp;"
. "<input type='image' class='icon' name='up[$i]' src='../adminer/static/up.gif' alt='^' title='" . lang('Move up') . "' onclick='return !editingMoveRow(this, 1);'>&nbsp;"
. "<input type='image' class='icon' name='down[$i]' src='../adminer/static/down.gif' alt='v' title='" . lang('Move down') . "' onclick='return !editingMoveRow(this, 0);'>&nbsp;"
: "");
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(this, 'fields\$1[field]');\">" : "");
echo "\n";
@@ -290,7 +290,6 @@ echo checkbox("fields[$i][has_default]", 1, $field["has_default"], "", "", "", "
* @return bool
*/
function process_fields(&$fields) {
ksort($fields);
$offset = 0;
if ($_POST["up"]) {
$last = 0;