Affichage des articles dont le libellé est How to resize window height in ExtJS. Afficher tous les articles
Affichage des articles dont le libellé est How to resize window height in ExtJS. Afficher tous les articles

mercredi 29 octobre 2014

How to resize window height in ExtJS

I below code I am able to resize or get event while changing (resize) width but not call rezise event while changing height.

If any one know how manage resize event while changing height?

Ext.define('ClaimPortalApp.view.dialogs.Email', {

extend: 'Ext.window.Window',

alias: 'widget.dialogEmail',


requires: [

'Common.view.Text',

'Common.view.ButtonPrimary',

'Common.view.ButtonSecondary'

],


title : 'Email',

id:'previewWindow',

closable : true,

modal: true,

height:550,

layout: 'fit',

resizable: true,

width: 800,


/*layout: {

type: 'absolute'

},*/

items:[

{

xtype: 'form',

items:[

{

xtype: 'form',

layout: {

align: 'stretch',

type: 'vbox'

},

bodyPadding: 10,

header: false,

title: 'Email',

items: [


{

xtype: 'container',

itemId:'errorBox',

style:'background-color: #fff1ce; color: #cc2d30;',

hidden:true,

items: [

{

xtype:'label',

itemId: 'errorMsg'

}

]

},

{

xtype: 'textfield',

itemId: 'toData',

// vtype: 'email',

//vtypeText: null,

//regex: /^([\w\-\'\-]+)(\.[-\'\-]+)*@([\w\-]+\.){1,5}([A-Za-z]){2,4}$/,

flex: 1,

labelAlign: 'left',

labelWidth: 60,

fieldLabel: 'To'

},

{

xtype: 'textfield',

itemId: 'ccData',

// vtype: 'email',

//vtypeText: 'email id is not valid',

//msgTarget: 'under',

flex: 1,

labelAlign: 'left',

labelWidth: 60,

fieldLabel: 'Cc'

},

{

xtype: 'textfield',

itemId: 'subjectData',

flex: 1,

labelAlign: 'left',

labelWidth: 60,

fieldLabel: 'Subject'

},


/*{

xtype: 'filefield',

itemId:'uploadFile',

emptyText: 'select file',

buttonText: 'Browse',

hidden:false

},*/

{

xtype: 'textareafield', //htmleditor

itemId:'textFreeForm',

height: 130,

margin: '4 0 0 0',

flex: 1

},

{

xtype: 'container',

height: 180,


style:'overflow:auto;',

items: [

{

xtype: 'displayfield',

fieldLabel: 'The following data sections will be emailed',

labelAlign: 'top',

labelWidth:'100%',

width:'100%',

value: '',

itemId: 'dataPreview'

}

]

},


{

xtype: 'container',

flex: 1,

margin: '4 0 0 0',

layout: {

align: 'middle',

type: 'hbox'

},

items: [

{

xtype: 'buttonprimary',

itemID:'send',

flex: 1,

text: 'Send',

handler:function(){

var toData = ClaimPortalApp.controller.Utilities.GetComponentByItemId('toData').getValue();

var ccData = ClaimPortalApp.controller.Utilities.GetComponentByItemId('ccData').getValue();

var subject = ClaimPortalApp.controller.Utilities.GetComponentByItemId('subjectData').getValue();

var body = ClaimPortalApp.controller.Utilities.GetComponentByItemId('textFreeForm').getValue();


var stringVal = ClaimPortalApp.controller.Utilities.GetComponentByItemId('dataPreview').getValue();

var regex = /<br\s*[\/]?><br\s*[\/]?>/gi;

var queryString = stringVal.replace(regex , ',');


var reg = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;

if (reg.test(toData))

{

var closeWindow = Ext.getCmp('previewWindow');

if(ccData!== ''){

if (reg.test(ccData)){

closeWindow.isMailValidate(toData,ccData,subject,body,queryString);

}

else{

ClaimPortalApp.controller.Utilities.GetComponentByItemId('errorMsg').setText('Please Enter Valid Email Id');

ClaimPortalApp.controller.Utilities.GetComponentByItemId('errorBox').show();

return false;

}

}

else{

closeWindow.isMailValidate(toData,ccData,subject,body,queryString);

ClaimPortalApp.controller.Utilities.GetComponentByItemId('errorMsg').setText('');

ClaimPortalApp.controller.Utilities.GetComponentByItemId('errorBox').hide();

}


}

else{

ClaimPortalApp.controller.Utilities.GetComponentByItemId('errorMsg').setText('Please Enter Valid Email Id');

ClaimPortalApp.controller.Utilities.GetComponentByItemId('errorBox').show();

return false;

}


}

},

{

xtype: 'buttonsecondary',

itemId:'cancel',

flex: 1,

text: 'Cancel',

handler:function(){

this.up('.window').close();

}

}

]

}

]

}

],


listeners: {

resize: {

fn: function(el) {

alert('outer panel resize');

}

},


}

}


],






How to resize window height in ExtJS