Re: [pmapper-users] Plugins modifications

2013-07-29 Thread Chris forum
Thx a lot for the detailed info!

I think I will keep it simple though and try what Armin has suggested with
another custom.js dedicated for the plugins.


On Mon, Jul 29, 2013 at 12:19 PM, Thomas RAFFIN  wrote:

> Indeed I've modified the core code to compress files in the same order
> than if they were included without compression (in my version js files
> are not included in js_session.php).
>
> It is complicated to compare with the "clean pmapper code", because
>
> 1) my version is using differently the configuration directory
> - "common directory" : /pmapper/config/common/js_config.php *.js *.css
> - optionally defined in the final configuration in
> "XXX" :
> /pmapper/config/XXX/js_config.php *.js *.css
> - optionally defined in the final configuration in
> "YYY" :
> /pmapper/config/YYY/js_config.php *.js *.css
>
> 2) I have modified the behaviour of
> "YYY" to include an intermediate
> configuration
>
> 3) the compressed js are not included at the same place in the 2 versions
>
> 4) I've added parameters in the config.xml to indicates what have to be
> compressed: js_base, js_plugins, js_config, js_config_reference,
> css_plugins_files, css_config_files
>
>
> To illustrate points 1 and 2, for instance I'm using configurations like
> that :
> - config_XX-01.xml (with pm_config_common = XX-common and
> pm_config_location = XX-01)
>  => merged with config_XX-common.xml (with pm_config_location_common
> = XX-common)
>  => merged with config_common.xml
>  => merged with "common/._startup_/.defaults.xml"
> So the XML is the compilation of defaults + common + XX-common + XX-01
> and the directories : common + XX-common + XX-01
> - config_XX-02.xml : same as CC-01, but with pm_config_location = XX-02
> and different parameters in the XML
> ...
> - config_YY-01.xml : 
> So the XML is addition of defaults + common + YY-common + YY-01 and the
> directories : common + YY-common + YY-01
>
> NB: config_XX-01 and config_YY-01 could use the same pm_config_location
> ("01"):
> - config_XX-01 => common + XX-common + 01
> - config_YY-01 => common + YY-common + 01
>
> or don't define "pm_config_location" at all (just change the logo,
> title, mapfile, ... define in the xml):
> - config_XX-01, 02, 03, ... => common + XX-common
> - config_YY-01, 02, 03, ... => common + YY-common
>
> I didn't add it in pmapper, because it will change the way to define the
> configs files.
>
> Thomas
>
>
> Le 29/07/2013 11:37, Chris forum a écrit :
> > Hi Thomas,
> >
> > Just checked, even with
> > 5
> > the custom.js is still read before the plugins JS file
> >
> > What compression function are you using and where?
> >
> >
> > On Mon, Jul 29, 2013 at 10:48 AM, Thomas RAFFIN  > > wrote:
> >
> > Hi,
> >
> > Try to inactivate the compression (debug level = 5 I think) and
> > tell us
> > if the custom.js is before or after the plugins files please?
> >
> > AFAIK I don't use the same compression functions than in "standard"
> > pmapper. So all js files are compressed in the same order than if
> they
> > were included without compression. So the custom.js (and all other
> > config/xxx/yyy.js files) is included AFTER all the plugins js files.
> >
> > Thomas
> >
> >
> > Le 29/07/2013 09:53, Chris forum a écrit :
> > > Ok I see.
> > > Thanx for the tips, I am going to try adding a custom_plugin.js
> > file.
> > > I will also check if the plugins I modified are available as a
> > class.
> > >
> > >
> > > On Fri, Jul 26, 2013 at 7:04 PM, Armin Burger
> > mailto:armin.bur...@gmail.com>>wrote:
> > >
> > >> The problem is that the custom.js file from your config
> > directory is
> > >> loaded before the plugin JS files, so they will not have any
> effect
> > >>
> > >> The cleanest way would be to separate the custom JS files from the
> > >> default JS files. Currently there is a a single check and all are
> > >> referenced at the same time. Since Thomas is probably using this
> > >> functionality more often I leave it to him to decide if the
> > main code
> > >> should be changed accordingly.
> > >>
> > >> A fast workaround would be to use something like a
> > "custom_plugin.js"
> > >> and reference this in the classical way (

Re: [pmapper-users] Plugins modifications

2013-07-29 Thread Thomas RAFFIN
Indeed I've modified the core code to compress files in the same order 
than if they were included without compression (in my version js files 
are not included in js_session.php).

It is complicated to compare with the "clean pmapper code", because

1) my version is using differently the configuration directory
- "common directory" : /pmapper/config/common/js_config.php *.js *.css
- optionally defined in the final configuration in 
"XXX" : 
/pmapper/config/XXX/js_config.php *.js *.css
- optionally defined in the final configuration in 
"YYY" : 
/pmapper/config/YYY/js_config.php *.js *.css

2) I have modified the behaviour of 
"YYY" to include an intermediate 
configuration

3) the compressed js are not included at the same place in the 2 versions

4) I've added parameters in the config.xml to indicates what have to be 
compressed: js_base, js_plugins, js_config, js_config_reference, 
css_plugins_files, css_config_files


To illustrate points 1 and 2, for instance I'm using configurations like 
that :
- config_XX-01.xml (with pm_config_common = XX-common and 
pm_config_location = XX-01)
 => merged with config_XX-common.xml (with pm_config_location_common 
= XX-common)
 => merged with config_common.xml
 => merged with "common/._startup_/.defaults.xml"
So the XML is the compilation of defaults + common + XX-common + XX-01 
and the directories : common + XX-common + XX-01
- config_XX-02.xml : same as CC-01, but with pm_config_location = XX-02 
and different parameters in the XML
...
- config_YY-01.xml : 
So the XML is addition of defaults + common + YY-common + YY-01 and the 
directories : common + YY-common + YY-01

