Elapas.addClient=function(){
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = 'side';
var propPanelWidth = "200";
function save (){ }
function dontsave(){}
var saveBtn = new Ext.Button({
text: Lang.Trm.SaveChanges,
handler: function()
{
save();
},
icon: "./images/ok.png"
});
var cancelBtn = new Ext.Button({
text: Lang.Trm.Cancel,
handler: function()
{
win.close();
},
icon: "./images/close16.png"
});
var table = new Ext.Panel({
title: 'Table Layout'
});
var image = new Elapas.Image({
xtype: "image",
rowspan: 9
});
var nameClient = new Ext.form.TextField({
name : "nameClient",
width : propPanelWidth,
id : "nameClient",
allowBlank: false,
vtype:"alpha",
maxLenght:20
});
var apClient = new Ext.form.TextField({
name : "apClient",
width : propPanelWidth,
allowBlank:false,
emptyText:"Apellido Paterno..."
});
var amClient = new Ext.form.TextField({
name : "amClient",
width : propPanelWidth,
emptyText:"Apellido Materno..."
});
var aeClient = new Ext.form.TextField({
name : "aeClient",
width : propPanelWidth,
emptyText:"Apellido de Esposo..."
});
var ciClient = new Ext.form.TextField({
name : "ciClient",
width : propPanelWidth,
allowBlank:false,
emptyText:"Carnet de Identidad..."
});
var telClient = new Ext.form.TextField({
name : "telClient",
width : propPanelWidth,
emptyText:"Teléfono de Casa...",
vtype:"num"
});
var celClient = new Ext.form.TextField({
name : "celClient",
width : propPanelWidth,
emptyText:"Celular Personal...",
vtype:"num"
});
var comboPredio = new Ext.form.ComboBox({
fieldLabel:"Caracteristicas Predio",
name: "comboPredio",
width:propPanelWidth,
forceSelection: true,
editable: false,
emptyText:"Caracteristica del predio"
});
var comboRequisitos = new Ext.form.ComboBox({
fieldLabel:"Requisitos",
name: "comboRequisitos",
width:propPanelWidth,
forceSelection: true,
editable: false,
emptyText:"Requisitos del Interesado"
});
var ad_form = new Ext.FormPanel({
border : false,
labelWidth: 90,
frame: true,
buttonAlign: "right",
items : [image,{
xtype: "label",
text: "Nombre del Interesado",
cls: "propertiesLabel"
},nameClient,{
xtype: "label",
text: "Apellido Paterno",
cls: "propertiesLabel"
},apClient,{
xtype: "label",
text: "Apellido Materno",
cls: "propertiesLabel"
}, amClient,{
xtype: "label",
text: "Apellido de Esposo",
cls: "propertiesLabel"
}, aeClient,{
xtype: "label",
text: "Carnet de Identidad",
cls: "propertiesLabel"
}, ciClient,{
xtype: "label",
text: "Telefono",
cls: "propertiesLabel"
}, telClient,{
xtype: "label",
text: "Celular",
cls: "propertiesLabel"
},celClient,{
xtype: "label",
text: "Caracteristicas del Predio",
cls: "propertiesLabel"
},comboPredio,{
xtype: "label",
text: "Requisitos del Cliente",
cls: "propertiesLabel"
},comboRequisitos],
layout:'table',
layoutConfig: {
tableAttrs: {
style: {
height: "100px",
width: "100%",
margin: "10px"
}
},
columns: 3
},
keys:({
key: Ext.EventObject.ENTER ,
fn: save,
scope: this
})
});
var win = new Ext.Window({
renderTo: "desktop",
minimizable:true,
title: "Ingresar nuevo Cliente",
draggable:true,
closable:true,
width: 550,
height: 300,
items: ad_form,
buttons: [
saveBtn,
cancelBtn
]
});
win.show();
Ext.getCmp('nameClient').focus(true, 500);
image.setSrc("./images/add_Client128.png");
}; It looks like you're new here. If you want to get involved, click one of these buttons!
The content of this site is copyrighted by Quizzpot.com, it is prohibited to publish our tutorials on other blogs, magazines or any other media without prior permission.
Copyright © 2012 Quizzpot.
Our visitors are mostly developers and Web designers, advertise with us, you only need to contact us .