greenlaw110 / greenscript

A tool help web developers manage javascript/css rendering, including minimize and dependence management
42 stars 24 forks source link

Minimized CSS ignores application context path and references to images becomes invalid #20

Closed JosefBoukal closed 13 years ago

JosefBoukal commented 13 years ago

Hi Green,

It's me again. As we have successfully fixed the issue with references to CSS an JS when an app is deployed to a servlet container, we can continue with references in CSS. I have a CSS like this:

body { background: url("body.jpg") no-repeat fixed 50% 0 #898C91; ... }

the background url is modified to "/public/images/body.jpg" correctly, but when I deploy my app to an application context it should reflect the context as well, so for example when deployed to "/my-app" context, it should be changed to:

body { background: url("/my-app/public/images/body.jpg") no-repeat fixed 50% 0 #898C91; ... }

Please, can you fix this as well.

Josef.

greenlaw110 commented 13 years ago

Hi in my sample application "less-and-coffee", I have one less contains "@bg-img: url(bg.jpg);", and in the final css I got:

background-image: url(/less/css/bg.jpg);

Where "less" is my ctxPath.

So I suppose there shouldn't be this problem. Could you double check and help to debug?

You could be able to find and run the sample app from samples_and_tests folder.

On Tue, Sep 20, 2011 at 5:34 PM, JosefBoukal < reply@reply.github.com>wrote:

Hi Green,

It's me again. As we have successfully fixed the issue with references to CSS an JS when an app is deployed to a servlet container, we can continue with references in CSS. I have a CSS like this:

body { background: url("body.jpg") no-repeat fixed 50% 0 #898C91; ... }

the background url is modified to "/public/images/body.jpg" correctly, but when I deploy my app to an application context it should reflect the context as well, so for example when deployed to "/my-app" context, it should be changed to:

body { background: url("/my-app/public/images/body.jpg") no-repeat fixed 50% 0

898C91;

... }

Please, can you fix this as well.

Josef.

Reply to this email directly or view it on GitHub: https://github.com/greenlaw110/greenscript/issues/20

greenlaw110 commented 13 years ago

Hi Josef,

How is this issue going? Can you verify it?

JosefBoukal commented 13 years ago

Hi,

I must apologize, but I'm very busy with a project now (before the client's preview). Since the project is not too big, I finally decided not to use greenscript because also I'm quite new to Play and want to avoid problems with early module versions. But I'm going to get back to the issue next week (probably on Tuesday).

Thanks for understanding. Josef.

Dne 22.9.2011 22:31, Green Luo napsal(a):

Hi Josef,

How is this issue going? Can you verify it?

greenlaw110 commented 13 years ago

Hi Josef,

Sorry about that. Just let me know if I can help.

Best, Green

On Fri, Sep 23, 2011 at 6:42 AM, JosefBoukal < reply@reply.github.com>wrote:

Hi,

I must apologize, but I'm very busy with a project now (before the client's preview). Since the project is not too big, I finally decided not to use greenscript because also I'm quite new to Play and want to avoid problems with early module versions. But I'm going to get back to the issue next week (probably on Tuesday).

Thanks for understanding. Josef.

Dne 22.9.2011 22:31, Green Luo napsal(a):

Hi Josef,

How is this issue going? Can you verify it?

Reply to this email directly or view it on GitHub: https://github.com/greenlaw110/greenscript/issues/20#issuecomment-2172162

JosefBoukal commented 13 years ago

Hi Green,

good work, as (almost) always ;) I have tested the issue wiht the latest play frmwrk greenscript 1.2.6i and it works as expected - glad to say that the issue is fixed now.

Thanks a lot.

Josef.