顶部和底部的Django管理员更改列表滚动条 [英] Django admin change list scrollbar at top and bottom
本文介绍了顶部和底部的Django管理员更改列表滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的Django更改列表中,有很多列,这意味着列表底部有一个滚动条.是否可以在顶部显示滚动条,所以我不需要向下滚动
In my Django changelist there are lots of columns that means there is a scrollbar at the bottom of the list. Is it possible to get a scrollbar to appear at the top so I don't need to scroll down
谢谢
赠予
推荐答案
感谢AlexandreS,一分钱掉了,这就是我所做的
The penny dropped thanks to AlexandreS and this is what I did
我使用了此插件: https://github.com/avianey/jqDoubleScroll
我将代码复制到我的js文件中:js/admin-help.js
I coped the code to my js file: js/admin-help.js
在模型类的管理员中,我有这个
In admin in the model class, I have this
class Media:
js = (
'//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js', # jquery
'js/admin-help.js', # project static folder
)
然后收集静电,看起来像我想要的一样工作
Then collectstatic and it looks like it works, as I want too
谢谢
赠予
这篇关于顶部和底部的Django管理员更改列表滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文