[FEATURE] Refactor category tree to SVG 60/48060/46
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Mon, 22 Aug 2016 19:12:18 +0000 (21:12 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Tue, 23 Aug 2016 05:02:43 +0000 (07:02 +0200)
commit4aa12a3ad6709a6118017a5b07b8252b50274658
tree0983ee7773bdf79da2919f495a825825e391808a
parent7651c62e1b38861c431cb8c6713dd2e3a607d084
[FEATURE] Refactor category tree to SVG

Replace ExtJS category tree implementation with SVG based one.

Current approach reuses as much of the category logic as possible
(e.g. ExtJsJsonTreeRenderer)

The SVG tree js component is added as requirejs module.
Standalone version of the js component lives here:
https://github.com/wmdbsystems/TYPO3.Tree

Done:
- virtual scrolling (we render only the number of nodes
  which fits the current viewport) so there are minor workarounds in place
- displaying of the category tree in category record (including checked checkbox)
- a new ajax controller is added which returns full tree as json
- icons are displayed
- searching/filtering through tree
- collapse all and expand all buttons
- toolbar (search, expand all, collapse all)
- indeterminate state for checkboxes (parent is marked if child is selected)
- selection saving in the record
- maxItems handling
- new svgTree is used in all records (pages, tt_content, categories, ...)
- TCA settings: 'expandAll', 'showHeader', 'size', 'maxLevels'
  'nonSelectableLevels', 'requestUpdate', 'exclusiveKeys'
- toolbar tooltips and input placehoder
- replace collapse-all and expand-all icons with new ones from T3.icons
- remove extjs JS file (tree.js)
- readonly mode (it's possible to navigate the tree (scroll,collapse,expand,etc),
 before it was not possible)
- marking record “red” if validation fails
- icon overlay handling (for e.g. disabled categories)
- tooltip with category id

Resolves: #76108
Resolves: #74126
Resolves: #65780
Releases: master
Change-Id: Ib8d3c879b0b0584ff50cf0f6842bb655f9753ddd
Reviewed-on: https://review.typo3.org/48060
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
24 files changed:
Build/Gruntfile.js
Build/Resources/Public/Less/Component/svgTree.less [new file with mode: 0644]
Build/Resources/Public/Less/backend.less
Build/bower.json
typo3/sysext/backend/Classes/Controller/SelectTreeController.php [new file with mode: 0644]
typo3/sysext/backend/Classes/Form/Element/SelectTreeElement.php
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaSelectTreeItems.php
typo3/sysext/backend/Classes/Form/FormResultCompiler.php
typo3/sysext/backend/Classes/Tree/Renderer/ExtJsJsonTreeRenderer.php
typo3/sysext/backend/Classes/Tree/TreeRepresentationNode.php
typo3/sysext/backend/Configuration/Backend/AjaxRoutes.php
typo3/sysext/backend/Resources/Public/Css/backend.css
typo3/sysext/backend/Resources/Public/JavaScript/FormEngine/Element/SelectTree.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/FormEngine/Element/SelectTreeElement.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/FormEngine/Element/SvgTree.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/FormEngine/Element/TreeToolbar.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/tree.js [deleted file]
typo3/sysext/core/Classes/Imaging/IconProvider/BitmapIconProvider.php
typo3/sysext/core/Classes/Page/PageRenderer.php
typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeDataProvider.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-76108-ReplaceExtJSCategoryTreeWithD3AndSVG.rst [new file with mode: 0644]
typo3/sysext/core/Documentation/Changelog/master/Feature-76108-ReplaceExtJSCategoryTreeWithD3AndSVG.rst [new file with mode: 0644]
typo3/sysext/core/Resources/Public/JavaScript/Contrib/d3/d3.js [new file with mode: 0644]
typo3/sysext/lang/locallang_csh_corebe.xlf