EitanBlumin / CRUDE-ASP

Low Code Application Generator in Classic ASP, with MSSQL Database, Bootstrap, Fontawesome, and jQuery. Based on the AdminLTE web template.
https://git.eitanblumin.com/CRUDE-ASP/
Mozilla Public License 2.0
24 stars 13 forks source link

Add DataTable Row ReOrder #96

Closed EitanBlumin closed 5 years ago

EitanBlumin commented 5 years ago

Add additional column before the actions column, with a vertical ellipsis or fas fa-sort icon.

https://datatables.net/extensions/rowreorder/examples/styling/bootstrap.html

https://datatables.net/extensions/rowreorder/examples/initialisation/ajax.html

https://datatables.net/extensions/rowreorder/examples/initialisation/restrictedOrdering.html

https://datatables.net/reference/option/#rowreorder

This column will make the rows draggable:

https://datatables.net/extensions/rowreorder/examples/initialisation/responsive.html

The reorder event will update the necessary rows.

https://datatables.net/extensions/rowreorder/examples/initialisation/events.html

A hidden form needs to be added to the page, and its contents rendered on each datatable draw. Each row will be added as a hidden input to the reorder form. Reordered rows will update existing hidden input. Once at least one row is reordered, it will make a button visible which will submit the reorder form This all will be done using jQuery. The form submission will work the same way the other forms work, using ajaxForm and the response modal.

Will need to add new column to DataViews: Row ReOrder Column