getgrav / grav-plugin-admin

Grav Admin Plugin
http://getgrav.org
MIT License
355 stars 222 forks source link

jQuery dependency with relay on GRAV #2380

Closed hellkaim closed 8 months ago

hellkaim commented 8 months ago

Hay there and thank you for the grate plugin.

I am making a site with limited JS and it does not need jQuery in any way. I found out that it is loaded from the system.yaml and disable it.

Immediately after 'Pages' section stopped working as it is dependent on the jQuery being present.

What I am about to propose is to ship your own version of it if it is needed (like the Form plugin does) and add some check if it is loaded by anything OR better - to load it on the admin page(s) that really requires it.

I was looking on the code but came with no idea what will be the best implantation. For now I have to patch the admin/themes/grav/templates/pages.html.twig to add the jQuery as this is the only page so far that I found using that.

Would like to hear from you and/or may become with some PR for the issue.

hellkaim commented 8 months ago

Ok, my fault. It is possible to unload jQuery and have plugin working.

More over it is a duplicate of 2273

Sorry ))