Follow-up to bug #15622: t3lib_TCEforms_inline registers superfluous nested level...
authorStanislas Rolland <typo3@sjbr.ca>
Sun, 26 Sep 2010 00:40:31 +0000 (00:40 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Sun, 26 Sep 2010 00:40:31 +0000 (00:40 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8899 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js

index 37bb3cc..3773f09 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
        * Fixed bug #15797: htmlArea RTE: Problem in Firefox inserting non-breaking space with Insert Special Character dialogue
        * Fixed bug #15749: htmlArea RTE: Firefox shows &amp; in external links with query string
        * Fixed bug #15512: htmlArea RTE: Initialization in flexforms broken with TYPO3 4.4
+       * Follow-up to bug #15622: t3lib_TCEforms_inline registers superfluous nested level when renderFieldsOnly is set
 
 2010-09-25  Steffen Gebert  <steffen@steffen-gebert.de>
 
index 0ed5fb4..eb9976b 100644 (file)
@@ -5,6 +5,7 @@
        * Fixed bug #15797: htmlArea RTE: Problem in Firefox inserting non-breaking space with Insert Special Character dialogue
        * Fixed bug #15749: htmlArea RTE: Firefox shows &amp; in external links with query string
        * Fixed bug #15512: htmlArea RTE: Initialization in flexforms broken with TYPO3 4.4
+       * Follow-up to bug #15622: t3lib_TCEforms_inline registers superfluous nested level when renderFieldsOnly is set
 
 2010-09-12  Stanislas Rolland  <typo3@sjbr.ca>
 
index 23dd3f4..5c2a0d0 100644 (file)
@@ -2792,7 +2792,12 @@ HTMLArea.util.TYPO3 = function () {
                 * @author      Oliver Hader <oh@inpublica.de>
                 */
                simplifyNested: function(nested) {
-                       var i, type, level, max, simplifiedNested=[];
+                       var i, type, level, elementId, max, simplifiedNested=[],
+                               elementIdSuffix = {
+                                       tab: '-DIV',
+                                       inline: '_fields',
+                                       flex: '-content'
+                               };
                        if (nested && nested.length) {
                                if (nested[0][0]=='inline') {
                                        nested = inline.findContinuedNestedLevel(nested, nested[0][1]);
@@ -2800,16 +2805,9 @@ HTMLArea.util.TYPO3 = function () {
                                for (i=0, max=nested.length; i<max; i++) {
                                        type = nested[i][0];
                                        level = nested[i][1];
-                                       switch (type) {
-                                               case 'tab':
-                                                       simplifiedNested.push(level+'-DIV');
-                                                       break;
-                                               case 'inline':
-                                                       simplifiedNested.push(level+'_fields');
-                                                       break;
-                                               case 'flex':
-                                                       simplifiedNested.push(level+'-content');
-                                                       break;
+                                       elementId = level + elementIdSuffix[type];
+                                       if (Ext.get(elementId)) {
+                                               simplifiedNested.push(elementId);
                                        }
                                }
                        }