Page 1 of 1
Including HTML for every admin page?
Posted: Mon Feb 13, 2012 12:31 pm
by jurrie
Hello everyone,
I want to inlude some JavaScript in every admin page, and I'm wondering if it is possible to create a module that does that? So not just for admin pages of my own module, but for every page in the admin section.
I found
http://forum.cmsmadesimple.org/viewtopi ... ilit=admin, but that only outputs the content for my own admin pages.
I know I can make an admin theme, but then I will lose the possibility of enabling/disabling my module, as well as upgrade-support.
With kind regards,
Jurrie
Re: Including HTML for every admin page?
Posted: Mon Feb 13, 2012 6:19 pm
by Wishbone
At one point, I was looking to do the same thing, but looking at the code, it doesn't seem possible from a module point-of-view.. The only way that I can see to do this is to modify the admin theme.
What were you trying to accomplish? I was trying to use JQuery to change a text extra field definition to be a GBFilePicker input, so I could use it in News, or any other module .. I found another way to do this, but it was very News-specific (module_custom/UDT), as opposed to being a generic JQuery replacement.
Re: Including HTML for every admin page?
Posted: Mon Feb 13, 2012 7:48 pm
by jurrie
Wishbone wrote:At one point, I was looking to do the same thing, but looking at the code, it doesn't seem possible from a module point-of-view.. The only way that I can see to do this is to modify the admin theme.
Hi Wishbone,
Thanks for your reply. Too bad it's not quite possible, but I already kinda thought it wasn't.
Wishbone wrote:What were you trying to accomplish?
I'm trying to modify the 'preview' functionallity. Instead of opening the link directly, I want it in a popup I can control.
If you know of a way to do this (other than modifying the theme of course
![Smiley :)](./images/smilies/smiley.gif)
), please let me know.
With kind regards,
Jurrie
Re: Including HTML for every admin page?
Posted: Tue Feb 14, 2012 6:41 am
by nockenfell
Maybe with eventmanager (modify html)?
Re: Including HTML for every admin page?
Posted: Tue Feb 14, 2012 6:51 am
by Wishbone
As far as I know, the event manager only works on the front end... I tried.
![Smiley :)](./images/smilies/smiley.gif)
Re: Including HTML for every admin page?
Posted: Tue Feb 14, 2012 3:13 pm
by calguy1000
Correct... there is no way to inject javascript/html into each admin page.