Fixed bug #14293: IRRE loading indicator makes label text jump (Thanks to Lars Houmark)
authorSusanne Moog <typo3@susannemoog.de>
Fri, 7 May 2010 17:43:34 +0000 (17:43 +0000)
committerSusanne Moog <typo3@susannemoog.de>
Fri, 7 May 2010 17:43:34 +0000 (17:43 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7564 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms_inline.php
t3lib/jsfunc.inline.js

index 4cc38dd..24ab8f2 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-05-07  Susanne Moog  <typo3@susanne-moog.de>
+
+       * Fixed bug #14293: IRRE loading indicator makes label text jump (Thanks to Lars Houmark)
+
 2010-05-07  Benjamin Mack  <benni@typo3.org>
 
        * Fixed bug #5003: prefixRelPath() incorrectly changes links to anchors (Thanks to Jigal van Hemert)
index 49b59d2..c1e12de 100644 (file)
@@ -539,7 +539,7 @@ class t3lib_TCEforms_inline {
                }
 
                $altText = t3lib_BEfunc::getRecordIconAltText($rec, $foreign_table);
-               $iconImg = t3lib_iconWorks::getIconImage($foreign_table, $rec, $this->backPath, 'title="'.htmlspecialchars($altText).'" class="absmiddle"');
+               $iconImg = t3lib_iconWorks::getIconImage($foreign_table, $rec, $this->backPath, 'title="' . htmlspecialchars($altText) . '" class="absmiddle" id="' . $objectId . '_icon"');
                $label = '<span id="' . $objectId . '_label">' . $recTitle . '</span>';
                if (!$isVirtualRecord) {
                        $iconImg = $this->wrapWithAnchor($iconImg, '#', array('onclick' => $onClick));
@@ -553,7 +553,7 @@ class t3lib_TCEforms_inline {
                        '<table cellspacing="0" cellpadding="0" border="0" width="100%" style="margin-right: '.$this->inlineStyles['margin-right'].'px;"'.
                        ($this->fObj->borderStyle[2] ? ' background="'.htmlspecialchars($this->backPath.$this->fObj->borderStyle[2]).'"':'').
                        ($this->fObj->borderStyle[3] ? ' class="'.htmlspecialchars($this->fObj->borderStyle[3]).'"':'').'>' .
-                       '<tr class="class-main12"><td width="18">'.$iconImg.'</td><td align="left"><b>'.$label.'</b></td><td align="right">'.$ctrl.'</td></tr></table>';
+                       '<tr class="class-main12"><td width="18" id="' . $objectId . '_iconcontainer">' . $iconImg . '</td><td align="left"><b>' . $label . '</b></td><td align="right">' . $ctrl . '</td></tr></table>';
 
                return $header;
        }
index d0d03d8..2469dac 100644 (file)
@@ -54,11 +54,12 @@ var inline = {
                if(($(objectId+'_fields') && $("irre-loading-indicator"+objectId)) || inline.isLoading) {
                        return false;
                } else if ($(objectId+'_fields') && $(objectId+'_fields').innerHTML.substr(0,16) == '<!--notloaded-->') {
+                       inline.isLoading = true;
                                // add loading-indicator
-                       if ($(objectId+'_label')) {
-                               $(objectId+'_label').insert({before:'<span id="irre-loading-indicator'+objectId+'" class="loading-indicator">&nbsp;</span>'});
+                       if ($(objectId + '_icon')) {
+                               $(objectId + '_icon').hide();
+                               $(objectId + '_iconcontainer').addClassName('loading-indicator');
                        }
-                       inline.isLoading = true;
                        return this.getRecordDetails(objectId, returnURL);      
                }               
                
@@ -375,8 +376,10 @@ var inline = {
                        return;
                objectDiv.update(htmlData);
                        // remove loading-indicator
-               if ($('irre-loading-indicator'+objectId)) 
-                       $('irre-loading-indicator'+objectId).remove();
+               if ($(objectId + '_icon')) {
+                       $(objectId + '_iconcontainer').removeClassName('loading-indicator');
+                       $(objectId + '_icon').show();
+               }
                        // now that the content is loaded, set the expandState
                this.expandCollapseRecord(objectId, expandSingle);
        },