PDA

View Full Version : loading mask on a dataview



toxkillfraex
5 Apr 2012, 12:03 AM
is there a way to place a loading a mask on a data view until all the thumbnails it will be showing are received?

vietits
5 Apr 2012, 12:45 AM
To put a mask


<view>.getEl().mask();

To remove applied mask


<view>.getEl().unmask();

toxkillfraex
5 Apr 2012, 12:52 AM
To put a mask


<view>.getEl().mask();

To remove applied mask


<view>.getEl().unmask();


figured somebody would come up with that. That I already have but the mask goes from as soon as the panels it's in a done and rendered.

I'm more looking for the funcion that says the view is loading


var dataView = new Ext.DataView(
{

xtype: 'documentDataView',

cls: 'tabPanelChild',

store: subFolder.documentsStore,

tpl: tplThumbs,

multiSelect: false,
singleSelect: true,

trackOver: true,
overItemCls: 'x-item-over',
itemSelector: 'div.thumb-wrap',

autoScroll: 'true',

listeners: {
//some listeners here
}
}
});


I suppose I can define it somewhere in the data view but I have no clue where

vietits
5 Apr 2012, 1:19 AM
You should catch load event of the store and put <view>.getEl().unmask() there.

toxkillfraex
5 Apr 2012, 1:25 AM
You should catch load event of the store and put <view>.getEl().unmask() there.

ah now we're getting somewhere.
would this work the same as listening on a click event?

as in I add in the store somewhere listeners{ load: someAction} ?

vietits
5 Apr 2012, 1:28 AM
<your store>.on('load', function(){ <view>.getEl().unmask()})