[BUGFIX] Omit checkbox for unselectable tree items 63/58263/3
authorSebastian Michaelsen <sebastian@michaelsen.io>
Thu, 13 Sep 2018 09:49:42 +0000 (11:49 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 17 Sep 2018 15:07:56 +0000 (17:07 +0200)
TCA select fields with renderType = 'selectTree' have the option
treeConfig.appearance.nonSelectableLevels, which doesn't seem
to work anymore since TYPO3 v7. The items are correctly flagged
with node.selectable = false in PHP but the JavaScript doesn't
check for that property.

Resolves: #84708
Releases: master, 8.7
Change-Id: Iefe98e1c9fd316f05c27ad1230d63236a7069bf1
Reviewed-on: https://review.typo3.org/58263
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Joerg Kummer <typo3@enobe.de>
Tested-by: Joerg Kummer <typo3@enobe.de>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Resources/Public/JavaScript/SvgTree.js

index 99a7899..a21ca68 100644 (file)
@@ -355,6 +355,8 @@ define(
 
           if (typeof node.checked === 'undefined') {
             node.checked = false;
+          }
+          if (node.selectable === false) {
             _this.settings.unselectableElements.push(node.identifier);
           }