[TASK] Replace sprite icon "actions-view-list-*" with the new IconFactory 98/43198/4
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Fri, 11 Sep 2015 13:21:05 +0000 (15:21 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 11 Sep 2015 15:18:03 +0000 (17:18 +0200)
Replaces all IconUtility::getSpriteIcon calls for the icon
actions-view-list-* with the new IconFactory.

Resolves: #69675
Resolves: #69676
Releases: master
Change-Id: I13f1a95cfd6b73e2557a118beb6bbab1e3d7de9f
Reviewed-on: http://review.typo3.org/43198
Reviewed-by: Frank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler <frank.naegler@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Imaging/IconRegistry.php
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
typo3/sysext/recordlist/Resources/Public/JavaScript/Recordlist.js

index 4fbfd4c..7148a01 100644 (file)
@@ -580,6 +580,18 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                                'name' => 'check-square-o',
                        )
                ),
+               'actions-view-list-collapse' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'chevron-up',
+                       )
+               ),
+               'actions-view-list-expand' => array(
+                       'provider' => FontawesomeIconProvider::class,
+                       'options' => array(
+                               'name' => 'chevron-down',
+                       )
+               ),
                'actions-view-go-back' => array(
                        'provider' => FontawesomeIconProvider::class,
                        'options' => array(
index 7e921a9..1c90dbe 100644 (file)
@@ -543,9 +543,7 @@ class DatabaseRecordList extends AbstractDatabaseRecordList {
                                        $title = $tableCollapsed
                                                ? $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.expandTable', TRUE)
                                                : $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.collapseTable', TRUE);
-                                       $icon = $tableCollapsed
-                                               ? IconUtility::getSpriteIcon('actions-view-list-expand', array('class' => 'collapseIcon'))
-                                               : IconUtility::getSpriteIcon('actions-view-list-collapse', array('class' => 'collapseIcon'));
+                                       $icon = '<span class="collapseIcon">' . $this->iconFactory->getIcon(($tableCollapsed ? 'actions-view-list-expand' : 'actions-view-list-collapse'), Icon::SIZE_SMALL) . '</span>';
                                        $collapseIcon = '<a href="' . $href . '" title="' . $title . '" class="pull-right t3js-toggle-recordlist" data-table="' . htmlspecialchars($table) . '" data-toggle="collapse" data-target="#recordlist-' . htmlspecialchars($table) . '">' . $icon . '</a>';
                                }
                                $tableHeader .= $theData[$titleCol] . $collapseIcon;
index 6405161..13bbe7f 100644 (file)
@@ -36,7 +36,7 @@ define('TYPO3/CMS/Recordlist/Recordlist', ['jquery', 'TYPO3/CMS/Backend/Storage'
                                $target = $($me.data('target')),
                                isExpanded = $target.data('state') === 'expanded';
 
-                       $me.find('.t3-icon').toggleClass(Recordlist.classes.toggleIconState.collapsed).toggleClass(Recordlist.classes.toggleIconState.expanded);
+                       $me.find('.collapseIcon .icon-unify .fa').toggleClass(Recordlist.classes.toggleIconState.collapsed).toggleClass(Recordlist.classes.toggleIconState.expanded);
 
                        // Store collapse state in UC
                        var storedModuleDataList = {};