ekokotov / object-table

Angular directive to easy create dynamic tables from source or URL with sorting, filtering and pagination. Smart templates and good perfomance
BSD 3-Clause "New" or "Revised" License
171 stars 52 forks source link

Plugin not working with jquery #26

Closed cvile closed 8 years ago

cvile commented 8 years ago

Greetings, i struggle to implement drag n drop feature (with resize) on columns. I have noticed that if i remove jquery (which is referenced above angular.js dependency) plugin does work, if i try to reorder columns with jquery included, an error occurs.

Uncaught TypeError: Cannot read property 'setData' of undefined in object-table.js on line 7. The same for getData function.

Another problem i have noticed, even if i remove jquery from index and reorder works (on latest chrome, firefox and safari) resizing of columns not working in chrome (without errors) but still works in safari and firefox. Dont have idea why so.

cvile commented 8 years ago

It seems when you change in draggableDirective.js e.dataTransfer.setData ... to e.originalEvent.dataTransfer.setData (also in object-table.js) everything seems to work again xD

Btw i have noticed that reordering columns (drag n drop) not working on mobile devices via browser. Do you have any idea why? tnx in advance...

Best regards.

ekokotov commented 8 years ago

Because here is no touch events for mobile devices. May be enable drag-n-drop by long touch... something like this. According this issue... I will test it with jquery to find a problem. Thanks for you comment.

ekokotov commented 8 years ago

Please try to update to new version. Should be fixed. + added on-edit event.