允许将可排序的项目放入垃圾箱,但不进行排序
我希望在管理员面板中显示我网站上的新闻列表。我希望能够将项目放入垃圾桶,但无法对列表进行排序。 我的问题是如何允许它被拖到垃圾桶并不允许它在项目所在的列表中排序。可以将其拖放到列表中,但所有项目都需要具有与以前相同的位置。
I want to have a list of news on my site, in the administrator panel. I want to be able to drop items in a trashcan, but not be able to sort the list.
My problem is how to allow it to be dragged to the trashcan and disallow it to be sorted in the list the item is located. It can be dropped in the list, but all items needs to have the same location as before.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果你想要制作不可排序的东西,为什么要使用可排序而不是可拖动?尝试使其仅与可拖动和 -handle- revert 一起工作。
像这样的东西有效:
Why do you use sortable, and not draggable if you're trying to make something that isn't sortable? Try to make it work with only draggable and a -handle- revert.
Something like this works:
可排序不是必需的。您唯一需要的是 - 可拖动和可放置。抱歉,但我没有时间修复你的示例。
Sortable is not necessary. The only you need - draggable and droppable. Sorry, but I have not time to fix your example.