load - Applying loadMask() to a single element in extjs? -
how apply loadmask 1 element, , not whole browser width-height?
default
here, 1 element masked, , messagebox in center, inside element , not whole display...
ideas?
edit:
@molecule , thanks, when data loading source, need :
{ xtype:"button", text:"alert", handler: function(){ ext.msg.show({ title:'save changes?', msg: 'you closing ?', buttons: ext.msg.yes, setloading: // here somehow mask parent element, , position alertbox... } }
every component has it's own loadmask
property. can use calling yourcomponent.setloading
. here fiddle illustrate i'm talking about.
another way using new ext.loadmask(yourcomponent.el, {msg:"please wait..."});
. can @ usage in fiddle.
update
here code example shows how apply extjs4 loadmask , messagebox specified widget
ext.create('ext.panel.panel', { width: 600, height: 400, title: 'border layout', layout: 'border', items: [{ title: 'west region collapsible', region:'west', xtype: 'panel', width: 400, id: 'west-region-container', layout: 'fit' },{ title: 'center region', region: 'center', xtype: 'panel', layout: 'fit', }], renderto: ext.getbody() }); var mymask = new ext.loadmask(ext.getcmp('west-region-container').el, {usemsg: false}); mymask.show(); var msg = ext.msg.show({ title:'save changes?', msg: 'bla-bla', buttons: ext.msg.ok, modal: false }); msg.alignto(ext.getcmp('west-region-container').el, 'c-c');
and here try-it-yourself example.
Comments
Post a Comment