On 5 Ott, 19:12, vekija <[email protected]> wrote:
> when you call colorpicker function, add options hash as a second
> parameter {IMAGE_BASE: 'img/'}. Change the path to one where your
> images are, but if you store them in your app's image folder it should
> most likely be "/img/".
Thank you for the tip.
I had to write the following:
$pos = strpos(env('PHP_SELF'), "/",1);
if ($pos === false) {
$this->log("errore in path");
$pickpath="";
} else {
$pickpath=substr(env('PHP_SELF'),0,$pos);
}
$optionsi='{IMAGE_BASE:"'.$pickpath.'/js/colorpickerjs/img/"}';
echo $javascript->codeBlock("new Control.ColorPicker
('ParameterKeyColor',$options)");
The 1st part is needed to retrieve the installation folder of cake, I
couldn't find a cake constant for that.
Bye
maxx
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---