Project

General

Profile

Bug #18867 » 8543_4.3.1.patch

Administrator Admin, 2010-01-15 16:01

View differences:

typo3_src/t3lib/class.t3lib_recordlist.php 2010-01-14 17:28:23.000000000 +0100
* @param integer Sys language uid
* @return string Language icon
*/
function languageFlag($sys_language_uid) {
function languageFlag($sys_language_uid, $showTitle = true) {
return ($this->languageIconTitles[$sys_language_uid]['flagIcon'] ? '<img src="'.$this->languageIconTitles[$sys_language_uid]['flagIcon'].'" class="absmiddle" alt="" />&nbsp;' : '').
htmlspecialchars($this->languageIconTitles[$sys_language_uid]['title']);
($showTitle ? htmlspecialchars($this->languageIconTitles[$sys_language_uid]['title']) : '');
}
/**
typo3_src/typo3/sysext/cms/layout/class.tx_cms_layout.php 2010-01-14 17:48:42.000000000 +0100
var $externalTables = array(); // Array of tables which is configured to be listed by the Web > Page module in addition to the default tables.
var $descrTable; // "Pseudo" Description -table name
var $defLangBinding=FALSE; // If set true, the language mode of tt_content elements will be rendered with hard binding between default language content elements and their translations!
var $showLanguageLabelInCE = false; // If set true, label for language will be shown in CE header
var $previewTextCropLength = 150; // sets length of preview text of CEs
var $columnWidth = 200; // fix width for columns
// External, static: Configuration of tt_content element display:
var $tt_contentConfig = Array (
......
$singleElementHTML.= $this->tt_content_drawHeader($row,$this->tt_contentConfig['showInfo']?15:5, $this->defLangBinding && $lP>0, TRUE);
$isRTE = $RTE && $this->isRTEforField('tt_content',$row,'bodytext');
$singleElementHTML.= '<div '.($row['_ORIG_uid'] ? ' class="ver-element"' :'').'>'.$this->tt_content_drawItem($row,$isRTE).'</div>';
$columnWidth = intval($this->columnWidth) > 0 ? 'style="width:' . ($this->columnWidth-6) . 'px;"' : '';
$singleElementHTML.= '<div ' . $columnWidth . ' ' .($row['_ORIG_uid'] ? ' class="ver-element"' : 'class="normal-element"').'>'.$this->tt_content_drawItem($row,$isRTE).'</div>';
if ($this->defLangBinding && $this->tt_contentConfig['languageMode']) {
$defLangBinding[$key][$lP][$row[($lP ? 'l18n_parent' : 'uid')]] = $singleElementHTML;
......
}
}
}
// CSH:
$out.= '<td valign="top">' . t3lib_BEfunc::cshItem($this->descrTable,'columns_multi',$GLOBALS['BACK_PATH']) . '</td>';
// Wrap the cells into a table row:
$columnWidth = intval($this->columnWidth) > 0 ? 'style="width:' . $this->columnWidth . 'px;"' : '';
$out = '
<table border="0" cellpadding="0" cellspacing="0" width="480" class="typo3-page-cols">
<table border="0" cellpadding="0" cellspacing="0" class="typo3-page-cols" ' . $columnWidth . '>
<tr>'.$out.'
</tr>
</table>';
// CSH:
$out.= t3lib_BEfunc::cshItem($this->descrTable,'columns_multi',$GLOBALS['BACK_PATH']);
}
// If language mode, then make another presentation:
......
}
// Finally, wrap it all in a table and add the language selector on top of it:
$columnWidth = intval($this->columnWidth) > 0 ? 'style="width:' . ($this->columnWidth-6) . 'px;"' : '';
$out = $languageSelector.'
<table border="0" cellpadding="0" cellspacing="0" width="480" class="typo3-page-langMode">
<table>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" class="typo3-page-langMode" ' . $columnWidth . '">
'.$out.'
</table>
</td>
<td valign="top">
' . t3lib_BEfunc::cshItem($this->descrTable,'language_list',$GLOBALS['BACK_PATH']) .
'</td>
</tr>
</table>';
// CSH:
$out.= t3lib_BEfunc::cshItem($this->descrTable,'language_list',$GLOBALS['BACK_PATH']);
}
} else { // SINGLE column mode (columns shown beneath each other):
#debug('single column');
......
}
// Finally, wrap all table rows in one, big table:
$columnWidth = intval($this->columnWidth) > 0 ? 'style="width:' . $this->columnWidth . 'px;"' : '';
$out = '
<table border="0" cellpadding="0" cellspacing="0" width="400" class="typo3-page-columnsMode">
<table border="0" cellpadding="0" cellspacing="0" class="typo3-page-columnsMode" ' . $columnWidth . '>
'.$out.'
</table>';
......
<tr>
<td>'.implode('</td>
<td>',$bArray).'</td>
<td>'.t3lib_BEfunc::cshItem($this->descrTable,'button_panel',$GLOBALS['BACK_PATH']).'</td>
</tr>
</table>
<img src="clear.gif" width="1" height="5" alt="" /><br />
'.t3lib_BEfunc::cshItem($this->descrTable,'button_panel',$GLOBALS['BACK_PATH']). // CSH
</table>' . '<br />' .
$out;
}
......
* @return string HTML table
*/
function tt_content_drawColHeader($colName,$editParams,$newParams) {
// Create header row:
$out = '
<tr>
<td class="bgColor2" nowrap="nowrap"><img src="clear.gif" width="1" height="2" alt="" /><br /><div align="center"><b>' . htmlspecialchars($GLOBALS['LANG']->csConvObj->conv_case($GLOBALS['LANG']->charSet, $colName, 'toUpper')) . '</b></div><img src="clear.gif" width="1" height="2" alt="" /></td>
</tr>';
// Create command links:
if ($this->tt_contentConfig['showCommands']) {
// Start cell:
$out.= '
<tr>
<td class="bgColor5">';
// Edit whole of column:
if ($editParams) {
$out.='<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($editParams,$this->backPath)).'">'.
$icon['edit'] = '<a class="right" href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($editParams,$this->backPath)).'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/edit2.gif','width="11" height="12"').' title="'.$GLOBALS['LANG']->getLL('editColumn',1).'" alt="" />'.
'</a>';
}
// New record:
if ($newParams) {
$out.='<a href="#" onclick="'.htmlspecialchars($newParams).'">'.
$icon['new'] = '<a class="left" href="#" onclick="'.htmlspecialchars($newParams).'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/new_record.gif','width="16" height="12"').' title="'.$GLOBALS['LANG']->getLL('newInColumn',1).'" alt="" />'.
'</a>';
}
// End cell:
$out.= '
}
// Create header row:
$out = '
<tr class="colHeader">
<td class="bgColor2" nowrap="nowrap">
<div>
' . $icon['edit'] . $icon['new'] . '
<b>' . htmlspecialchars(strtoupper($colName)) . '</b>
</div>
</td>
</tr>';
}
// Wrap and return:
$columnWidth = intval($this->columnWidth) > 0 ? 'style="width:' . $this->columnWidth . 'px;"' : '';
return '
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="typo3-page-colHeader">'.($space?'
<table border="0" cellpadding="0" cellspacing="0" class="typo3-page-colHeader" ' . $columnWidth . '>'.($space?'
<tr>
<td><img src="clear.gif" height="'.$space.'" alt="" /></td>
</tr>':'').
......
}
}
// Create header with icon/lock-icon/title:
$header = $this->getIcon('tt_content',$row).
$lockIcon.
$stat.
($langMode ? $this->languageFlag($row['sys_language_uid']) : '').
'&nbsp;<b>'.htmlspecialchars($this->CType_labels[$row['CType']]).'</b>';
$out = '
<tr>
<td class="bgColor4">'.$header.'</td>
</tr>';
// If show info is set...;
if ($this->tt_contentConfig['showInfo']) {
// Get processed values:
$info = Array();
$this->getProcessedValue('tt_content','hidden,starttime,endtime,fe_group,spaceBefore,spaceAfter,section_frame,sectionIndex,linkToTop',$row,$info);
// Render control panel for the element:
if ($this->tt_contentConfig['showCommands'] && $this->doEdit) {
// Start control cell:
$out.= '
<!-- Control Panel -->
<tr>
<td class="bgColor5">';
$icon['space'] = '<img src="clear.gif" width="11" height="10" alt="" />';
// Edit content element:
$params='&edit[tt_content]['.$this->tt_contentData['nextThree'][$row['uid']].']=edit';
$out.='<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->backPath)).'">'.
$icon['edit'] = '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->backPath)).'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/edit2.gif','width="11" height="12"').' title="'.htmlspecialchars($this->nextThree>1?sprintf($GLOBALS['LANG']->getLL('nextThree'),$this->nextThree):$GLOBALS['LANG']->getLL('edit')).'" alt="" />'.
'</a>';
......
$params='&edit[tt_content]['.(-$row['uid']).']=new';
$onClick = t3lib_BEfunc::editOnClick($params,$this->backPath);
}
$out.='<a href="#" onclick="'.htmlspecialchars($onClick).'">'.
$icon['new'] = '<a href="#" onclick="'.htmlspecialchars($onClick).'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/new_record.gif','width="16" height="12"').' title="'.$GLOBALS['LANG']->getLL('newAfter',1).'" alt="" />'.
'</a>';
// Move element up:
if ($this->tt_contentData['prev'][$row['uid']]) {
$params='&cmd[tt_content]['.$row['uid'].'][move]='.$this->tt_contentData['prev'][$row['uid']];
$out.='<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'">'.
$icon['up'] = '<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_up.gif','width="11" height="10"').' title="'.$GLOBALS['LANG']->getLL('moveUp',1).'" alt="" />'.
'</a>';
} else {
$out.='<img src="clear.gif" '.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_up.gif','width="11" height="10"',2).' alt="" />';
$icon['up'] = '<img src="clear.gif" '.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_up.gif','width="11" height="10"',2).' alt="" />';
}
// Move element down:
if ($this->tt_contentData['next'][$row['uid']]) {
$params='&cmd[tt_content]['.$row['uid'].'][move]='.$this->tt_contentData['next'][$row['uid']];
$out.='<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'">'.
$icon['down'] = '<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_down.gif','width="11" height="10"').' title="'.$GLOBALS['LANG']->getLL('moveDown',1).'" alt="" />'.
'</a>';
} else {
$out.='<img src="clear.gif" '.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_down.gif','width="11" height="10"',2).' alt="" />';
$icon['down'] = '<img src="clear.gif" '.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_down.gif','width="11" height="10"',2).' alt="" />';
}
}
......
if ($hiddenField && $TCA['tt_content']['columns'][$hiddenField] && (!$TCA['tt_content']['columns'][$hiddenField]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields','tt_content:'.$hiddenField))) {
if ($row[$hiddenField]) {
$params='&data[tt_content]['.($row['_ORIG_uid'] ? $row['_ORIG_uid'] : $row['uid']).']['.$hiddenField.']=0';
$out.='<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'">'.
$icon['hide'] = '<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_unhide.gif','width="11" height="10"').' title="'.$GLOBALS['LANG']->getLL('unHide',1).'" alt="" />'.
'</a>';
} else {
$params='&data[tt_content]['.($row['_ORIG_uid'] ? $row['_ORIG_uid'] : $row['uid']).']['.$hiddenField.']=1';
$out.='<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'">'.
$icon['hide'] = '<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_hide.gif','width="11" height="10"').' title="'.$GLOBALS['LANG']->getLL('hide',1).'" alt="" />'.
'</a>';
}
......
$params='&cmd[tt_content]['.$row['uid'].'][delete]=1';
$confirm = $GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->getLL('deleteWarning') .
t3lib_BEfunc::translationCount('tt_content', $row['uid'], ' ' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.translationsOfRecord')));
$out.='<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'" onclick="'.htmlspecialchars('return confirm('. $confirm .');').'">'.
$icon['delete'] = '<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'" onclick="'.htmlspecialchars('return confirm('. $confirm .');').'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/garbage.gif','width="11" height="12"').' title="'.$GLOBALS['LANG']->getLL('deleteItem',1).'" alt="" />'.
'</a>';
// End cell:
// control cell:
$out.= '
<!-- Control Panel -->
<tr>
<td class="bgColor5">
<div style="float:left;">
' . $icon['edit'] . $icon['hide'] . $icon['space'] . $icon['new'] . $icon['space'] . $icon['info'] . $icon['space'] . $icon['delete'] . '
</div>
<div style="float:right;">
' . $icon['up'] . $icon['down'] . '
</div>
</td>
</tr>';
}
// Display info from records fields:
if (count($info)) {
$out.= '
<tr>
<td class="bgColor4-20">'.implode('<br />',$info).'</td>
</tr>';
//gather infos
$info = $infoArr = array();
$this->getProcessedValue('tt_content', 'hidden,starttime,endtime,fe_group,spaceBefore,spaceAfter,section_frame,sectionIndex,linkToTop', $row, $info);
$this->getProcessedValue('tt_content', 'header_position,header_layout,header_link', $row, $infoArr);
if(count($infoArr)) {
$infoArr[0] = '<b>HEADER: </b><br />' . $infoArr[0];
$info = array_merge($info, $infoArr);
$infoArr = array();
}
if (in_array($row['CType'], array('textpic', 'text', 'bullets'))) {
$this->getProcessedValue('tt_content', 'text_align,text_face,text_size,text_color,text_properties', $row, $infoArr);
if(count($infoArr)) {
$infoArr[0] = '<b>TEXT: </b><br />' . $infoArr[0];
$info = array_merge($info, $infoArr);
$infoArr = array();
}
}
if (in_array($row['CType'], array('textpic', 'image', 'splash'))) {
$this->getProcessedValue('tt_content', 'imageorient,imagecols,image_noRows,imageborder,imageheight,image_link,image_zoom,image_compression,image_effects,image_frames', $row, $infoArr);
if(count($infoArr)) {
$infoArr[0] = '<b>IMAGE: </b><br />' . $infoArr[0];
$info = array_merge($info, $infoArr);
$infoArr = array();
}
}
if ($row['CType'] == 'table' ) {
$this->getProcessedValue('tt_content','table_bgColor,table_border,table_cellspacing,cols,layout,text_align,text_face,text_size,text_color,text_properties',$row,$infoArr);
if(count($infoArr)) {
$infoArr[0] = '<b>TABLE: </b><br />' . $infoArr[0];
$info = array_merge($info, $infoArr);
$infoArr = array();
}
}
if ($row['CType'] == 'uploads' ) {
$this->getProcessedValue('tt_content','media,select_key,layout,filelink_size,table_bgColor,table_border,table_cellspacing',$row,$infoArr);
if(count($infoArr)) {
$infoArr[0] = '<b>UPLOADS: </b><br />' . $infoArr[0];
$info = array_merge($info, $infoArr);
$infoArr = array();
}
}
if ($row['CType'] == 'mailform' ) {
$this->getProcessedValue('tt_content','pages,subheader',$row,$infoArr);
if(count($infoArr)) {
$infoArr[0] = '<b>MAILFORM: </b><br />' . $infoArr[0];
$info = array_merge($info, $infoArr);
$infoArr = array();
}
}
if ($row['CType'] == 'menu' ) {
$this->getProcessedValue('tt_content','menu_type',$row,$infoArr);
if(count($infoArr)) {
$infoArr[0] = '<b>MENU: </b><br />' . $infoArr[0];
$info = array_merge($info, $infoArr);
$infoArr = array();
}
}
if ($row['CType'] == 'shortcut' ) {
$this->getProcessedValue('tt_content','layout',$row,$infoArr);
if(count($infoArr)) {
$infoArr[0] = '<b>SHORTCUT: </b><br />' . $infoArr[0];
$info = array_merge($info, $infoArr);
$infoArr = array();
}
}
if ($row['CType'] == 'list' ) {
$this->getProcessedValue('tt_content','layout, recursive',$row,$infoArr);
if(count($infoArr)) {
$infoArr[0] = '<b>LIST: </b><br />' . $infoArr[0];
$info = array_merge($info, $infoArr);
$infoArr = array();
}
}
}
// Create header with icon/lock-icon/title:
$header = '<span style="float:left;">' . $this->getIcon('tt_content',$row, count($info) ? implode("<br />",$info) : '').
$lockIcon.
$stat.
'&nbsp;<b>'.htmlspecialchars($this->CType_labels[$row['CType']]).'</b></span>' .
($langMode ? '<span style="float:right;">' . $this->languageFlag($row['sys_language_uid'], $this->dontShowLanguageLabelInCE). '</span>' : '');
$out = '
<tr class="ceHeader">
<td class="bgColor4">'.$header.'</td>
</tr>' . $out;
// Wrap the whole header in a table:
$columnWidth = intval($this->columnWidth) > 0 ? 'style="width:' . $this->columnWidth . 'px;"' : '';
return '
<table border="0" cellpadding="0" cellspacing="0" class="typo3-page-ceHeader">'.($space?'
<table border="0" cellpadding="0" cellspacing="0" class="typo3-page-ceHeader" ' . $columnWidth . '>'.($space?'
<tr>
<td><img src="clear.gif" height="'.$space.'" alt="" /></td>
</tr>':'').
......
$hiddenHeaderNote = ' <em>[' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.hidden', true) . ']</em>';
}
$outHeader= ($row['date'] ? htmlspecialchars($this->itemLabels['date'].' '.t3lib_BEfunc::date($row['date'])).'<br />':'').
$this->infoGif($infoArr).
#$this->infoGif($infoArr).
'<b>' . $this->linkEditContent($this->renderText($row['header']), $row) . $hiddenHeaderNote . '</b><br />';
}
......
switch($row['CType']) {
case 'header':
if ($row['subheader']) {
$this->getProcessedValue('tt_content','layout',$row,$infoArr);
$out.= $this->infoGif($infoArr).
$this->linkEditContent($this->renderText($row['subheader']),$row).'<br />';
$out.= $this->linkEditContent($this->renderText($row['subheader']),$row).'<br />';
}
break;
case 'text':
......
case 'image':
if ($row['CType']=='text' || $row['CType']=='textpic') {
if ($row['bodytext']) {
$this->getProcessedValue('tt_content','text_align,text_face,text_size,text_color,text_properties',$row,$infoArr);
$out.= $this->infoGif($infoArr).
$this->linkEditContent($this->renderText($row['bodytext']),$row).'<br />';
$out.= $this->linkEditContent($this->renderText($row['bodytext']),$row).'<br />';
}
}
if ($row['CType']=='textpic' || $row['CType']=='image') {
if ($row['image']) {
$infoArr=Array();
$this->getProcessedValue('tt_content','imageorient,imagecols,image_noRows,imageborder,imageheight,image_link,image_zoom,image_compression,image_effects,image_frames',$row,$infoArr);
$out.= $this->infoGif($infoArr).
$this->thumbCode($row,'tt_content','image').'<br />';
$out.= $this->thumbCode($row,'tt_content','image').'<br />';
if ($row['imagecaption']) {
$infoArr=Array();
$this->getProcessedValue('tt_content','imagecaption_position',$row,$infoArr);
$out.= $this->infoGif($infoArr).
$this->linkEditContent($this->renderText($row['imagecaption']),$row).'<br />';
$out.= $this->linkEditContent($this->renderText($row['imagecaption']),$row).'<br />';
}
}
}
break;
case 'bullets':
if ($row['bodytext']) {
$this->getProcessedValue('tt_content','layout,text_align,text_face,text_size,text_color,text_properties',$row,$infoArr);
$out.= $this->infoGif($infoArr).
$this->linkEditContent($this->renderText($row['bodytext']),$row).'<br />';
$out.= $this->linkEditContent($this->renderText($row['bodytext']),$row).'<br />';
}
break;
case 'table':
if ($row['bodytext']) {
$this->getProcessedValue('tt_content','table_bgColor,table_border,table_cellspacing,cols,layout,text_align,text_face,text_size,text_color,text_properties',$row,$infoArr);
$out.= $this->infoGif($infoArr).
$this->linkEditContent($this->renderText($row['bodytext']),$row).'<br />';
$out.= $this->linkEditContent($this->renderText($row['bodytext']),$row).'<br />';
}
break;
case 'uploads':
if ($row['media']) {
$this->getProcessedValue('tt_content','media,select_key,layout,filelink_size,table_bgColor,table_border,table_cellspacing',$row,$infoArr);
$out.= $this->infoGif($infoArr).
$this->linkEditContent($this->renderText($row['bodytext']),$row).'<br />';
$out.= $this->linkEditContent($this->renderText($row['bodytext']),$row).'<br />';
}
break;
case 'multimedia':
if ($row['multimedia']) {
$out.= $this->renderText($row['multimedia']).'<br />';
$out.= $this->renderText($row['parameters']).'<br />';
$out.= $this->linkEditContent($this->renderText($row['multimedia']) . '<br />' .
$this->renderText($row['parameters']) . '<br />');
}
break;
case 'mailform':
if ($row['bodytext']) {
$this->getProcessedValue('tt_content','pages,subheader',$row,$infoArr);
$out.= $this->infoGif($infoArr).
$this->linkEditContent($this->renderText($row['bodytext']),$row).'<br />';
$out.= $this->linkEditContent($this->renderText($row['bodytext']),$row).'<br />';
}
break;
case 'splash':
......
$out.= $this->linkEditContent($this->renderText($row['bodytext']),$row).'<br />';
}
if ($row['image']) {
$infoArr=Array();
$this->getProcessedValue('tt_content','imagewidth',$row,$infoArr);
$out.= $this->infoGif($infoArr).
$this->thumbCode($row,'tt_content','image').'<br />';
$out.= $this->thumbCode($row,'tt_content','image').'<br />';
}
break;
case 'menu':
if ($row['pages']) {
$this->getProcessedValue('tt_content','menu_type',$row,$infoArr);
$out.= $this->infoGif($infoArr).
$this->linkEditContent($row['pages'],$row).'<br />';
$out.= $this->linkEditContent($row['pages'],$row).'<br />';
}
break;
case 'shortcut':
if ($row['records']) {
$this->getProcessedValue('tt_content','layout',$row,$infoArr);
$out.= $this->infoGif($infoArr).
$this->linkEditContent($row['shortcut'],$row).'<br />';
$out.= $this->linkEditContent($row['shortcut'],$row).'<br />';
}
break;
case 'list':
$this->getProcessedValue('tt_content','layout',$row,$infoArr);
$out.= $this->infoGif($infoArr).
$GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel('tt_content','list_type'),1).' '.
$GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content','list_type',$row['list_type']),1).'<br />';
$out.= $this->linkEditContent($GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel('tt_content', 'list_type'), 1) . ' ' . $GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content','list_type', $row['list_type']), 1) . '<br />', $row);
$hookArr = array();
$hookOut = '';
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info'][$row['list_type']])) {
......
if (strcmp($hookOut, '')) {
$out .= $hookOut;
} else {
$out.= $GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel('tt_content','select_key'),1).' '.$row['select_key'].'<br />';
$out.= $this->linkEditContent($GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel('tt_content','select_key'),1).' '.$row['select_key'].'<br />', $row);
}
$infoArr=Array();
$this->getProcessedValue('tt_content','recursive',$row,$infoArr);
$out.= $this->infoGif($infoArr).
$GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content','pages',$row['pages']),1).'<br />';
$out.= $this->linkEditContent($GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content', 'pages', $row['pages']),1) . '<br />', $row);
break;
case 'script':
$out.= $GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel('tt_content','select_key'),1).' '.$row['select_key'].'<br />';
......
*/
function renderText($input) {
$input = $this->strip_tags($input, true);
$input = t3lib_div::fixed_lgd_cs($input,1500);
$input = t3lib_div::fixed_lgd_cs($input, $this->previewTextCropLength);
return nl2br(htmlspecialchars(trim($this->wordWrapper($input))));
}
......
* @param string Record title (NOT USED)
* @return string HTML for the icon
*/
function getIcon($table,$row) {
function getIcon($table, $row, $additionalInfo = '') {
// Initialization
$alttext = t3lib_BEfunc::getRecordIconAltText($row,$table);
$iconImg = t3lib_iconWorks::getIconImage($table,$row,$this->backPath,'title="'.$alttext.'"');
if ($additionalInfo) {
$alttext .= '<br />' . $additionalInfo;
}
$alttext = '<span class="typo3-csh-inline"><span class="header">INFO (click for context menu)</span><br />
<span class="paragraph">' . $alttext . '</span></span>';
$iconImg = t3lib_iconWorks::getIconImage($table,$row,$this->backPath) . $alttext;
$this->counter++;
// The icon with link
$theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg,$table,$row['uid']);
$theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg,$table,$row['uid'], 1, '', '', false, 'class="typo3-csh-link"');
return $theIcon;
}
typo3_src/typo3/sysext/cms/layout/db_layout.php 2010-01-14 17:28:23.000000000 +0100
$docHeaderButtons = $this->getButtons($this->MOD_SETTINGS['function']==0 ? 'quickEdit' : '');
$markers = array(
'CSH' => $docHeaderButtons['csh'],
'TOP_FUNCTION_MENU' => $this->editSelect . $this->topFuncMenu,
'TOP_FUNCTION_MENU' => $this->topFuncMenu . $this->editSelect,
'LANGSELECTOR' => $this->languageMenu,
'CONTENT' => $body
);
......
$dblist->id = $this->id;
$dblist->nextThree = t3lib_div::intInRange($this->modTSconfig['properties']['editFieldsAtATime'],0,10);
$dblist->option_showBigButtons = $this->modTSconfig['properties']['disableBigButtons'] ? 0 : 1;
$dblist->columnWidth = $this->modTSconfig['properties']['columnWidth'] ? $this->modTSconfig['properties']['columnWidth'] : 200;
$dblist->showLanguageLabelInCE = $this->modTSconfig['properties']['showLanguageLabelInCE'] ? 1 : 0;
$dblist->option_newWizard = $this->modTSconfig['properties']['disableNewContentElementWizard'] ? 0 : 1;
$dblist->defLangBinding = $this->modTSconfig['properties']['defLangBinding'] ? 1 : 0;
if (!$dblist->nextThree) $dblist->nextThree = 1;
typo3_src/typo3/sysext/t3skin/stylesheets/ext-cms-layout-db-layout-php.css 2010-01-14 17:28:23.000000000 +0100
table.typo3-page-pages tr td.c-headLine {
background-color: #D7DBE2;
}
table.typo3-page-colHeader tr.colHeader td {
background-color: #B8BEC9;
background-image: url(../icons/gfx/shortcut_background.gif);
background-repeat: repeat-x;
padding-bottom: 2px;
padding-top: 2px;
}
table.typo3-page-colHeader tr.colHeader td div {
text-align: center;
color: #333;
padding-top: 2px;
}
table.typo3-page-colHeader tr.colHeader td div a.left {
float: left;
}
table.typo3-page-colHeader tr.colHeader td div a.right {
float: right;
}
table.typo3-page-ceHeader tr.ceHeader td {
background-color: #B8BEC9;
background-image: url('../icons/gfx/alt_menu_mainitem_bg.gif');
background-repeat: repeat-x;
color: #fff;
}
td.bgColor5 div {
padding-top: 4px;
}
div.normal-element {
border-left: 1px solid #D7DBE2;
border-right: 1px solid #D7DBE2;
border-bottom: 1px solid #D7DBE2;
padding: 2px;
min-height: 24px;
overflow: hidden;
background-color: #E4E5F0;
}
typo3_src/typo3/template.php 2010-01-14 17:28:23.000000000 +0100
* @param string Additional GET parameters for the link to alt_clickmenu.php
* @param string Enable / Disable click menu items. Example: "+new,view" will display ONLY these two items (and any spacers in between), "new,view" will display all BUT these two items.
* @param boolean If set, will return only the onclick JavaScript, not the whole link.
* @param string Additional link parameter eg for CSS class
* @return string The link-wrapped input string.
*/
function wrapClickMenuOnIcon($str,$table,$uid='',$listFr=1,$addParams='',$enDisItems='', $returnOnClick=FALSE) {
function wrapClickMenuOnIcon($str,$table,$uid='',$listFr=1,$addParams='',$enDisItems='', $returnOnClick=FALSE, $linkParams='') {
$backPath = rawurlencode($this->backPath).'|'.t3lib_div::shortMD5($this->backPath.'|'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']);
$onClick = 'showClickmenu("'.$table.'","'.$uid.'","'.$listFr.'","'.str_replace('+','%2B',$enDisItems).'","'.str_replace('&','&amp;',addcslashes($backPath,'"')).'","'.str_replace('&','&amp;',addcslashes($addParams,'"')).'");return false;';
return $returnOnClick ? $onClick : '<a href="#" onclick="'.htmlspecialchars($onClick).'"'.($GLOBALS['TYPO3_CONF_VARS']['BE']['useOnContextMenuHandler'] ? ' oncontextmenu="'.htmlspecialchars($onClick).'"' : '').'>'.$str.'</a>';
return $returnOnClick ? $onClick : '<a ' . $linkParams . 'href="#" onclick="'.htmlspecialchars($onClick).'"'.($GLOBALS['TYPO3_CONF_VARS']['BE']['useOnContextMenuHandler'] ? ' oncontextmenu="'.htmlspecialchars($onClick).'"' : '').'>'.$str.'</a>';
}
/**
(7-7/7)