Bug #18634 ยป 0008148.patch
t3lib/jsfunc.inline.js (Arbeitskopie) | ||
---|---|---|
},
|
||
updateExpandedCollapsedStateLocally: function(objectId, value) {
|
||
var ucName = 'uc'+this.parseFormElementName('parts', objectId, 3, 2);
|
||
var ucName = 'uc[inlineView]'+this.parseFormElementName('parts', objectId, 3, 2);
|
||
var ucFormObj = document.getElementsByName(ucName);
|
||
if (ucFormObj.length) ucFormObj[0].value = value;
|
||
if (ucFormObj.length) {
|
||
ucFormObj[0].value = value;
|
||
}
|
||
},
|
||
createNewRecord: function(objectId, recordUid) {
|
t3lib/class.t3lib_tceforms_inline.php (Arbeitskopie) | ||
---|---|---|
* Update expanded/collapsed states on new inline records if any.
|
||
*
|
||
* @param array $uc: The uc array to be processed and saved (by reference)
|
||
* @param object $tce: Instance of TCEmain that saved data before (by reference)
|
||
* @param t3lib_TCEmain $tce: Instance of TCEmain that saved data before (by reference)
|
||
* @return void
|
||
*/
|
||
function updateInlineView(&$uc, &$tce) {
|
||
... | ... | |
foreach ($topRecords as $topUid => $childElements) {
|
||
foreach ($childElements as $childTable => $childRecords) {
|
||
$uids = array_keys($tce->substNEWwithIDs_table, $childTable);
|
||
$inlineViewCurrent =& $inlineView[$topTable][$topUid][$childTable];
|
||
if (count($uids)) {
|
||
$newExpandedChildren = array();
|
||
foreach ($childRecords as $childUid => $state) {
|
||
if ($state && in_array($childUid, $uids)) {
|
||
$newChildUid = $tce->substNEWwithIDs[$childUid];
|
||
$inlineViewCurrent[] = $newChildUid;
|
||
$newExpandedChildren[] = $newChildUid;
|
||
}
|
||
}
|
||
$inlineViewCurrent = array_unique($inlineViewCurrent);
|
||
// Add new expanded child records to UC (if any):
|
||
if (count($newExpandedChildren)) {
|
||
$inlineViewCurrent =& $inlineView[$topTable][$topUid][$childTable];
|
||
if (is_array($inlineViewCurrent)) {
|
||
$inlineViewCurrent = array_unique(array_merge($inlineViewCurrent, $newExpandedChildren));
|
||
} else {
|
||
$inlineViewCurrent = $newExpandedChildren;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|