? index_ts.php
? media
? showpic.php
? tslib
? t3lib/class.t3lib_tceforms-TH.php
? t3lib/class.t3lib_tcemain-TH.php
? typo3/gfx
? typo3/t3lib
? typo3/thumbs.php
Index: t3lib/class.t3lib_tceforms.php
===================================================================
RCS file: /cvsroot/typo3/TYPO3core/t3lib/class.t3lib_tceforms.php,v
retrieving revision 1.68.2.4
diff -u -r1.68.2.4 class.t3lib_tceforms.php
--- t3lib/class.t3lib_tceforms.php 19 Jan 2006 14:00:41 -0000 1.68.2.4
+++ t3lib/class.t3lib_tceforms.php 22 Jan 2006 19:56:51 -0000
@@ -939,6 +939,16 @@
$item.=''; // This is the ACTUAL form field - values from the EDITABLE field must be transferred to this field which is the one that is written to the database.
$this->extJSCODE.='typo3FormFieldSet('.$paramsList.');';
+ // going through all custom evaluations configured for this field
+ foreach ($evalList as $evalData) {
+ if (substr($evalData, 0, 3) == 'tx_') {
+ $evalObj = t3lib_div::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$evalData].':&'.$evalData);
+ if(is_object($evalObj) && method_exists($evalObj, 'returnFieldJS')) {
+ $this->extJSCODE .= "\n\nfunction ".$evalData."(value) {\n".$evalObj->returnFieldJS($funcName)."\n}\n";
+ }
+ }
+ }
+
// Creating an alternative item without the JavaScript handlers.
$altItem = '';
$altItem.= '';
Index: t3lib/class.t3lib_tcemain.php
===================================================================
RCS file: /cvsroot/typo3/TYPO3core/t3lib/class.t3lib_tcemain.php,v
retrieving revision 1.65.2.8
diff -u -r1.65.2.8 class.t3lib_tcemain.php
--- t3lib/class.t3lib_tcemain.php 19 Jan 2006 16:32:00 -0000 1.65.2.8
+++ t3lib/class.t3lib_tcemain.php 22 Jan 2006 17:24:13 -0000
@@ -1789,6 +1789,14 @@
case 'alphanum_x':
$value = ereg_replace('[^a-zA-Z0-9_-]','',$value);
break;
+ default:
+ if (substr($func, 0, 3) == 'tx_') {
+ $evalObj = t3lib_div::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func].':&'.$func);
+ if(is_object($evalObj) && method_exists($evalObj, 'evaluateFieldValue')) {
+ $value = $evalObj->evaluateFieldValue($value, $is_in, &$set);
+ }
+ }
+ break;
}
}
if ($set) {$res['value'] = $value;}
Index: t3lib/jsfunc.evalfield.js
===================================================================
RCS file: /cvsroot/typo3/TYPO3core/t3lib/jsfunc.evalfield.js,v
retrieving revision 1.4
diff -u -r1.4 jsfunc.evalfield.js
--- t3lib/jsfunc.evalfield.js 4 Oct 2005 11:58:14 -0000 1.4
+++ t3lib/jsfunc.evalfield.js 22 Jan 2006 19:36:42 -0000
@@ -59,7 +59,13 @@
var theEvalType = (FObj.evallist) ? this.split(evallist, ",", index) : false;
var newValue=value;
while (theEvalType) {
- newValue = evalFunc.input(theEvalType, newValue);
+ if (theEvalType.slice(0, 3) == 'tx_') {
+ if(typeof window[theEvalType] == 'function') {
+ newValue = window[theEvalType](newValue); // variable function call, calling functions like tx_myext_myeval(value)
+ }
+ } else {
+ newValue = evalFunc.input(theEvalType, newValue);
+ }
index++;
theEvalType = this.split(evallist, ",", index);
}