Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2010-08-02 09:19:24

asagala
New member
Registered: 2010-08-02
Posts: 1

delayed load breaks xinha?

I am trying to load xinha in an extjs based application. I have everything working in a basic exmaple so I know my config is ok. This issue I am struggling with now is that I need to delay the loading of my application because I need to load localization files. Now when I delay the loading of my application with code like below. If I remove every around the viewport component it works (basically removing the delayed loading of my app). Is there a way to initialize xinha afterwards or tell it ok its time to chagne textarea in xinha editors? Any help would be appreciated.

<script type="text/javascript">

Ext.onReady(function() {


    Ext.QuickTips.init();

    this.myMask = new Ext.LoadMask(Ext.getBody(), {msg:"Loading..."});
    this.myMask.show();
    NurturLead.Localization.init('en','en');   
   
    var initApp = function(){
   
        var viewport = new Ext.Viewport({
            layout:'border',
            items:[{
                region:'west',
                xtype:'panel',
                layout: 'fit',
                title:' ',           
                collapsible: true,
                width:250,   
                minSize: 200,
                split:true,             
                border:true,
                stateful: true,
                stateId:'westpanel',
                margins:'0 0 0 0',
                cmargins:'0 0 0 0',
                defaults: {
                    border:false,
                    hidden:true
                },
                html:'asdfsdfasdfasdf'
            },{
                region:'center',
                xtype:'panel',
                layout: 'fit',
                border:true,
                margins:'0 0 0 0',
                cmargins:'0 0 0 0',
                defaults: {
                    border:false,
                    hidden:true
                },
                items:[
                        {
                            xtype:'textarea',
                            id:'newbiearea1',
                            name:'newbiearea1'
                        }               
                    ]
               
            }]
        });
        this.myMask.hide();
      };
         
    NurturLead.Localization.on('localizationloaded', initApp, this); 


});

Offline

#2 2010-08-02 11:08:27

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: delayed load breaks xinha?

Perhaps it's late, but I don't see where you are calling any of the Xinha initialization code.  If you are just using "Xinha.addOnloadHandler(xinha_init);" then that's not going to do what you want, it would be a race condition with your Ext.onReady I'd expect.


James Sleeman

Offline

Board footer

Powered by FluxBB