Commit 43a82884 authored by Andreas Allacher's avatar Andreas Allacher Committed by Markus Klein
Browse files

[BUGFIX] IRRE: close open records correctly when expandSingle is set

inline records are now closed correctly when using expandSingle.
Prior to this commit if a record was opened,
all open records remained open instead of being closed

Resolves: #67691
Releases: master
Change-Id: I5e815824181be17622558c55c452d4a1dac5c339
Reviewed-on: http://review.typo3.org/40552

Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
parent 58d225b4
...@@ -182,7 +182,7 @@ class InlineRecordContainer extends AbstractContainer { ...@@ -182,7 +182,7 @@ class InlineRecordContainer extends AbstractContainer {
$class .= ($isNewRecord ? ' inlineIsNewRecord' : ''); $class .= ($isNewRecord ? ' inlineIsNewRecord' : '');
$html = ' $html = '
<div class="panel panel-default panel-condensed ' . trim($class) . '" id="' . $objectId . '_div"> <div class="panel panel-default panel-condensed ' . trim($class) . '" id="' . $objectId . '_div">
<div class="panel-heading" data-toggle="formengine-inline" id="' . $objectId . '_header"> <div class="panel-heading" data-toggle="formengine-inline" id="' . $objectId . '_header" data-expandSingle="' . ($config['appearance']['expandSingle'] ? 1 : 0) . '">
<div class="form-irre-header"> <div class="form-irre-header">
<div class="form-irre-header-cell form-irre-header-icon"> <div class="form-irre-header-cell form-irre-header-icon">
<span class="caret"></span> <span class="caret"></span>
......
...@@ -126,9 +126,9 @@ var inline = { ...@@ -126,9 +126,9 @@ var inline = {
recObjectId = objectPrefix + this.structureSeparator + records[i]; recObjectId = objectPrefix + this.structureSeparator + records[i];
escapedRecordObjectId = this.escapeObjectId(recObjectId); escapedRecordObjectId = this.escapeObjectId(recObjectId);
var $recordEntry = TYPO3.jQuery('#' + escapedRecordObjectId); var $recordEntry = TYPO3.jQuery('#' + escapedRecordObjectId + '_div');
if (records[i] != callingUid && $recordEntry.hasClass(this.classVisible)) { if (records[i] != callingUid && $recordEntry.hasClass(this.classVisible)) {
TYPO3.jQuery('#' + escapedRecordObjectId + '_div').removeClass(this.classVisible).addClass(this.classCollapsed); $recordEntry.removeClass(this.classVisible).addClass(this.classCollapsed);
if (this.isNewRecord(recObjectId)) { if (this.isNewRecord(recObjectId)) {
this.updateExpandedCollapsedStateLocally(recObjectId, 0); this.updateExpandedCollapsedStateLocally(recObjectId, 0);
} else { } else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment