Loading resources from deeper url

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Loading resources from deeper url

voger
I want to run the source version from a Django server. The main file is
loaded from the url

"http://127.0.0.1:8000/static/vendors/qssite/source/script/qssite.js"

static/ is an actial folder in the app.The file loads fine. However when
it requests the subsequent files (libraries, resources etc) it requests
them from the urls like

http://127.0.0.1:8000/script/qssite.1465c2832300.js
http://127.0.0.1:8000/source/class/qssite/theme/Decoration.js

How can I tell qooxdoo to insert /static/vendors/qssite in these urls?


------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Loading resources from deeper url

Andréas Kühne-3
2015-06-07 11:37 GMT+02:00 voger <[hidden email]>:
I want to run the source version from a Django server. The main file is
loaded from the url

"http://127.0.0.1:8000/static/vendors/qssite/source/script/qssite.js"

static/ is an actial folder in the app.The file loads fine. However when
it requests the subsequent files (libraries, resources etc) it requests
them from the urls like

http://127.0.0.1:8000/script/qssite.1465c2832300.js
http://127.0.0.1:8000/source/class/qssite/theme/Decoration.js

How can I tell qooxdoo to insert /static/vendors/qssite in these urls?


------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


Hi,

I had the same problem. Ended up using the following option in my config.json in the jobs section:

"compile-options": {
"code" : {
"decode-uris-plug" : "decode-source-uris.js"
},
"paths" : {
"file" : "./source/script/${APPLICATION}.js"
},
"uris": {
// "add-nocache-param": true
}
},
Then in decode-source-uris.js:
euri = euri.replace(/^script/, "/static/js/basis/source/script");
That way the uri's for the script part will be correct.
I think thats the only changes I made.
Regards,

Andréas

------------------------------------------------------------------------------

_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Loading resources from deeper url

voger
In reply to this post by voger
For the http://127.0.0.1:8000/source/ urls I made it work by adding this
dictionary in library section in config.json

         {
           "manifest": "./Manifest.json",
           "uri": "/static/vendors/qssite"
         }

but how can I do the same for the
http://127.0.0.1:8000/script/qssite.1465c2832300.js urls?



On 07/06/2015 12:37 μμ, voger wrote:

> I want to run the source version from a Django server. The main file is
> loaded from the url
>
> "http://127.0.0.1:8000/static/vendors/qssite/source/script/qssite.js"
>
> static/ is an actial folder in the app.The file loads fine. However when
> it requests the subsequent files (libraries, resources etc) it requests
> them from the urls like
>
> http://127.0.0.1:8000/script/qssite.1465c2832300.js
> http://127.0.0.1:8000/source/class/qssite/theme/Decoration.js
>
> How can I tell qooxdoo to insert /static/vendors/qssite in these urls?
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>


------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: Loading resources from deeper url

voger
In reply to this post by Andréas Kühne-3
Thank you for your reply. Unfortunately there was not possible to make
it work. The urls always started with "script/" and "source/". I tried
other "compile-options" and still no joy.

Finally I solved it by redirecting the home page to
static/vendors/qssite/source/index.html. The HTML is loaded from there
so everything else is relative to that and it works. This is not what I
want but at least it will allow me to continue for now.

On 07/06/2015 01:00 μμ, Andréas Kühne wrote:

> 2015-06-07 11:37 GMT+02:00 voger <[hidden email]
> <mailto:[hidden email]>>:
>
>     I want to run the source version from a Django server. The main file is
>     loaded from the url
>
>     "http://127.0.0.1:8000/static/vendors/qssite/source/script/qssite.js"
>
>     static/ is an actial folder in the app.The file loads fine. However when
>     it requests the subsequent files (libraries, resources etc) it requests
>     them from the urls like
>
>     http://127.0.0.1:8000/script/qssite.1465c2832300.js
>     http://127.0.0.1:8000/source/class/qssite/theme/Decoration.js
>
>     How can I tell qooxdoo to insert /static/vendors/qssite in these urls?
>
>
>     ------------------------------------------------------------------------------
>     _______________________________________________
>     qooxdoo-devel mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>
> Hi,
>
> I had the same problem. Ended up using the following option in my
> config.json in the jobs section:
>
> "compile-options": {
>    "code": {
>      "decode-uris-plug":"decode-source-uris.js"
>    },
>    "paths": {
>      "file":"./source/script/${APPLICATION}.js"
>    },
>    "uris": {
>      // "add-nocache-param": true
>    }
> },
>
> Then in decode-source-uris.js:
>
> euri  =euri.replace(/^script/,"/static/js/basis/source/script");
>
> That way the uri's for the script part will be correct.
>
> I think thats the only changes I made.
>
> Regards,
>
> Andréas
>
>
> ------------------------------------------------------------------------------
>
>
>
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>


------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel