diff -ru typo3_trunk/t3lib/class.t3lib_iconworks.php typo3_poligon/t3lib/class.t3lib_iconworks.php --- typo3_trunk/t3lib/class.t3lib_iconworks.php 2010-12-10 18:56:04.566598078 +0200 +++ typo3_poligon/t3lib/class.t3lib_iconworks.php 2010-12-10 18:59:27.422594592 +0200 @@ -915,6 +915,28 @@ 'noIconFound' => ($row['_NO_ICON_FOUND'] ? TRUE : FALSE), ); + + // Add custom status icons from TCA + if(is_array($tcaCtrl['status_fields'])) { + foreach($tcaCtrl['status_fields'] as $fldName => $fldConfig) { + if($tcaCtrl['enablecolumns'][$fldName]) { + // Extend default statuses + $status[$fldName] = ($row[$fldName] ? TRUE : FALSE); + + // Add configured icon to sprite + t3lib_SpriteManager::addSingleIcons(array( + $fldName => $fldConfig['icon'], + )); + + // Append name to global priority array. Make it last in queue. + array_push($GLOBALS['TBE_STYLES']['spriteIconApi']['spriteIconRecordOverlayPriorities'], $fldName); + + // Extend sprites class mapping + $GLOBALS['TBE_STYLES']['spriteIconApi']['spriteIconRecordOverlayNames'][$fldName] = 'extensions--'.$fldName; + } + } + } + // Icon state based on "enableFields": if (is_array($tcaCtrl['enablecolumns'])) { $enCols = $tcaCtrl['enablecolumns']; @@ -1018,4 +1040,4 @@ } -?> \ No newline at end of file +?> diff -ru typo3_trunk/typo3/class.webpagetree.php typo3_poligon/typo3/class.webpagetree.php --- typo3_trunk/typo3/class.webpagetree.php 2010-12-10 18:57:26.702596895 +0200 +++ typo3_poligon/typo3/class.webpagetree.php 2010-12-10 19:00:39.490593010 +0200 @@ -74,12 +74,22 @@ var $ext_alphasortNotinmenuPages; var $ajaxStatus = false; // Indicates, whether the ajax call was successful, i.e. the requested page has been found + /** * Calls init functions * * @return void */ function webPageTree() { + + // Extend default status fields with custom + if(is_array($GLOBALS['TCA']['pages']['ctrl']['status_fields'])) { + $this->fieldArray = array_merge( + $this->fieldArray, + array_keys($GLOBALS['TCA']['pages']['ctrl']['status_fields']) + ); + } + $this->init(); } @@ -521,4 +531,4 @@ include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/class.webpagetree.php']); } -?> \ No newline at end of file +?>