OdinaSpb / jstree

Automatically exported from code.google.com/p/jstree
0 stars 0 forks source link

Need option for disabling injection of css file for theme #981

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In my scenario we put all CSS files in a sort of bundler which packages them in 
one file. My selected theme's CSS file is one of these files that are bundled 
and thereby already included in the CSS of the site.
However, when I load the themes plugin it will automatically inject a reference 
to the theme's CSS file. Is there no way to avoid this? I am aware that there 
is a way to change the url that the plugin should load, but in my case I want 
to completely disable the loading of a file.

For now I have overridden the $.vakata.css.add_sheet function to only include 
the code to inject the inline CSS on the page. (This should also be put in an 
external file IMO, but that is another discussion).
However, this is a pretty ugly solution as I now have to maintain that part of 
the plugin.

What steps will reproduce the problem?
1. Include the themes CSS file in your own way (through some sort of bundler 
for example)
2. Include the themes plugin

What is the expected output? What do you see instead?
I expected the plugin to just apply the classes to the different elements on 
the page and not to try and include the CSS file with no option to stop it from 
doing so.

What version of the product are you using? On what browser?
I am using 1.0-rc3 revision number 236 $
Using Firefox 5.0, but the issue is not browser-dependant.

Original issue reported on code.google.com by emkay8...@gmail.com on 28 Jul 2011 at 8:07

GoogleCodeExporter commented 9 years ago
Similar issue here. jstree tries to insert ---> themes/default/style.css , 
however, that is not a proper place according to my project layout.

Original comment by devrim.d...@gmail.com on 19 Feb 2012 at 11:48