rniemeyer / knockout-sortable

A Knockout.js binding to connect observableArrays with jQuery UI sortable functionality
MIT License
547 stars 128 forks source link

Request: buttons only version (without drag) #170

Closed trinzia closed 8 years ago

trinzia commented 8 years ago

Hi,

I would like to request a version (or Fiddle), in which up/down buttons may be used to sort the list, instead of dragging. This is useful in the case where the dragged item is too large a percentage of the screen-height (such as rearranging pages) to be able to comfortably rearrange.

Also (maybe doesn't go in this topic, but ...), is there a way to "add item after"? In all the Task List examples, the item is added at the end. If I placed a button inside a list-item, could I use it to add an item immediately after that list item?

Thanks so much.

rniemeyer commented 8 years ago

@trinzia - Here is a sample with three buttons for inserting a task, moving up, and moving down. Please let me know if you have any questions about the sample: http://jsfiddle.net/rniemeyer/aj1fq6sr/ . Thanks!

trinzia commented 8 years ago

Thanks so much, this sample will help me learn. :)