diff --git a/lib/cubx_injector_sidebar.js b/lib/cubx_injector_sidebar.js index aeb703e..f88df4b 100644 --- a/lib/cubx_injector_sidebar.js +++ b/lib/cubx_injector_sidebar.js @@ -28,8 +28,8 @@ actionBtn: 'btn btn-sm btn-light', editBtn: 'fas fa-pen', removeBtn: 'fas fa-trash', - moveUpBtn: 'fas fa-arrow-up', - moveDownBtn: 'fas fa-arrow-down', + moveUpBtn: 'fas fa-arrow-up action-up', + moveDownBtn: 'fas fa-arrow-down action-down', hidden: 'hidden', actionsContainer: 'actions-container btn-group', }; @@ -278,7 +278,10 @@ { label: ACTIONS_LABELS.moveDown, listener: function () { - console.log('Moving down'); + if (row.nextSibling !== null) { + let tbody = row.parentNode; + tbody.insertBefore(row.nextSibling, row); + } }, className: ELEMENTS_CLASSES.actionBtn, iconClassName: ELEMENTS_CLASSES.moveDownBtn