diff --git a/src/pretix/control/templates/pretixcontrol/items/categories.html b/src/pretix/control/templates/pretixcontrol/items/categories.html index 503a057e4c..753f067a32 100644 --- a/src/pretix/control/templates/pretixcontrol/items/categories.html +++ b/src/pretix/control/templates/pretixcontrol/items/categories.html @@ -41,15 +41,15 @@ {{ c.internal_name|default:c.name }} - - - - + + + + - + {% endfor %} diff --git a/src/pretix/control/templates/pretixcontrol/items/discounts.html b/src/pretix/control/templates/pretixcontrol/items/discounts.html index d908976c0e..6391c89eb6 100644 --- a/src/pretix/control/templates/pretixcontrol/items/discounts.html +++ b/src/pretix/control/templates/pretixcontrol/items/discounts.html @@ -129,14 +129,14 @@ {% endif %} - + - - - + + + diff --git a/src/pretix/control/templates/pretixcontrol/organizers/properties.html b/src/pretix/control/templates/pretixcontrol/organizers/properties.html index 321458229f..7e787f66f0 100644 --- a/src/pretix/control/templates/pretixcontrol/organizers/properties.html +++ b/src/pretix/control/templates/pretixcontrol/organizers/properties.html @@ -51,9 +51,9 @@ {% endif %} - - - + + + '); @@ -11,7 +11,14 @@ $(function () { handle.addClass("disabled"); return; } - + let didSort = false, lastClick = 0; + function handleMouseUp() { + if (Date.now() - lastClick < 6000) { + container.find(".sortable-up, .sortable-down").removeClass("sr-only"); + } + lastClick = Date.now(); + } + container.find(".dnd-sort-handle").on("mouseup", handleMouseUp); Sortable.create(container.get(0), { filter: ".sortable-disabled", handle: ".dnd-sort-handle", @@ -22,16 +29,18 @@ $(function () { onStart: function (evt) { container.addClass("sortable-dragarea"); container.parent().addClass("sortable-sorting"); + didSort = false; }, onEnd: function (evt) { container.removeClass("sortable-dragarea"); container.parent().removeClass("sortable-sorting"); + if (!didSort) handleMouseUp(); }, onSort: function (evt){ if (evt.target !== evt.to) return; + didSort = true; - var ids = container.find("[data-dnd-id]").toArray().map(function (e) { return e.dataset.dndId; }); - + const ids = container.find("[data-dnd-id]").toArray().map(function (e) { return e.dataset.dndId; }); $.ajax( { 'type': 'POST',