Show
Ignore:
Timestamp:
2007-12-05 07:19:32 (10 months ago)
Author:
martinkou
Message:

Added throbber animation at dialog load.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/branches/features/floating_dialog/editor/fckdialog.html

    r1104 r1177  
    4949        RefreshContainerSize() ; 
    5050        LoadInnerDialog() ; 
     51        ShowThrobber() ; 
    5152        var titleElement = document.getElementById( 'TitleArea' ) ; 
    5253        titleElement.onmousedown = oEditor.FCKDialog._DragMouseDownHandler ; 
     
    7677} 
    7778 
     79function ShowThrobber() 
     80{ 
     81        var throbberParent = document.getElementById( 'throbberBlock' ) ; 
     82        var frm = document.getElementById( 'frmMain' ) ;  
     83        var html = '<img src="%%" width="28" height="28" border="0" /><br />Loading...'.replace( '%%', oEditor.FCKConfig.SkinPath + 'images/dialog.loading.gif' ) ; 
     84        throbberParent.innerHTML = html ; 
     85 
     86        var frmCoords = oEditor.FCKTools.GetDocumentPosition( window, frm ) ; 
     87        var x = frmCoords.x + ( frm.offsetWidth - throbberParent.offsetWidth ) / 2 ; 
     88        var y = frmCoords.y + ( frm.offsetHeight - throbberParent.offsetHeight ) / 2 ; 
     89        throbberParent.style.left = parseInt(x) + 'px' ; 
     90        throbberParent.style.top = parseInt(y) + 'px' ; 
     91} 
     92 
     93function HideThrobber() 
     94{ 
     95        var throbberParent = document.getElementById( 'throbberBlock' ) ; 
     96        throbberParent.parentNode.removeChild( throbberParent ) ; 
     97} 
     98 
    7899function InnerDialogLoaded() 
    79100{ 
     101        HideThrobber() ; 
    80102        var oInnerDoc = document.getElementById('frmMain').contentWindow.document ; 
    81103 
     
    376398                        </tr> 
    377399                </table> 
     400                <div id="throbberBlock" style="position: absolute; z-index: 10; text-align: center; font-size: 9px;"> 
     401                </div> 
    378402        </body> 
    379403</html>