Commit db1b837a authored by Markus Guenther's avatar Markus Guenther Committed by Wouter Wolters
Browse files

[TASK] Replace sprite icon "actions-edit-undo" with IconFactory

Replaces all IconUtility::getSpriteIcon calls for the icon
actions-edit-undo with the new IconFactory.

Change-Id: I42ed3f6368fc27c47bdc0ce7e74380ba0fbd5b12
Resolves: #68845
Releases: master
Reviewed-on: http://review.typo3.org/42503


Reviewed-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
parent 32902828
......@@ -1174,7 +1174,7 @@ class EditDocumentController {
)
)
) . '; return false;';
$buttons['undo'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"' . ' title="' . htmlspecialchars(sprintf($lang->getLL('undoLastChange'), BackendUtility::calcAge(($GLOBALS['EXEC_TIME'] - $undoButtonR['tstamp']), $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')))) . '">' . IconUtility::getSpriteIcon('actions-edit-undo') . '</a>';
$buttons['undo'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"' . ' title="' . htmlspecialchars(sprintf($lang->getLL('undoLastChange'), BackendUtility::calcAge(($GLOBALS['EXEC_TIME'] - $undoButtonR['tstamp']), $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')))) . '">' . $this->iconFactory->getIcon('actions-edit-undo', Icon::SIZE_SMALL) . '</a>';
}
if ($this->getNewIconMode($this->firstEl['table'], 'showHistory')) {
$aOnClick = 'window.location.href=' .
......
......@@ -1235,7 +1235,7 @@ class PageLayoutController {
)
)
) . '; return false;') . '"
title="' . htmlspecialchars(sprintf($lang->getLL('undoLastChange'), BackendUtility::calcAge($GLOBALS['EXEC_TIME'] - $this->undoButtonR['tstamp'], $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')))) . '">' . IconUtility::getSpriteIcon('actions-edit-undo') . '</a>';
title="' . htmlspecialchars(sprintf($lang->getLL('undoLastChange'), BackendUtility::calcAge($GLOBALS['EXEC_TIME'] - $this->undoButtonR['tstamp'], $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')))) . '">' . $this->iconFactory->getIcon('actions-edit-undo', Icon::SIZE_SMALL) . '</a>';
// History button
$buttons['history_record'] = '<a href="#"
onclick="' . htmlspecialchars('jumpToUrl(' .
......
......@@ -275,7 +275,7 @@ class RteController extends AbstractWizardController implements \TYPO3\CMS\Core\
)
)
) . '; return false;';
$buttons['undo'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"' . ' title="' . htmlspecialchars(sprintf($this->getLanguageService()->getLL('undoLastChange'), BackendUtility::calcAge(($GLOBALS['EXEC_TIME'] - $undoButtonR['tstamp']), $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')))) . '">' . IconUtility::getSpriteIcon('actions-edit-undo') . '</a>';
$buttons['undo'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"' . ' title="' . htmlspecialchars(sprintf($this->getLanguageService()->getLL('undoLastChange'), BackendUtility::calcAge(($GLOBALS['EXEC_TIME'] - $undoButtonR['tstamp']), $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')))) . '">' . $this->iconFactory->getIcon('actions-edit-undo', Icon::SIZE_SMALL) . '</a>';
}
// Shortcut
if ($this->getBackendUserAuthentication()->mayMakeShortcut()) {
......
......@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Backend\Form\Element;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Backend\Utility\IconUtility;
use TYPO3\CMS\Backend\Utility\BackendUtility;
......@@ -239,9 +240,11 @@ class SelectCheckBoxElement extends AbstractFormElement {
// Build reset group button
$resetGroupBtn = '';
if (!empty($resetGroup)) {
$title = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.revertSelection', TRUE);
$resetGroupBtn = '
<a href="#" class="btn btn-default" onclick="' . implode('', $resetGroup) . ' return false;' . '">
' . IconUtility::getSpriteIcon('actions-edit-undo', array('title' => htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.revertSelection')))) . '
<a href="#" class="btn btn-default" onclick="' . implode('', $resetGroup) . ' return false;'
. '" title="' . $title . '">
' . $this->iconFactory->getIcon('actions-edit-undo', Icon::SIZE_SMALL) . '
' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.revertSelection') . '
</a>
';
......
......@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Backend\Form\Element;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\MathUtility;
use TYPO3\CMS\Backend\Utility\IconUtility;
......@@ -157,8 +158,8 @@ class SelectSingleBoxElement extends AbstractFormElement {
' . $selectBox . '
</div>
<div class="form-wizards-items">
<a href="#" class="btn btn-default" onclick="' . $onClick . '" title="' . htmlspecialchars($languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.revertSelection')) . '">'
. IconUtility::getSpriteIcon('actions-edit-undo') . '</a>
<a href="#" class="btn btn-default" onclick="' . $onClick . '" title="' . $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.revertSelection', TRUE) . '">'
. $this->iconFactory->getIcon('actions-edit-undo', Icon::SIZE_SMALL) . '</a>
</div>
</div>
</div>
......
......@@ -164,6 +164,12 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
'name' => 'retweet',
)
),
'actions-edit-undo' => array(
'provider' => FontawesomeIconProvider::class,
'options' => array(
'name' => 'undo',
)
),
// OVERLAYS
'overlay-read-only' => array(
......
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