[Chameleon] compress Chameleon javascript
Delfos, Jacob
Jacob.Delfos at maunsell.com
Thu May 11 01:57:21 EDT 2006
Thanks Bart, I'll just have to do some more searching.
Ka-Map has a version that is customised to run in Ka-Map (which takes in
multiple js files, and outputs one file), but I'll have a look to see if
the actual compression algorithm is different.
regards,
Jacob
________________________________
From: chameleon-bounces at lists.maptools.org
[mailto:chameleon-bounces at lists.maptools.org] On Behalf Of Eijnden, B.
van den (Bart)
Sent: 11 May 2006 13:34
To: Delfos, Jacob; Bart van den Eijnden;
chameleon at lists.maptools.org
Subject: RE: [Chameleon] compress Chameleon javascript
Hi Jacob,
If I remember correctly I applied it to all the js files.
I think in ka-Map there is a more recent version of this script.
At least I saw some e-mails a few weeks ago.
The only thing I had trouble with were the missing ;. But it's
been a long time :-)
Best regards,
Bart
-----Oorspronkelijk bericht-----
Van: chameleon-bounces at lists.maptools.org
[mailto:chameleon-bounces at lists.maptools.org]Namens Delfos,
Jacob
Verzonden: donderdag 11 mei 2006 3:27
Aan: Bart van den Eijnden; chameleon at lists.maptools.org
Onderwerp: RE: [Chameleon] compress Chameleon javascript
Bart,
Did you end up applying this only to cwcjsapi? I'm looking into
this,
because the main page and all the scripts, are starting to get
pretty
huge (especially with a tree legend). I am looking into applying
it for
all javascripts, by modifying UIManager.php. On line 401, I
replace:
$szJSInclude .= "<!-- javascript include $key -->\n";
$szJSInclude .= $this->maJSIncludeFunctions[$key];
With:
$jsPath =
str_replace($_SESSION['gszCoreWebPath']."/","getcjs.php?name=",$this->ma
JSIncludeFunctions[$key]);
$jsPath = str_replace(".js","",$jsPath);
$szJSInclude .= $jsPath;
It can probably be cleaner, but I thought I'd try first to see
whether
it works at all. It does work, but I think some scripts need
cleaning. I
get an error about cwc_line.js, and the keymap becomes a red
image. I
couldn't find any missing ';' in cwc_line.js. Which other things
did you
find that the script can fail on?
Regards,
Jacob
> -----Original Message-----
> From: chameleon-bounces at lists.maptools.org
> [mailto:chameleon-bounces at lists.maptools.org] On Behalf Of
> Bart van den Eijnden
> Sent: 20 July 2005 22:32
> To: chameleon at lists.maptools.org; Bart van den Eijnden
> Subject: Re: [Chameleon] compress Chameleon javascript
>
> Okay, this probably needs fixing in the CWCJSAPI.js file
> instead of the php script.
>
> The CWCJSAPI.js file contains stuff like:
>
> this.units = 3 //meter
>
> this.zoomfactor = 2;
>
> Which goes okay when there is a return at the end, but not if
> it is on one line in the compressed js file.
>
> I will try to update the CVS version of cwcjsapi and add ;
> consequently everywhere.
>
> Best regards,
> Bart
>
> Bart van den Eijnden
> Syncera IT Solutions
> Postbus 270
> 2600 AG DELFT
>
> tel.nr.: 015-7512436
> email: BEN at Syncera-ITSolutions.nl
> >>> Bart van den Eijnden 07/20/05 16:27 PM >>>
> Paul,
>
> just realized I am missing a lot of ; in the cwcjsapi.js file
> which causes many js errors.
>
> Do you have an update already of the script which fixes this
> before I dive into it myself :-) ?
>
> Best regards,
> Bart
>
> Bart van den Eijnden
> Syncera IT Solutions
> Postbus 270
> 2600 AG DELFT
>
> tel.nr.: 015-7512436
> email: BEN at Syncera-ITSolutions.nl
> >>> "Bart van den Eijnden" <BEN at syncera-itsolutions.nl>
> 07/20/05 16:14 PM >>>
> Bart van den Eijnden
> Syncera IT Solutions
> Postbus 270
> 2600 AG DELFT
>
> tel.nr.: 015-7512436
> email: BEN at Syncera-ITSolutions.nl
>
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
>
_______________________________________________
Chameleon mailing list
Chameleon at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/chameleon
Disclaimer
************************************************************************
Aan dit bericht kunnen geen rechten worden ontleend. Dit bericht is
uitsluitend bestemd voor de geadresseerde. Als u dit bericht per abuis
hebt ontvangen, wordt u verzocht het te vernietigen en de afzender te
informeren. Wij adviseren u om bij twijfel over de juistheid of de
volledigheid van de mail contact met afzender op te nemen. This message
shall not constitute any rights or obligations. This message is intended
solely for the addressee. If you have received this message in error,
please delete it and notify the sender immediately. When in doubt
whether this message is correct or complete, please contact the sender.
************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20060511/ac481cf0/attachment-0001.html
More information about the Chameleon
mailing list