Skip to content

assetic generation path #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dbu opened this issue Sep 4, 2013 · 8 comments
Closed

assetic generation path #40

dbu opened this issue Sep 4, 2013 · 8 comments

Comments

@dbu
Copy link
Contributor

dbu commented Sep 4, 2013

it would be cool if the path where assetic is to generate the js and stylesheet would be optional. or maybe simply offer an option if the js and stylesheet should be included at all, so that i can also add them to my own asset list and combine with the other assets and set that option to false.

/cc @chrootlogin

@bonswouar
Copy link
Contributor

I'm not sure it's related, but despite I don't use assetic (compression: false) the routes generated with {% include "FMElfinderBundle:Elfinder:helper/assets_css.html.twig" %} are paths to assetic like /assetic/css/compiled/fmelfinder/main.css, so they don't exist (to fix that I had to include those assets "manually").

@helios-ag
Copy link
Owner

Actually i want to remove assetic dep from bundle, by moving assets to component. I already have fork with support of this component in bundle

@bonswouar
Copy link
Contributor

Nice, when do you think you'll merge it into master ?

@helios-ag
Copy link
Owner

Hi @bonswouar i probably wait week or two, actually i need more feedback.

@bonswouar
Copy link
Contributor

Okay @helios-ag , I'll use this branch next week and let you know if I notice any problem.

@bonswouar
Copy link
Contributor

Okay, that works, though :

  • I had to add "components/elfinder": "dev-master@dev" to my composer.json (it's not very clear in the documentation)
  • I can't use {% include "FMElfinderBundle:Elfinder:helper/assets_js.html.twig" %} anymore (prefix missing in Twig I think) , had to include them manually. EDIT : I noticed just after typing that, that the prefix in probably a parameter to pass to the include, but I guess there should be a cleaner way to do it

Also, I have a problem with the form field (didn't notice that new feature, it's not related to the branch I think).
The JS doesn't use the url configuration when appending the path of the selected file to the form input. For example, with for a file image.jpg using an url parameter like this : upload/admin/images/article, it adds only article/image.jpg to my input field.
So I'm still using my custom field & JS for the form field for now.

@helios-ag
Copy link
Owner

Hi @bonswouar, thank you for feedback,
about forms feature, it includes path parameter in callback, but i think to change it to url parameter or make it parameterized with choices to select via form configuration (absolute/relative urls and probably custom settings). Sorry for late reply.

@helios-ag
Copy link
Owner

5'th version of the bundle support components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants