Commit e706019b authored by Wouter Wolters's avatar Wouter Wolters Committed by Christian Kuhn
Browse files

[TASK] Get rid of "clear.gif" usages

Replace them with a <span>

Resolves: #68025
Releases: master
Change-Id: I8c138b0402a98eb10ceebb80681fa0e4ddbaa401
Reviewed-on: http://review.typo3.org/42313


Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent c1025c56
......@@ -38,11 +38,7 @@ class ClearGifContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractCo
if (!$wrap) {
$wrap = '|<br />';
}
$theValue = $this->cObj->wrap('<img
src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif"
width="' . $width . '"
height="' . $height . '"' . $this->cObj->getBorderAttr(' border="0"') . '
alt="" />', $wrap);
$theValue = $this->cObj->wrap('<span style="width: ' . $width . 'px; height: ' . $height . 'px;"></span>', $wrap);
if (isset($conf['stdWrap.'])) {
$theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']);
}
......
......@@ -73,17 +73,17 @@ class ColumnsContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractCon
if ($gapLine) {
$gapSurround = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange(($gapWidth - $gapLine) / 2, 1, 1000);
// right gap
$content .= '<td' . $tdPar . '><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' . $gapSurround . '" height="1" alt="" title="" /></td>';
$content .= '<td' . $tdPar . '><span style="width: ' . $gapSurround . 'px; height: 1px;"></span></td>';
$tdRowCount++;
// line:
$GtdPar = $gapConf['gapLineCol'] ? ' bgcolor="' . $gapConf['gapLineCol'] . '"' : ' bgcolor="black"';
$content .= '<td' . $GtdPar . '><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' . $gapLine . '" height="1" alt="" title="" /></td>';
$content .= '<td' . $GtdPar . '><span style="width: ' . $gapLine . 'px; height: 1px;"></span></td>';
$tdRowCount++;
// left gap
$content .= '<td' . $tdPar . '><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' . $gapSurround . '" height="1" alt="" title="" /></td>';
$content .= '<td' . $tdPar . '><span style="width: ' . $gapSurround . 'px; height: 1px;"></span></td>';
$tdRowCount++;
} else {
$content .= '<td' . $tdPar . '><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' . $gapWidth . '" height="1" alt="" title="" /></td>';
$content .= '<td' . $tdPar . '><span style="width: ' . $gapWidth . 'px; height: 1px;"></span></td>';
$tdRowCount++;
}
}
......
......@@ -44,22 +44,15 @@ class HorizontalRulerContentObject extends \TYPO3\CMS\Frontend\ContentObject\Abs
summary=""><tr>';
if ($spaceBefore) {
$theValue .= '<td width="1">
<img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif"
width="' . $spaceBefore . '"
height="1" alt="" title="" />
<span style="width: ' . $spaceBefore . 'px; height: 1px;"></span>
</td>';
}
$theValue .= '<td bgcolor="' . $lineColor . '">
<img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif"
width="1"
height="' . $lineThickness . '"
alt="" title="" />
<span style="width: 1px; height: ' . $lineThickness . 'px;"></span>
</td>';
if ($spaceAfter) {
$theValue .= '<td width="1">
<img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif"
width="' . $spaceAfter . '"
height="1" alt="" title="" />
<span style="width: ' . $spaceAfter . 'px; height: 1px;"></span>
</td>';
}
$theValue .= '</tr></table>';
......
......@@ -308,14 +308,14 @@ class ImageTextContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractC
$tablecode .= '<tr>';
if ($txtMarg && $align == 'right') {
// If right aligned, the textborder is added on the right side
$tablecode .= '<td rowspan="' . ($rowspan + 1) . '" valign="top"><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' . $txtMarg . '" height="1" alt="" title="" />' . ($editIconsHTML ? '<br />' . $editIconsHTML : '') . '</td>';
$tablecode .= '<td rowspan="' . ($rowspan + 1) . '" valign="top"><span style="width: ' . $txtMarg . 'px; height: 1px;"></span>' . ($editIconsHTML ? '<br />' . $editIconsHTML : '') . '</td>';
$editIconsHTML = '';
$flag = 1;
}
$tablecode .= '<td colspan="' . $colspan . '"><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' . $tableWidth . '" height="1" alt="" /></td>';
$tablecode .= '<td colspan="' . $colspan . '"><span style="width: ' . $tableWidth . 'px; height: 1px;"></span></td>';
if ($txtMarg && $align == 'left') {
// If left aligned, the textborder is added on the left side
$tablecode .= '<td rowspan="' . ($rowspan + 1) . '" valign="top"><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' . $txtMarg . '" height="1" alt="" title="" />' . ($editIconsHTML ? '<br />' . $editIconsHTML : '') . '</td>';
$tablecode .= '<td rowspan="' . ($rowspan + 1) . '" valign="top"><span style="width: ' . $txtMarg . 'px; height: 1px;"></span>' . ($editIconsHTML ? '<br />' . $editIconsHTML : '') . '</td>';
$editIconsHTML = '';
$flag = 1;
}
......@@ -329,7 +329,7 @@ class ImageTextContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractC
for ($c = 0; $c < $rowCount; $c++) {
// If this is NOT the first time in the loop AND if space is required, a row-spacer is added. In case of "noRows" rowspacing is done further down.
if ($c && $rowspacing) {
$tablecode .= '<tr><td colspan="' . $colspan . '"><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="1" height="' . $rowspacing . '"' . $this->cObj->getBorderAttr(' border="0"') . ' alt="" title="" /></td></tr>';
$tablecode .= '<tr><td colspan="' . $colspan . '"><span style="width: 1px; height: ' . $rowspacing . 'px;"></span></td></tr>';
}
// starting row
$tablecode .= '<tr>';
......@@ -338,9 +338,9 @@ class ImageTextContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractC
// If this is NOT the first iteration AND if column space is required. In case of "noCols", the space is done without a separate cell.
if ($b && $colspacing) {
if (!$noCols) {
$tablecode .= '<td><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' . $colspacing . '" height="1"' . $this->cObj->getBorderAttr(' border="0"') . ' alt="" title="" /></td>';
$tablecode .= '<td><span style="width: ' . $colspacing . 'px; height: 1px;"></span></td>';
} else {
$colSpacer = '<img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' . ($border ? $colspacing - 6 : $colspacing) . '" height="' . ($imageRowsMaxHeights[$c] + ($border ? $borderThickness * 2 : 0)) . '"' . $this->cObj->getBorderAttr(' border="0"') . ' align="' . ($border ? 'left' : 'top') . '" alt="" title="" />';
$colSpacer = '<span style="width: ' . ($border ? $colspacing - 6 : $colspacing) . 'px; height: ' . ($imageRowsMaxHeights[$c] + ($border ? $borderThickness * 2 : 0)) . 'px;"></span>';
$colSpacer = '<td valign="top">' . $colSpacer . '</td>';
// added 160301, needed for the new "noCols"-table...
$tablecode .= $colSpacer;
......@@ -367,7 +367,7 @@ class ImageTextContentObject extends \TYPO3\CMS\Frontend\ContentObject\AbstractC
if ($imgsTag[$imgIndex]) {
// Puts distance between the images IF "noRows" is set and this is the first iteration of the loop
if ($rowspacing && $noRows && $a) {
$tablecode .= '<img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="1" height="' . $rowspacing . '" alt="" title="" /><br />';
$tablecode .= '<span style="width: 1px; height: ' . $rowspacing . 'px;"></span><br />';
}
if ($legacyCaptionSplit) {
$thisCaption = $captionArray[$imgIndex];
......
......@@ -91,7 +91,8 @@ class OffsetTableContentObject extends \TYPO3\CMS\Frontend\ContentObject\Abstrac
if (!$valPairs[3]) {
$valPairs[3] = 1;
}
$widthImg = '<img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' . $valPairs[4] . '" height="1" alt="" title="" />';
$widthImg = '<span style="width: ' . $valPairs[4] . 'px; height: 1px;"></span>';
}
// If height is required, set so right column will display for sure
if ($valPairs[5]) {
......@@ -99,13 +100,13 @@ class OffsetTableContentObject extends \TYPO3\CMS\Frontend\ContentObject\Abstrac
$valPairs[2] = 1;
}
$valPairs[2] = 1;
$heightImg = '<img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="1" height="' . $valPairs[5] . '" alt="" title="" />';
$heightImg = '<span style="width: 1px; height: ' . $valPairs[5] . 'px;"></span>';
}
// First row:
// top
if ($valPairs[1]) {
$rows[1] .= '<tr>';
$rows[1] .= '<td><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' . ($valPairs[0] ?: 1) . '" height="' . $valPairs[1] . '" alt="" title="" /></td>';
$rows[1] .= '<td><span style="width: ' . ($valPairs[0] ?: 1) . 'px; height: ' . $valPairs[1] . 'px;"></span></td>';
if ($valPairs[0]) {
$rows[1] .= '<td></td>';
}
......@@ -117,11 +118,11 @@ class OffsetTableContentObject extends \TYPO3\CMS\Frontend\ContentObject\Abstrac
// Middle row:
$rows[2] .= '<tr>';
if ($valPairs[0]) {
$rows[2] .= $valPairs[1] ? '<td></td>' : '<td><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' . $valPairs[0] . '" height="1" alt="" title="" /></td>';
$rows[2] .= $valPairs[1] ? '<td></td>' : '<td><span style="width: ' . $valPairs[0] . 'px; height: 1px;"></span></td>';
}
$rows[2] .= '<td' . $this->tdParams . '>' . $content . '</td>';
if ($valPairs[2]) {
$rows[2] .= $valPairs[3] ? '<td>' . $heightImg . '</td>' : '<td><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' . $valPairs[2] . '" height="' . ($valPairs[5] ?: 1) . '" alt="" title="" /></td>';
$rows[2] .= $valPairs[3] ? '<td>' . $heightImg . '</td>' : '<td><span style="width: ' . $valPairs[2] . 'px; height: ' . ($valPairs[5] ?: 1) . 'px;"></span></td>';
}
$rows[2] .= '</tr>';
// Bottom row:
......@@ -133,7 +134,7 @@ class OffsetTableContentObject extends \TYPO3\CMS\Frontend\ContentObject\Abstrac
if ($valPairs[2]) {
$rows[3] .= '<td>' . $widthImg . '</td>';
}
$rows[3] .= '<td><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="' . ($valPairs[2] ?: ($valPairs[4] ?: 1)) . '" height="' . $valPairs[3] . '" alt="" title="" /></td>';
$rows[3] .= '<td><span style="width: ' . ($valPairs[2] ?: ($valPairs[4] ?: 1)) . 'px; height: ' . $valPairs[3] . 'px;"></span></td>';
$rows[3] .= '</tr>';
}
return $this->begin . implode('', $rows) . $this->end;
......
......@@ -204,7 +204,7 @@ class TableRenderer {
if ($cols + $xoff > 1) {
$colspan = ' colspan="' . ($cols + $xoff) . '"';
}
$res .= '<tr><td' . $colspan . '><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="1" height="' . $offArr[1] . '" alt="" title="" /></td></tr>';
$res .= '<tr><td' . $colspan . '><span style="width: 1px; height: ' . $offArr[1] . 'px;"></span></td></tr>';
}
// The rows:
if ($rows > 1) {
......@@ -212,13 +212,13 @@ class TableRenderer {
}
$res .= '<tr>';
if ($offArr[0]) {
$res .= '<td' . $rowspan . '><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" height="1" width="' . $offArr[0] . '" alt="" title="" /></td>';
$res .= '<td' . $rowspan . '><span style="width: ' . $offArr[0] . 'px; height: 1px;"></span></td>';
}
if ($this->lm) {
$res .= '<td' . $rowspan . ' ' . $this->lmTDparams . '>' . $this->lm . '</td>';
}
if ($cMargArr[0]) {
$res .= '<td' . $rowspan . '><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" height="1" width="' . $cMargArr[0] . '" alt="" title="" /></td>';
$res .= '<td' . $rowspan . '><span style="width: ' . $cMargArr[0] . 'px; height: 1px;"></span></td>';
}
// Content...
$middle = array();
......@@ -226,26 +226,26 @@ class TableRenderer {
$middle[] = '<td ' . $this->tmTDparams . '>' . $this->tm . '</td>';
}
if ($cMargArr[1]) {
$middle[] = '<td><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="1" height="' . $cMargArr[1] . '" alt="" title="" /></td>';
$middle[] = '<td><span style="width: 1px; height: ' . $cMargArr[1] . 'px;"></span></td>';
}
if ($this->content) {
$middle[] = '<td ' . $this->contentTDparams . '>' . $this->content . '</td>';
}
if ($cMargArr[3]) {
$middle[] = '<td><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" width="1" height="' . $cMargArr[3] . '" alt="" title="" /></td>';
$middle[] = '<td><span style="width: 1px; height: ' . $cMargArr[3] . 'px;"></span></td>';
}
if ($this->bm) {
$middle[] = '<td ' . $this->bmTDparams . '>' . $this->bm . '</td>';
}
if ($this->contentW) {
$middle[] = '<td><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" height="1" width="' . $this->contentW . '" alt="" title="" /></td>';
$middle[] = '<td><span style="width: ' . $this->contentW . 'px; height: 1px;"></span></td>';
}
if (isset($middle[0])) {
$res .= $middle[0];
}
// Left of content
if ($cMargArr[2]) {
$res .= '<td' . $rowspan . '><img src="' . $GLOBALS['TSFE']->absRefPrefix . 'clear.gif" height="1" width="' . $cMargArr[2] . '" alt="" title="" /></td>';
$res .= '<td' . $rowspan . '><span style="width: ' . $cMargArr[2] . 'px; height: 1px;"></span></td>';
}
if ($this->rm) {
$res .= '<td' . $rowspan . ' ' . $this->rmTDparams . '>' . $this->rm . '</td>';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment