Commit f4de6926 authored by Patricia Tiedemann's avatar Patricia Tiedemann Committed by Andreas Fernandez
Browse files

[TASK] Render backend icon list by existing files

Until now all of the backend icons were a manually edited array of file
paths. With this patch defined icon folders in the core are scanned
for existing icon files and build most of that static array
automatically.

For historic reason (and hopefully soon to be removed alltogether) a
second array of statically declared icons is added and merged into.

Some icons that were in the original static list but whose files
actually are missing or misnamed are marked as deprecated.

Resolves: #82348
Releases: master
Change-Id: I8dc4fbbe815d923eda55e1c1b072369e62f66d87
Reviewed-on: https://review.typo3.org/54020

Reviewed-by: Benjamin Kott's avatarBenjamin Kott <benjamin.kott@outlook.com>
Tested-by: Benjamin Kott's avatarBenjamin Kott <benjamin.kott@outlook.com>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
parent a9f7ec32
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
"@types/jqueryui": "^1.11.34", "@types/jqueryui": "^1.11.34",
"@types/nprogress": "*", "@types/nprogress": "*",
"@types/requirejs": "*", "@types/requirejs": "*",
"@typo3/icons": "^1.4.1", "@typo3/icons": "^1.5.1",
"autoprefixer": "^6.3.7", "autoprefixer": "^6.3.7",
"autosize": "^3.0.21", "autosize": "^3.0.21",
"bootstrap-sass": "^3.3.7", "bootstrap-sass": "^3.3.7",
......
...@@ -582,7 +582,7 @@ class InlineRecordContainer extends AbstractContainer ...@@ -582,7 +582,7 @@ class InlineRecordContainer extends AbstractContainer
if ($lockInfo = BackendUtility::isRecordLocked($foreignTable, $rec['uid'])) { if ($lockInfo = BackendUtility::isRecordLocked($foreignTable, $rec['uid'])) {
$cells['locked'] = ' $cells['locked'] = '
<a class="btn btn-default" href="#" data-toggle="tooltip" data-title="' . htmlspecialchars($lockInfo['msg']) . '"> <a class="btn btn-default" href="#" data-toggle="tooltip" data-title="' . htmlspecialchars($lockInfo['msg']) . '">
' . '<span title="' . htmlspecialchars($lockInfo['msg']) . '">' . $this->iconFactory->getIcon('status-warning-in-use', Icon::SIZE_SMALL)->render() . '</span>' . ' ' . '<span title="' . htmlspecialchars($lockInfo['msg']) . '">' . $this->iconFactory->getIcon('warning-in-use', Icon::SIZE_SMALL)->render() . '</span>' . '
</a>'; </a>';
} }
// Hook: Post-processing of single controls for specific child records: // Hook: Post-processing of single controls for specific child records:
......
...@@ -345,7 +345,7 @@ class Commands ...@@ -345,7 +345,7 @@ class Commands
$lockInfo = BackendUtility::isRecordLocked('pages', $record['uid']); $lockInfo = BackendUtility::isRecordLocked('pages', $record['uid']);
if (is_array($lockInfo)) { if (is_array($lockInfo)) {
$qtip .= '<br />' . htmlspecialchars($lockInfo['msg']); $qtip .= '<br />' . htmlspecialchars($lockInfo['msg']);
$prefix .= '<span class="typo3-pagetree-status">' . $iconFactory->getIcon('status-warning-in-use', Icon::SIZE_SMALL)->render() . '</span>'; $prefix .= '<span class="typo3-pagetree-status">' . $iconFactory->getIcon('warning-in-use', Icon::SIZE_SMALL)->render() . '</span>';
} }
// Call stats information hook // Call stats information hook
$stat = ''; $stat = '';
......
...@@ -2027,7 +2027,7 @@ class PageLayoutView ...@@ -2027,7 +2027,7 @@ class PageLayoutView
// Get record locking status: // Get record locking status:
if ($lockInfo = BackendUtility::isRecordLocked('tt_content', $row['uid'])) { if ($lockInfo = BackendUtility::isRecordLocked('tt_content', $row['uid'])) {
$additionalIcons[] = '<a href="#" data-toggle="tooltip" data-title="' . htmlspecialchars($lockInfo['msg']) . '">' $additionalIcons[] = '<a href="#" data-toggle="tooltip" data-title="' . htmlspecialchars($lockInfo['msg']) . '">'
. $this->iconFactory->getIcon('status-warning-in-use', Icon::SIZE_SMALL)->render() . '</a>'; . $this->iconFactory->getIcon('warning-in-use', Icon::SIZE_SMALL)->render() . '</a>';
} }
// Call stats information hook // Call stats information hook
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'])) { if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'])) {
...@@ -2792,7 +2792,7 @@ class PageLayoutView ...@@ -2792,7 +2792,7 @@ class PageLayoutView
public function noEditIcon($label = 'noEditItems') public function noEditIcon($label = 'noEditItems')
{ {
$title = htmlspecialchars($this->getLanguageService()->getLL($label)); $title = htmlspecialchars($this->getLanguageService()->getLL($label));
return '<span title="' . $title . '">' . $this->iconFactory->getIcon('status-status-edit-read-only', Icon::SIZE_SMALL)->render() . '</span>'; return '<span title="' . $title . '">' . $this->iconFactory->getIcon('status-edit-read-only', Icon::SIZE_SMALL)->render() . '</span>';
} }
/***************************************** /*****************************************
......
...@@ -61,7 +61,7 @@ class PageTreeView extends BrowseTreeView ...@@ -61,7 +61,7 @@ class PageTreeView extends BrowseTreeView
if ($lockInfo = BackendUtility::isRecordLocked('pages', $row['uid'])) { if ($lockInfo = BackendUtility::isRecordLocked('pages', $row['uid'])) {
$aOnClick = 'alert(' . GeneralUtility::quoteJSvalue($lockInfo['msg']) . ');return false;'; $aOnClick = 'alert(' . GeneralUtility::quoteJSvalue($lockInfo['msg']) . ');return false;';
$lockIcon = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">' $lockIcon = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">'
. '<span title="' . htmlspecialchars($lockInfo['msg']) . '">' . $iconFactory->getIcon('status-warning-in-use', Icon::SIZE_SMALL)->render() . '</span></a>'; . '<span title="' . htmlspecialchars($lockInfo['msg']) . '">' . $iconFactory->getIcon('warning-in-use', Icon::SIZE_SMALL)->render() . '</span></a>';
} else { } else {
$lockIcon = ''; $lockIcon = '';
} }
......
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M14 4h-2V1H1v11h3v3h11V4h-1zM4 4v7H2V2h9v2H4zm10 10H5V5h9v9z" class="icon-color"/></svg>
\ No newline at end of file
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><title>actions-preview</title><path d="M1 2.51c0-.282.22-.51.498-.51h13.004a.5.5 0 0 1 .498.51v7.98c0 .282-.22.51-.498.51H1.498A.5.5 0 0 1 1 10.49V2.51zM2 3h12v6H2V3zm5 8c0 1-1 1-1 1v1h4v-1s-1 0-1-1H7z" class="icon-color" fill-rule="evenodd"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M14.5 2h-13c-.3 0-.5.2-.5.5v9c0 .3.2.5.5.5H6v1H4v1h8v-1h-2v-1h4.5c.3 0 .5-.2.5-.5v-9c0-.3-.2-.5-.5-.5zm-.5 9H2V3h12v8z" class="icon-color"/></svg>
\ No newline at end of file \ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g class="icon-color"><path d="M11 8H8V5H7v3H4v1h3v3h1V9h3zM2 9c0-.6-.4-1-1-1 .6 0 1-.4 1-1V3h1.8V2H2c-.6 0-1 .4-1 1v4c-.6 0-1 .4-1 1s.4 1 1 1v4c0 .6.4 1 1 1h1.8v-1H2V9zM14 7V3c0-.6-.4-1-1-1h-1.8v1H13v4c0 .6.4 1 1 1-.6 0-1 .4-1 1v4h-1.8v1H13c.6 0 1-.4 1-1V9c.6 0 1-.4 1-1s-.4-1-1-1z"/></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M2 5.3h1.6V3.7H2v1.6zm2.5 0h1.6V3.7H4.5v1.6zM7 3.7v1.6h1.6V3.7H7zm-5 8.6h1.6v-1.6H2v1.6zm2.5 0h1.6v-1.6H4.5v1.6zm2.5 0h1.6v-1.6H7v1.6z" fill="#676767"/><path d="M0 2v5h16V2H0zm15 4H1V3h14v3zM0 14h16V9H0v5zm1-4h14v3H1v-3z" fill="#9a9999"/><path d="M1 3v3h14V3H1zm2.6 2.3H2V3.7h1.6v1.6zm2.5 0H4.5V3.7h1.6v1.6zm2.5 0H7V3.7h1.6v1.6zM1 13h14v-3H1v3zm6-2.3h1.6v1.6H7v-1.6zm-2.5 0h1.6v1.6H4.5v-1.6zm-2.5 0h1.6v1.6H2v-1.6z" fill="#fff"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M15 15V1H1v14h14zM4.1 8l2.1 2.1 5.7-5.6.7.7-5.7 5.6-.7.7-.7-.7-2.1-2.1.7-.7z" fill="#fff"/><path d="M15 0H0v16h16V0h-1zm0 15H1V1h14v14z" fill="#9a9999"/><path fill="#676767" d="M11.9 4.5l-5.7 5.6L4.1 8l-.7.7 2.8 2.8.7-.7 5.7-5.6z"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M15 15V1H1v14h14zM9 2h5v2H9V2zm0 3h5v1H9V5zm0 2h5v1H9V7zM2 2h6v6H2V2zm0 7h12v1H2V9zm0 2h12v1H2v-1zm0 2h12v1H2v-1z" fill="#fff"/><path d="M15 0H0v16h16V0h-1zm0 15H1V1h14v14z" fill="#9a9999"/><path d="M8 2H2v6h6V2zm1 4h5V5H9v1zm0 2h5V7H9v1zm-7 2h12V9H2v1zm0 2h12v-1H2v1zm0 2h12v-1H2v1zM9 2v2h5V2H9z" fill="#676767"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M4.8 8h2.9V5h-3v3h.1zM1 5h3v3H1V5zm3.7 3.5v3h3v-3h-3zM1 8.5h3v3H1v-3zM4.8 12h-.1v3h3v-3H4.8zM1 12h3v3H1v-3zm11-7h3v3h-3V5zm-.8 3h.1V5h-3v3h2.9zm-2.9.5v3h3v-3h-3zm3.7 0h3v3h-3v-3zm0 3.5h3v3h-3v-3zm-.8 0H8.3v3h3v-3h-.1zM4.8 2V1H3v3h1.8V2zM13 2V1h-1.8v3H13V2z" fill="#fff"/><path d="M12 5h-.7v3h-3V5h-.6v3h-3V5H4v3H1v.5h3v3H1v.5h3v3h.7v-3h3v3h.6v-3h3v3h.7v-3h3v-.5h-3v-3h3V8h-3V5zm-4.3 6.5h-3v-3h3v3zm3.6 0h-3v-3h3v3z" fill="#8c8c8c"/><path d="M15 2h-1V0h-3.8v2H5.7V0H2v2H0v14h16V2h-1zm-3.8 0V1H13v3h-1.8V2zM3 2V1h1.8v3H3V2zm12 6v7H1V5H15v3z" fill="#676767"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M10 0v1h5v14H1V1h1V0H0v16h16V0h-6zM2 14h12v-3.5H2V14zm1-2.5h10V13H3v-1.5zm11-5.3H2v3.6h12V6.2zm-1 2.6H3V7.2h10v1.6zM14 2H2v3.5h12V2zm-1 2.5H3V3h10v1.5z" fill="#9a9999"/><path fill="#676767" d="M3 0h6v1H3z"/><path d="M13 7.2H3v1.6h10V7.2zm0 4.3H3V13h10v-1.5zM10 1V0H9v1H3V0H2v1H1v14h14V1h-5zm4 13H2v-3.5h12V14zm0-4.2H2V6.2h12v3.6zm0-4.3H2V2h12v3.5zM13 3H3v1.5h10V3z" fill="#fff"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M2 0v16h12V4l-4-4H2zm1 1h6v4h4v10H3V1zm7 .4L12.6 4H10V1.4z" fill="#9a9999"/><path d="M8 4L5 8h2v4h2V8h2L8 4z" fill="#676767"/><path d="M10 4V1.4L12.6 4H10zM9 1H3v14h10v-5L9 5V1zm2 7H9v4H7V8H5l3-4 3 4z" fill="#fff"/><path d="M13 5v5L9 5h4z" fill="#cbcbcb"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M12.9 3.8l-1.4-.4c0-.1-.1-.2-.1-.3l.7-1.2v-.2l-.7-.7c-.1-.1-.1-.1-.2 0l-1.3.6c-.1 0-.2-.1-.3-.1L9.2.1C9.2 0 9.1 0 9 0H8c-.1 0-.2 0-.2.1l-.4 1.4c-.1 0-.2.1-.3.1L5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16 16"><path d="M15 1H1v15h15V1h-1zm0 14H2V2h13v13z" fill="#676767"/><path d="M7 8H4v1h3V8zM2 2v13h13V2H2zm6 12H3v-3h5v3zm0-4H3V7h5v3zm0-4H3V3h5v3zm6 8H9v-3h5v3zm0-4H9V7h5v3zm0-4H9V3h5v3zm-7 6H4v1h3v-1zm6-4h-3v1h3V8zM7 4H4v1h3V4zm6 8h-3v1h3v-1zm0-8h-3v1h3V4z" fill="#fff"/><path d="M3 6h5V3H3v3zm1-2h3v1H4V4zm-1 6h5V7H3v3zm1-2h3v1H4V8zm-1 6h5v-3H3v3zm1-2h3v1H4v-1zm5-9v3h5V3H9zm4 2h-3V4h3v1zm-4 5h5V7H9v3zm1-2h3v1h-3V8zm-1 6h5v-3H9v3zm1-2h3v1h-3v-1z" fill="#9a9999"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M15 1H1v15h15V1h-1zm0 14H2V2h13v13z" fill="#9a9999"/><path d="M2 2v13h13V2H2zm6 4H3V3h5v3zm6 0H9V3h5v3zM7 4H4v1h3V4zm6 0h-3v1h3V4z" fill="#fff"/><path d="M3 6h5V3H3v3zm1-2h3v1H4V4zm5-1v3h5V3H9zm4 2h-3V4h3v1z" fill="#676767"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M1 9.5h3v-3H1v3zm4-3v3h10v-3H5z" fill="#fff"/><path d="M0 10.5h4v-1H1v-3h3v-1H0v5zm5-5v1h10v3H5v1h11v-5H5z" fill="#9a9999"/><path fill="#676767" d="M6.5 4.5v-1h-4v1H4v7H2.5v1h4v-1H5v-7z"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M15 13V1H1v12h14zM8 4l3 4H9v4H7V8H5l3-4z" fill="#fff"/><path d="M1 0H0v16h16V0H1zm14 13H1V1h14v12z" fill="#9a9999"/><path d="M8 4L5 8h2v4h2V8h2L8 4z" fill="#676767"/></svg>
\ No newline at end of file
Markdown is supported
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