[TASK] Remove TYPO3/CMS/Backend/LegacyCssClasses module 37/46137/2
authorFrank Nägler <frank.naegler@typo3.org>
Thu, 21 Jan 2016 17:42:02 +0000 (18:42 +0100)
committerBenni Mack <benni@typo3.org>
Fri, 22 Jan 2016 08:46:05 +0000 (09:46 +0100)
The module TYPO3/CMS/Backend/LegacyCssClasses was used in the beginning of
CMS 7, to prevent breaking tables. The last t3-table classes and the module self,
are removed with this patch now.

Resolves: #72879
Releases: master
Change-Id: I9116aa62c5ca302c5a0ee21acd989e8645c8ce8d
Reviewed-on: https://review.typo3.org/46137
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/backend/Classes/Controller/BackendController.php
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
typo3/sysext/backend/Resources/Public/JavaScript/LegacyCssClasses.js [deleted file]
typo3/sysext/lang/Resources/Private/Templates/Language/ListLanguages.html
typo3/sysext/lang/Resources/Private/Templates/Language/ListTranslations.html

index 486dfb1..4f35182 100644 (file)
@@ -139,9 +139,6 @@ class BackendController
         // load Modals
         $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/Modal');
 
-        // load Legacy CSS Support
-        $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/LegacyCssClasses');
-
         // load the storage API and fill the UC into the PersistentStorage, so no additional AJAX call is needed
         $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/Storage', 'function(Storage) {
                        Storage.Persistent.load(' . json_encode($this->getBackendUser()->uc) . ');
index 91c9aef..ac18b09 100644 (file)
@@ -268,8 +268,6 @@ function jumpToUrl(URL) {
         // Initializes the page rendering object:
         $this->initPageRenderer();
 
-        // load Legacy CSS Support
-        $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/LegacyCssClasses');
         $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
 
         // initialize Marker Support
diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/LegacyCssClasses.js b/typo3/sysext/backend/Resources/Public/JavaScript/LegacyCssClasses.js
deleted file mode 100644 (file)
index 8302cf1..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Module: TYPO3/CMS/Backend/LegacyCssClasses
- * JavaScript replacement for Legacy CSS Classes
- */
-define(['jquery'], function($) {
-       'use strict';
-
-       /**
-        *
-        * @type {{replacements: Array}}
-        * @exports TYPO3/CMS/Backend/LegacyCssClasses
-        */
-       var LegacyCssClasses = {
-               replacements: [
-                       {
-                               selector: '.t3-table',
-                               remove: ['t3-table'],
-                               add: ['table', 'table-striped', 'table-hover']
-                       }
-               ]
-       };
-
-       $(function() {
-               $.each(LegacyCssClasses.replacements, function(key, replacement) {
-                       var $items = $(replacement.selector);
-                       if ($items.length > 0) {
-                               $items.each(function() {
-                                       var $item = $(this);
-                                       if (replacement.remove.length > 0) {
-                                               $.each(replacement.remove, function(oldClassId, oldClassName) {
-                                                       $item.removeClass(oldClassName);
-                                               });
-                                       }
-                                       if (replacement.add.length > 0) {
-                                               $.each(replacement.add, function(newClassId, newClassName) {
-                                                       $item.addClass(newClassName);
-                                               });
-                                       }
-                               });
-                       }
-               });
-       });
-
-       return LegacyCssClasses;
-});
index bdb246f..d72bca7 100644 (file)
@@ -16,7 +16,7 @@
                </div>
        </form>
        <br />
-       <table id="typo3-language-list" class="t3-table t3-datatable">
+       <table id="typo3-language-list" class="table table-striped table-hover t3-datatable">
                <thead>
                <tr>
                        <th title="{f:translate(key:'table.ad.title')}">
index cf19d4e..6aaab99 100644 (file)
@@ -7,7 +7,7 @@
                        <f:form.textfield name="typo3-language-searchfield" placeholder="{f:translate(key:'table.search')}" id="typo3-language-searchfield" value="{search}" class="form-control t3js-language-searchfield" />
                </div>
        </form>
-       <table id="typo3-translation-list" class="t3-table t3-datatable" data-language-count="{f:count(subject: languages)}">
+       <table id="typo3-translation-list" class="table table-striped table-hover t3-datatable" data-language-count="{f:count(subject: languages)}">
                <thead>
                        <tr>
                                <th><!-- Icon --></th>