-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sortablity to the Grocery List (#44)
* Add sortablity to the Grocery List Extend ListItems to hold and render a list of items that will slide. Add sorting function to sort the list after a user has sorted an element, and send that to the API, so that the whole list can be updated with the new order in the DB. When adding a new item, add an order index to it so that it will end up at the end of the list (like the default behaviour from before), and send that to the API so that it will stay there if the page is refreshed. Add a handle to the ListItem to grab for sorting. It's a bit buggy on mobile interfaces right now. Make the sorting handle not display when on a tab other than "All Items". Sorting only part of the list would be someone of an undefined function, so we just won't allow it. Rework the CSS layout so that the destroy button correctly flexes around the sorting handle. This CSS rework means we can cleanup a bunch of the margin and absolute distance hacks to allow for much simpler floating of objects vertically center and margin distances from each other. Also fix editing box being a fixed width, now it fits the list size, while still having a left buffer so that the text lines up with other lines. * updates on sortable lists * Change CSS class to drag-handle This is to be less confusing, as there could be other handles that this CSS probably shouldn't apply to. Co-authored-by: ryan <[email protected]>
- Loading branch information
Showing
9 changed files
with
178 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.