- const data = this.sortGroup.sortable('serialize').get();
- this.input.value = data[0].map(item => item.id).join(',');
- const instruction = this.elem.querySelector('.scroll-box-item.instruction');
- instruction.parentNode.insertBefore(instruction, instruction.parentNode.children[0]);
- }
-
- getPlaceholderHTML() {
- const placeHolder = document.querySelector('.scroll-box-placeholder');
- placeHolder.style.display = 'block';
- const placeHolderContent = placeHolder.outerHTML;
- placeHolder.style.display = 'none';
- return placeHolderContent;
+ const shelfBookElems = Array.from(this.shelfBooksList.querySelectorAll('[data-id]'));
+ this.input.value = shelfBookElems.map(elem => elem.getAttribute('data-id')).join(',');