Nestable2 icon indicating copy to clipboard operation
Nestable2 copied to clipboard

add 'moveIn' and 'listNo' data attribute handler

Open morganpizzini opened this issue 7 years ago • 5 comments

description here

morganpizzini avatar Oct 26 '17 13:10 morganpizzini

@morganpizzini Can you add some documentation about it in README.md?

pjona avatar Oct 26 '17 13:10 pjona

Consider updated README, I'm not quite sure that code:

            var itemMoveIn = this.dragEl.find(opt.itemNodeName).data('moveIn');
            var listNo = this.pointEl.closest('.dd-list').data('listNo');
            if (itemMoveIn !== listNo) {
                return;
            }

works properly with attributes: 'data-move-in' and 'data-list-no'. It looks like attributes should be 'data-moveIn' and 'data-listNo'.

It's a bit confusing for me, but it works =)

RomanBurunkov avatar Oct 26 '17 16:10 RomanBurunkov

ops yes, i think i press some strange shortcuts who delete "-" and uppercase the first char after 😄 sorry my bad, i'm going to fix it

morganpizzini avatar Oct 26 '17 16:10 morganpizzini

@morganpizzini , that's, ok =)

But check my update to previous comment....it works =))) Despite, fixing it also works and also more clear.

RomanBurunkov avatar Oct 26 '17 16:10 RomanBurunkov

Yes of course, data-list-no inside "Item 6" must have 3 as index and not 2, same for data-move-in inside

https://jsfiddle.net/s5yt9mc4/7/

morganpizzini avatar Nov 23 '17 13:11 morganpizzini