2012-07-10 9 views
6

standard ExtJS MVC applicationのビューポートにLoadMaskを適用するにはどのように必要なファイルをロードしていますか? ExtJSのPanelExtJS 4.1 MVC:読み込み中にビューポートにLoadMaskを適用する方法は?

main上記のMVCビューのxtypeある

Ext.Loader.setConfig({enabled:true}); 

Ext.application({ 
    requires: [ 
     'Ext.container.Viewport', 
    ], 

    name: 'APP', 
    appFolder: 'app', 

    controllers: [ 
     'Main' 
    ], 

    launch: function() { 

     Ext.create('Ext.container.Viewport', { 
      layout: 'fit', 
      items: [ 
       { 
        xtype: 'main' 
       }    
      ] 
     }); 
    } 
}); 

、それが延びる可能性があり、標準的な処理を行います。

ようなMVCアプリケーションの一例は、app.jsための次のコードでありますこのためのアプローチユビキタス要件はありますか?

答えて

5

あなたがしたいのは、index.htmlファイル内に画像を読み込むことです。そのような何か:その後、

<div id="page-loader"> 
    <img style="position:absolute; width:128px; height:15px; left:50%; top:50%; margin-left:-64px; margin-top: -7px;" src="resources/images/loader.gif" /> 
</div> 

そして、あなたのlaunch()機能でこのdivを隠す:

if (Ext.get('page-loader')) { 
    Ext.get('page-loader').remove(); 
} 
+0

! –

関連する問題