diff -ur trunk.v2/t3lib/class.t3lib_tceforms.php trunk.v3/t3lib/class.t3lib_tceforms.php
--- trunk.v2/t3lib/class.t3lib_tceforms.php 2010-11-16 16:00:35.000000000 +0100
+++ trunk.v3/t3lib/class.t3lib_tceforms.php 2010-11-16 15:34:07.000000000 +0100
@@ -1688,7 +1688,7 @@
}
// If there is an icon for the selector box (rendered in selicon-table below)...:
- // if there is an icon ($p[2]), icons shoulhd be shown, and, if only selected are visible, is it selected
+ // if there is an icon ($p[2]), icons should be shown, and, if only selected are visible, is it selected
if ($p[2] && !$suppressIcons && (!$onlySelectedIconShown || $sM)) {
list($selIconFile,$selIconInfo)=$this->getIcon($p[2]);
if (!empty($selIconInfo)) {
@@ -3919,8 +3919,7 @@
// Title / icon:
$iTitle = htmlspecialchars($this->sL($wConf['title']));
if ($wConf['icon']) {
- $iDat = $this->getIcon($wConf['icon']);
- $icon = '';
+ $icon = $this->getIconHtml($wConf['icon'], $iTitle, $iTitle);
} else {
$icon = $iTitle;
}
@@ -4125,6 +4124,24 @@
}
/**
+ * renders the $icon, supports a filename for skinImg or sprite-icon-name
+ * @param $icon the icon passed, could be a file-reference or a sprite Icon name
+ * @param string $alt alt attribute of the icon returned
+ * @param string $title title attribute of the icon return
+ * @return an tag representing to show the asked icon
+ */
+ protected function getIconHtml($icon, $alt = '', $title = '') {
+ $iconArray = $this->getIcon($icon);
+ debug($icon);
+ debug($iconArray);
+ if(is_file(PATH_typo3 . $iconArray[0])) {
+ return '';
+ } else {
+ return t3lib_iconWorks::getSpriteIcon($icon,array('alt'=> $alt, 'title'=> $title));
+ }
+ }
+
+ /**
* Creates style attribute content for option tags in a selector box, primarily setting it up to show the icon of an element as background image (works in mozilla)
*
* @param string Icon string for option item
@@ -6273,7 +6290,15 @@
}
}
- return ($this->cachedLanguageFlag[$mainKey][$sys_language_uid]['flagIcon'] ? '' : ($this->cachedLanguageFlag[$mainKey][$sys_language_uid]['title'] ? '['.$this->cachedLanguageFlag[$mainKey][$sys_language_uid]['title'].']' : '')).' ';
+ $out = '';
+ if ($this->cachedLanguageFlag[$mainKey][$sys_language_uid]['flagIcon']) {
+ $out .= t3lib_iconWorks::getSpriteIcon($this->cachedLanguageFlag[$mainKey][$sys_language_uid]['flagIcon']);
+ $out .= ' ';
+ } else if ($this->cachedLanguageFlag[$mainKey][$sys_language_uid]['title']) {
+ $out .= '[' . $this->cachedLanguageFlag[$mainKey][$sys_language_uid]['title'] . ']';
+ $out .= ' ';
+ }
+ return $out;
}
/**
@@ -6470,22 +6495,6 @@
public function addStyleSheet($key, $href, $title='', $relation='stylesheet') {
$GLOBALS['SOBE']->doc->addStyleSheet($key, $href, $title, $relation);
}
-
- /**
- * renders the $icon, supports a filename for skinImg or sprite-icon-name
- * @param $icon the icon passed, could be a file-reference or a sprite Icon name
- * @param string $alt alt attribute of the icon returned
- * @param string $title title attribute of the icon return
- * @return an tag representing to show the asked icon
- */
- protected function getIconHtml($icon, $alt = '', $title = '') {
- $iconArray = $this->getIcon($icon);
- if(is_file(PATH_typo3 . $iconArray[0])) {
- return '';
- } else {
- return t3lib_iconWorks::getSpriteIcon($icon,array('alt'=> $alt, 'title'=> $title));
- }
- }
}