MyWindowUi = Ext.extend(Ext.Window, {
title: '用户登录',
iconCls: 'my-icon',
width: 464,
height: 324,
layout: 'absolute',
showLock : false,
listeners:{
'show':function(win){
if(!win["showLock"]){
win.findById('photo').getEl().dom.src='/logon/login.jpg';
win["showLock"]=true;
}
}
},
initComponent: function() {
this.items = [
{
xtype: 'label',
text: '用户名:',
x: 90,
y: 50,
width: 70
},
{
xtype: 'label',
text: '密 码:',
x: 90,
y: 80,
width: 50
},
{
xtype: 'textfield',
x: 140,
y: 50,
width: 110
},
{
xtype: 'textfield',
x: 140,
y: 80,
width: 110
},
{
id :'photo',
width:450,
height:291,
xtype : 'textfield',
fieldLabel: 'http://localhost/logon/login.jpg',
name: 'photo',
inputType:'image'
}
];
MyWindowUi.superclass.initComponent.call(this);
}
});