Fixed bug #16326: TCA tree does not honour single click selection
authorSteffen Ritter <info@rs-websystems.de>
Sun, 28 Nov 2010 10:08:11 +0000 (10:08 +0000)
committerSteffen Ritter <info@rs-websystems.de>
Sun, 28 Nov 2010 10:08:11 +0000 (10:08 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9663 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/tceforms/class.t3lib_tceforms_tree.php

index 4a041b7..5f220aa 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
        * Fixed bug #16510: TCA tree should behave like select
        * Fixed bug #16508: TCA tree is not compatible DBAL due to mySQL specific use of CONCAT
        * Fixed bug #16325: TCA tree does not honour size if autoSizeMax is set
+       * Fixed bug #16326: TCA tree does not honour single click selection
 
 2010-11-26  Francois Suter  <francois@typo3.org>
 
index e662794..008527d 100644 (file)
@@ -129,6 +129,20 @@ class t3lib_TCEforms_Tree {
                                id: "' . $id . '",
                                showHeader: ' . intval($header) . ',
                                onChange: "' . $onChange . '",
+                               listeners: {
+                                       click: function(node, event) {
+                                               if (typeof(node.attributes.checked) == "boolean") {
+                                                       node.attributes.checked = ! node.attributes.checked;
+                                                       node.getUI().toggleCheck(node.attributes.checked);
+                                               }
+                                       },
+                                       dblclick: function(node, event) {
+                                               if (typeof(node.attributes.checked) == "boolean") {
+                                                       node.attributes.checked = ! node.attributes.checked;
+                                                       node.getUI().toggleCheck(node.attributes.checked);
+                                               }
+                                       }
+                               },
                                tcaMaxItems: ' . ($PA['fieldConf']['config']['maxitems'] ? intval($PA['fieldConf']['config']['maxitems']) : 99999) . ',
                                tcaExclusiveKeys: "' . (
                $PA['fieldConf']['config']['exclusiveKeys']