Index: t3lib/extjs/dataprovider/class.extdirect_dataprovider_contexthelp.php =================================================================== --- t3lib/extjs/dataprovider/class.extdirect_dataprovider_contexthelp.php (revision 10121) +++ t3lib/extjs/dataprovider/class.extdirect_dataprovider_contexthelp.php (revision ) @@ -48,6 +48,46 @@ 'moreInfo' => $helpTextArray['moreInfo'] ); } + + /** + * Fetch the context help for the given table + * + * @param string $table table identifier + * @return array complete help information + */ + public function getTableContextHelp($table) { + $output = array(); + if (!isset($GLOBALS['TCA_DESCR'][$table]['columns'])) { + $GLOBALS['LANG']->loadSingleTableDescription($table); -} + } + if (is_array($GLOBALS['TCA_DESCR'][$table]) && is_array($GLOBALS['TCA_DESCR'][$table]['columns'])) { + foreach ($GLOBALS['TCA_DESCR'][$table]['columns'] as $field => $data) { + $output[$field] = array( + 'description' => NULL, + 'title' => $data['title'], + 'moreInfo' => FALSE, + 'id' => $table . '.' . $field, + ); + // add alternative title, if defined + if ($data['alttitle']) { + $output[$field]['title'] = $data['alttitle']; + } + + // if we have more information to show + if ($data['image_descr'] || $data['seeAlso'] || $data['details'] || $data['syntax']) { + $output[$field]['moreInfo'] = TRUE; + } + + // add description + if ($data['description']) { + $output[$field]['description'] = $data['description']; + } + } + } + + return $output; + } +} + ?> Index: t3lib/js/extjs/contexthelp.js =================================================================== --- t3lib/js/extjs/contexthelp.js (revision 10276) +++ t3lib/js/extjs/contexthelp.js (revision ) @@ -68,11 +68,15 @@ title: '' }); // Load content - TYPO3.CSH.ExtDirect.getContextHelp(table, field, function(response, options) { - cshHelp.add(response); - updateTip(response); + TYPO3.CSH.ExtDirect.getTableContextHelp(table, function(response, options) { + Ext.iterate(response, function(key, value){ + cshHelp.add(value); + if (key === field) { + updateTip(value); - // Need to re-position because the height may have increased - tip.show(); + // Need to re-position because the height may have increased + tip.show(); + } + }); }, this); // No table was given, use directly title and description