Fixed bug #15551: [IRRE] Open all child records when opening parent records (Thanks...
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 29 Oct 2010 18:45:34 +0000 (18:45 +0000)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 29 Oct 2010 18:45:34 +0000 (18:45 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-3@9230 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms_inline.php

index 51de5f1..bfdce1a 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2010-10-29  Christian Kuhn  <lolli@schwarzbu.ch>
 
+       * Fixed bug #15551: [IRRE] Open all child records when opening parent records (Thanks to Sebastian Fischer)
        * Fixed bug #16140: [reports] PHP warning on missing array in reports system extension (Thanks to Rudi Meyer)
 
 2010-10-29  Ernesto Baschny  <ernst@cron-it.de>
index c549977..9a0d028 100644 (file)
@@ -397,10 +397,11 @@ class t3lib_TCEforms_inline {
                        $fields = $this->wrapFormsSection($fields);
                                // Get configuration:
                        $collapseAll = (isset($config['appearance']['collapseAll']) && $config['appearance']['collapseAll']);
+                       $expandAll = (isset($config['appearance']['collapseAll']) && !$config['appearance']['collapseAll']);
 
                        if ($isNewRecord) {
                                        // show this record expanded or collapsed
-                               $isExpanded = (!$collapseAll ? 1 : 0);
+                               $isExpanded = ($expandAll || (!$collapseAll ? 1 : 0));
                                        // get the top parent table
                                $top = $this->getStructureLevel(0);
                                $ucFieldName = 'uc[inlineView]['.$top['table'].']['.$top['uid'].']'.$appendFormFieldNames;
@@ -409,7 +410,7 @@ class t3lib_TCEforms_inline {
                                $fields .= '<input type="hidden" name="'.$ucFieldName.'" value="'.$isExpanded.'" />';
                        } else {
                                        // show this record expanded or collapsed
-                               $isExpanded = (!$collapseAll && $this->getExpandedCollapsedState($foreign_table, $rec['uid']));
+                               $isExpanded = ((!$collapseAll && $this->getExpandedCollapsedState($foreign_table, $rec['uid'])) || $expandAll);
                                        // set additional field for processing for saving
                                $fields .= '<input type="hidden" name="'.$this->prependCmdFieldNames.$appendFormFieldNames.'[delete]" value="1" disabled="disabled" />';
                        }