mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Control: Add drag and drop to sort categories and products (#2242)
* add drag and drop to categories * add drag and drop to products * add light grey background to dragged element * add missing th, add sr-only desc of columns * group up/down/move elements * improve visualizing drag-area by dimming others * change up/down-links to buttons in form-post * limit sorting to POST requests Co-authored-by: Raphael Michel <michel@rami.io>
This commit is contained in:
committed by
GitHub
parent
dde4e12ce1
commit
8121167d5e
@@ -94,12 +94,12 @@ class CategoriesTest(ItemFormTest):
|
||||
self.assertIn("Entry tickets", doc.select("table > tbody > tr")[0].text)
|
||||
self.assertIn("T-Shirts", doc.select("table > tbody > tr")[1].text)
|
||||
|
||||
self.client.get('/control/event/%s/%s/categories/%s/down' % (self.orga1.slug, self.event1.slug, c1.id))
|
||||
self.client.post('/control/event/%s/%s/categories/%s/down' % (self.orga1.slug, self.event1.slug, c1.id))
|
||||
doc = self.get_doc('/control/event/%s/%s/categories/' % (self.orga1.slug, self.event1.slug))
|
||||
self.assertIn("Entry tickets", doc.select("table > tbody > tr")[1].text)
|
||||
self.assertIn("T-Shirts", doc.select("table > tbody > tr")[0].text)
|
||||
|
||||
self.client.get('/control/event/%s/%s/categories/%s/up' % (self.orga1.slug, self.event1.slug, c1.id))
|
||||
self.client.post('/control/event/%s/%s/categories/%s/up' % (self.orga1.slug, self.event1.slug, c1.id))
|
||||
doc = self.get_doc('/control/event/%s/%s/categories/' % (self.orga1.slug, self.event1.slug))
|
||||
self.assertIn("Entry tickets", doc.select("table > tbody > tr")[0].text)
|
||||
self.assertIn("T-Shirts", doc.select("table > tbody > tr")[1].text)
|
||||
|
||||
Reference in New Issue
Block a user