You can create a custom bootloader that will hide when everything is loaded ...
1.Create an html holder in the body:
<div id="loading-mask"></div> <div id="loading"> <span id="loading-message">Loading. Please wait...</span> </div>
2. Add css to properly set the mask:
#loading-mask { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #ffffff; z-index: 1; } #loading { position: absolute; top: 40%; left: 45%; z-index: 2; font-family: tahoma,arial,verdana,sans-serif; font-size: 12px; } #loading span { padding: 5px 30px; display: block; }
3. Create a js function outside of the Ext.onReady call:
function hidePreloader() { var loadingMask = Ext.get('loading-mask'); var loading = Ext.get('loading');
4. Call the hidePreloader method when all components and tasks are completed and ready, in your case, after the app.js start method is loaded, for example:
listeners: { afterrender: function(form) { hidePreloader(); } }
here is an example in a script.
source share