Hi,
I'm trying to prevent some js files to load in admin context.
I use the code below to do this in "start.php" file of a plugin:
if (!elgg_in_context('admin')) {
elgg_extend_view("js/elgg", $path, $priority);
}
but it is strangely loaded and I don't know why! Any one knows the reason?
Thanks in advance.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- ihayredinov@ihayredinov
ihayredinov - 0 likes
- Sirbito X@sirbitox
Sirbito X - 0 likes
- ihayredinov@ihayredinov
ihayredinov - 0 likes
- Sirbito X@sirbitox
Sirbito X - 0 likes
You must log in to post replies.You can not unextend js views dynamically as they are cached and served via simplecache. Tell us what you are trying to achieve.
I have a JS file that I do not want to load it in admin context because It breaks the admin panel JS files.
Any idea??
@ihayredinov
You can override the JS file with your own view and fix the code that breaks the panel
No, I can't. I've changed the confirmation dialog with a better UI instead of browser alert and I need this JS file to work in every where except in the admin context (i.e. I need the default alert dialog of the browsers in admin context not the fancy one that I implemented)
@ihayredinov