1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
| Ext.onReady(function() {
Ext.ns('Marel');
Marel.wConnect = Ext.extend(Ext.Window, {
initComponent : function() {
var config = {
id: 'wConnect'
,itemId: 'wConnect'
,width: 320
,height: 130
,layout: 'fit'
,border: false
,frame: true
,title: 'Connexion'
,items: [{
id: 'imginform-form'
,xtype: 'form'
,frame: true
,method: 'post'
,defaults: {anchor:'95%'}
,items: [{
id: 'loginid'
,xtype: 'textfield'
,fieldLabel: 'Login'
,allowBlank: false
}
,{
id: 'passwordid'
,xtype: 'textfield'
,fieldLabel: 'Password'
,inputType: 'password'
,allowBlank: false
}
]
,buttonAlign: 'right'
,buttons: [
{
xtype: 'button'
,text: 'Se connecter'
,handler: function() {alert('connexion');} // pour test
},{
xtype: 'button'
,text: 'Annuler'
,handler: function() {Ext.getCmp('wConnect').close();}
}
]
}]
} // fin config
// apply config
Ext.apply(this, Ext.apply(this.initialConfig, config));
// call parent
Marel.wConnect.superclass.initComponent.apply(this, arguments);
this.show();
} // fin function initComponent
}); // fin Marel.wConnect = Ext.extend(Ext.form.FormPanel
Ext.reg('wConnect', Marel.wConnect);
}); |
Partager