NB: config_XX-01 and config_YY-01 could use the same pm_config_location 
("01"):
- config_XX-01 => common + XX-common + 01
- config_YY-01 => common + YY-common + 01

or don't define "pm_config_location" at all (just change the logo, 
title, mapfile, ... define in the xml):
- config_XX-01, 02, 03, ... => common + XX-common
- config_YY-01, 02, 03, ... => common + YY-common

I didn't add it in pmapper, because it will change the way to define the 
configs files.

Thomas


Le 29/07/2013 11:37, Chris forum a écrit :
> Hi Thomas,
>
> Just checked, even with
> 5
> the custom.js is still read before the plugins JS file
>
> What compression function are you using and where?
>
>
> On Mon, Jul 29, 2013 at 10:48 AM, Thomas RAFFIN  > wrote:
>
> Hi,
>
> Try to inactivate the compression (debug level = 5 I think) and
> tell us
> if the custom.js is before or after the plugins files please?
>
> AFAIK I don't use the same compression functions than in "standard"
> pmapper. So all js files are compressed in the same order than if they
> were included without compression. So the custom.js (and all other
> config/xxx/yyy.js files) is included AFTER all the plugins js files.
>
> Thomas
>
>
> Le 29/07/2013 09:53, Chris forum a écrit :
> > Ok I see.
> > Thanx for the tips, I am going to try adding a custom_plugin.js
> file.
> > I will also check if the plugins I modified are available as a
> class.
> >
> >
> > On Fri, Jul 26, 2013 at 7:04 PM, Armin Burger
> mailto:armin.bur...@gmail.com>>wrote:
> >
> >> The problem is that the custom.js file from your config
> directory is
> >> loaded before the plugin JS files, so they will not have any effect
> >>
> >> The cleanest way would be to separate the custom JS files from the
> >> default JS files. Currently there is a a single check and all are
> >> referenced at the same time. Since Thomas is probably using this
> >> functionality more often I leave it to him to decide if the
> main code
> >> should be changed accordingly.
> >>
> >> A fast workaround would be to use something like a
> "custom_plugin.js"
> >> and reference this in the classical way (

Re: [pmapper-users] Plugins modifications

2013-07-29 Thread Chris forum
Hi Thomas,

Just checked, even with
5
the custom.js is still read before the plugins JS file

What compression function are you using and where?


On Mon, Jul 29, 2013 at 10:48 AM, Thomas RAFFIN  wrote:

> Hi,
>
> Try to inactivate the compression (debug level = 5 I think) and tell us
> if the custom.js is before or after the plugins files please?
>
> AFAIK I don't use the same compression functions than in "standard"
> pmapper. So all js files are compressed in the same order than if they
> were included without compression. So the custom.js (and all other
> config/xxx/yyy.js files) is included AFTER all the plugins js files.
>
> Thomas
>
>
> Le 29/07/2013 09:53, Chris forum a écrit :
> > Ok I see.
> > Thanx for the tips, I am going to try adding a custom_plugin.js file.
> > I will also check if the plugins I modified are available as a class.
> >
> >
> > On Fri, Jul 26, 2013 at 7:04 PM, Armin Burger  >wrote:
> >
> >> The problem is that the custom.js file from your config directory is
> >> loaded before the plugin JS files, so they will not have any effect
> >>
> >> The cleanest way would be to separate the custom JS files from the
> >> default JS files. Currently there is a a single check and all are
> >> referenced at the same time. Since Thomas is probably using this
> >> functionality more often I leave it to him to decide if the main code
> >> should be changed accordingly.
> >>
> >> A fast workaround would be to use something like a "custom_plugin.js"
> >> and reference this in the classical way (

Re: [pmapper-users] Plugins modifications

2013-07-29 Thread Thomas RAFFIN
Hi,

Try to inactivate the compression (debug level = 5 I think) and tell us 
if the custom.js is before or after the plugins files please?

AFAIK I don't use the same compression functions than in "standard" 
pmapper. So all js files are compressed in the same order than if they 
were included without compression. So the custom.js (and all other 
config/xxx/yyy.js files) is included AFTER all the plugins js files.

Thomas


Le 29/07/2013 09:53, Chris forum a écrit :
> Ok I see.
> Thanx for the tips, I am going to try adding a custom_plugin.js file.
> I will also check if the plugins I modified are available as a class.
>
>
> On Fri, Jul 26, 2013 at 7:04 PM, Armin Burger wrote:
>
>> The problem is that the custom.js file from your config directory is
>> loaded before the plugin JS files, so they will not have any effect
>>
>> The cleanest way would be to separate the custom JS files from the
>> default JS files. Currently there is a a single check and all are
>> referenced at the same time. Since Thomas is probably using this
>> functionality more often I leave it to him to decide if the main code
>> should be changed accordingly.
>>
>> A fast workaround would be to use something like a "custom_plugin.js"
>> and reference this in the classical way (

Re: [pmapper-users] Plugins modifications

2013-07-29 Thread Chris forum
Ok I see.
Thanx for the tips, I am going to try adding a custom_plugin.js file.
I will also check if the plugins I modified are available as a class.


On Fri, Jul 26, 2013 at 7:04 PM, Armin Burger wrote:

> The problem is that the custom.js file from your config directory is
> loaded before the plugin JS files, so they will not have any effect
>
> The cleanest way would be to separate the custom JS files from the
> default JS files. Currently there is a a single check and all are
> referenced at the same time. Since Thomas is probably using this
> functionality more often I leave it to him to decide if the main code
> should be changed accordingly.
>
> A fast workaround would be to use something like a "custom_plugin.js"
> and reference this in the classical way (