components / jqueryui

Shim repository for jQuery UI.

Home Page:http://jqueryui.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Copy of #46 : no solution provided

rrajkomar opened this issue · comments

Hi,
Sorry but the link (http://symfony.com/doc/current/cookbook/assetic/asset_management.html#including-css-stylesheets) provided in #46 gives samples on how to load either multiple css or multiple js files (using the respective blocks) but only how to load one image at a time.
My issue is that the images cannot be accessed (I'm using cssrewrite) and it works fine for all images but the jqueryui ones !
The issue may come from where the jqueryui packages copy the files (componenets directory) which is not taken into account by the cssrewrite ?

Typically with the default location you have the images loaded from css file with something like this
background-image:url("images/ui-icons_72a7cf_256x240.png")
and when dumping the assets you get in web/css something that points to
background-image:url("../../images/ui-icons_ffffff_256x240.png")
which effectively points to nowhere because the directory images is not at this location (app/images) at all, it is located in app/components/jquery-ui/themes/{theme-name}/images !

Here's an actual solution that works for anyone experiencing the same issue :
In your project's composer.json file in the config section, add "component-dir": "web/components" after bin-dir as such :
"config": {
"bin-dir": "bin",
"component-dir": "web/components"
},