riktar / jkanban

Vanilla Javascript plugin for manage kanban boards
https://www.riccardotartaglia.it/jkanban/
Apache License 2.0
1.07k stars 299 forks source link

Provide an optional URL/endpoint option for each item to validate the drag operation #4

Closed ramanbuttar closed 6 years ago

ramanbuttar commented 6 years ago

Another feature request

What I am thinking is that each item has an optional url or endpoint, or validate option where I can slot in the URL for a json endpoint. Upon finishing the drag, this an AJAX call gets triggered to this URL and if the response is true or success, the drag operation persists, otherwise it's reverted.

How this will work for my use case is that I will have a state machine for tasks in my Ruby models and upon dragging, if the state machine verifies the state change for a task is valid and allowed, and persists the change to the database, then the UI reflects it accordingly.

I know there are affordances for adding drag functions where I could make an AJAX call myself but this interface will make this feature a lot more plug-n-play.

ramanbuttar commented 6 years ago

Hi @riktar Any updates on the issues I posted here? How can I help you with these?

riktar commented 6 years ago

I think this feature request is a redundancy. It is possible to simply define everything through the various events made available.