[Pieforms-commit] SF.net SVN: pieforms: [269] pieforms-php5/trunk/src/pieform.php
Status: Alpha
Brought to you by:
oracleshinoda
From: <ora...@us...> - 2008-01-03 08:55:49
|
Revision: 269 http://pieforms.svn.sourceforge.net/pieforms/?rev=269&view=rev Author: oracleshinoda Date: 2008-01-03 00:55:52 -0800 (Thu, 03 Jan 2008) Log Message: ----------- Now pieform_get_headdata will output the tags for the pieforms.js file. Another configuration parameter - jsincludepath - has been added to assist with this, but that configuration parameter should be set statically rather than for each form. When it comes time for the head data to be retrieved, the last form created has its jsincludepath used, above all others. This doesn't matter too much when you use pieform_configure. Modified Paths: -------------- pieforms-php5/trunk/src/pieform.php Modified: pieforms-php5/trunk/src/pieform.php =================================================================== --- pieforms-php5/trunk/src/pieform.php 2007-12-31 12:16:36 UTC (rev 268) +++ pieforms-php5/trunk/src/pieform.php 2008-01-03 08:55:52 UTC (rev 269) @@ -1308,6 +1308,11 @@ // supported in less browsers. Most modern browsers should be fine) 'jsform' => false, + // The URL where pieforms.js and other related pieforms javascript + // files can be accessed. Best specified as an absolute path in + // pieform_configure() + 'jsincludepath' => '', + // The javascript function called before submission of a form // (regardless of whether the form is a jsform) 'presubmitcallback' => '', @@ -1445,6 +1450,12 @@ } } + // TODO: jsincludepath should be independent of ANY form + array_unshift($htmlelements, '<script type="text/javascript" src="' + . Pieform::hsc($form->get_property('jsincludepath')) . 'pieforms.js"></script>'); + array_unshift($htmlelements, '<script type="text/javascript">pieformPath = "' + . Pieform::hsc($form->get_property('jsincludepath')) . '";</script>'); + return array_unique($htmlelements); }/*}}}*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |