Req #19311 [Com]: JavascriptBuilder->setDefaultAbsPath()
| From: | sergiokessler@gmail.com | Date: | Thu, 01 Mar 2012 16:25:55 +0000 |
| Subject: | Req #19311 [Com]: JavascriptBuilder->setDefaultAbsPath() | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-8338@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=19311&edit=1
ID: 19311
Comment by: sergiokessler@gmail.com
Reported By: sergiokessler at gmail dot com
Summary: JavascriptBuilder->setDefaultAbsPath()
Status: Bogus
Type: Feature/Change Request
Package: HTML_QuickForm2
Package Version: 0.6.1
PHP Version: 5.3.4
Roadmap Versions:
New Comment:
ok, thanks.
I did use the constructor for the absPath...
Previous Comments:
------------------------------------------------------------------------
[2012-03-01 15:57:44] avb
-Status: Open
+Status: Bogus
PEAR installer replaces @data_dir@ in JavascriptBuilder.php to current
value of data_dir parameter. If you later relocate the files somewhere,
you need to provide the dir name to JavascriptBuilder's constructor.
There is no need to "fix" anything in JavascriptBuilder, as it can
properly address two common scenarios
1) package installed with PEAR installer
2) SVN checkout
but of course can't guess any other dir name you decided to use.
That being said, it is suggested in the docs that you put the *.js files
under web root and reference them via <script src="..."></script> tags
rather than inline them.
https://pear.php.net/manual/en/package.html.html-quickform2.javascript.php
------------------------------------------------------------------------
[2012-03-01 15:43:28] sak
I "fixed" it like
if (null === $defaultAbsPath) {
$defaultAbsPath = __DIR__ . '/../../data' .
DIRECTORY_SEPARATOR . 'HTML_QuickForm2'
. DIRECTORY_SEPARATOR . 'js' .
DIRECTORY_SEPARATOR;
I tried
if (null === $defaultAbsPath) {
$defaultAbsPath = '@data_dir@' . ...
but it didn't work...
------------------------------------------------------------------------
[2012-03-01 15:28:54] sak
Description:
------------
please, provide a
HTML_QuickForm2_JavascriptBuilder->setDefaultAbsPath()
I have my pear components in
myproject/share/pear
and do a
set_include_path('.:share/pear');
I use system's pear just to install and copy the components I
use to myproject/share/pear
and without setDefaultAbsPath() I get error
HTML_QuickForm2_NotFoundException: File 'quickform.js' for
JS library 'base' not found
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=19311&edit=1