PDA

View Full Version : Enable loadmask Iframe while processing



jassyr
31 Oct 2014, 8:03 PM
how to set a loadmask for an Iframe while generating a pdf report

onBtnImprimirClick: function(button, e, eOpts) {
var Iframepanel=Ext.create('Ext.ux.IFrame', {
extend: 'Ext.Component',
alias: 'widget.uxiframe',
loadMask: 'Creating report...please wait!',
src:'pdf.php',

});
var WinReporte=Ext.create('Ext.Window', {
title: 'Reporte de Clientes',
width: 750,
height: 400,
layout: 'fit',
xtype: 'panel',
modal:true,
items: Iframepanel
LoadMask: true
});

WinReporte.show();
} ,
I've set loadmask to true, but didn't work!
Is there anything glaringly wrong here?
thanks

scottmartin
1 Nov 2014, 4:19 PM
You should be able to do something like this:



Ext.onReady(function () {
Ext.widget('panel', {
title: 'My IFrame',
width: 700,
height: 700,
items: {
xtype: 'component',
autoEl: {
tag: 'iframe',
style: 'height: 100%; width: 100%; border: none;',
src: 'muffins-blueberry.pdf'
},
listeners: {
load: {
element: 'el',
fn: function () {
this.parent().unmask();
console.log('done');
}
},
render: function () {
this.up('panel').body.mask('Loading...');
}
}
},
renderTo: Ext.getBody()
});
});

jassyr
1 Nov 2014, 9:00 PM
well done
thanks

rule-of-three
11 Jun 2017, 10:14 AM
How to use this with this plugin?
https://www.sencha.com/forum/showthread.php?129984-Ext-ux-SimpleIFrame-Simple-IFrame-component/page3