Ext.ns("com.quizzpot.tutorial");
com.quizzpot.tutorial.TableLayoutTutorial = {
init: function(){
//code goes here
var win = new Ext.Window({
//"xtype": "window",
"title": "My Window",
"width": 512,
"height": 410,
"layout": "fit",
"items": [
{
"xtype": "form",
"title": "",
"labelWidth": 100,
"labelAlign": "left",
"layout": "table",
"border": false,
"bodyStyle": "padding:10px",
"layoutConfig": {
"columns": 3
},
"items": [
{
"xtype": "panel",
"layout": "form",
"border": false,
"labelAlign": "top",
"padding": 5,
"defaults": {
"width": 150
},
"items": [
{
"xtype": "textfield",
"fieldLabel": "Nombre",
"anchor": "100%"
}
]
},
{
"xtype": "panel",
"layout": "form",
"labelAlign": "top",
"border": false,
"padding": 5,
"defaults": {
"width": 150
},
"items": [
{
"xtype": "textfield",
"fieldLabel": "Apellido",
"anchor": "100%"
}
]
},
{
"xtype": "panel",
"border": false,
"layout": "form",
"labelAlign": "top",
"padding": 5,
"defaults": {
"width": 150
},
"items": [
{
"xtype": "textfield",
"fieldLabel": "Teléfono",
"anchor": "100%"
}
]
},
{
"xtype": "panel",
"layout": "form",
"labelAlign": "top",
"border": false,
"padding": 5,
"defaults": {
"width": 150
},
"items": [
{
"xtype": "textfield",
"fieldLabel": "Email",
"anchor": "100%"
}
]
},
{
"xtype": "panel",
"layout": "form",
"labelAlign": "top",
"border": false,
"padding": 5,
"defaults": {
"width": 150
},
"items": [
{
"xtype": "datefield",
"fieldLabel": "Fecha de nacimiento",
"anchor": "100%"
}
]
},
{
"xtype": "panel",
"layout": "form",
"labelAlign": "top",
"border": false,
"padding": 5,
"defaults": {
"width": 150
},
"items": [
{
"xtype": "combo",
"fieldLabel": "Género",
"anchor": "100%"
}
]
},
{
"xtype": "panel",
"colspan": 3,
"layout": "fit",
"border": false,
"height": 150,
"items": [
{
"xtype": "htmleditor",
"anchor": "100%",
"fieldLabel": "Label",
"height": 200,
"width": 300
}
]
}
],
fbar: {
"xtype": "toolbar",
"items": [
{
xtype: "button",
text: "Guardar"
ACÁ DEBERÍA IR EL LINK AL PHP
},
{
xtype: "button",
text: "Cancelar"
}
]
}
}
]
});
win.show();
}
}
Ext.onReady(com.quizzpot.tutorial.TableLayoutTutorial.init,com.quizzpot.tutorial.TableLayoutTutorial);
handler:function(){
var form = getCmp('form');
if (form.getForm().isValid()) {
form.getForm().submit({
url :'...url.php...',
method :'POST',
params: {
//... parametros, si amerita...
},
waitTitle :'...titulo cualquiera...',
waitMsg :'...msj cualquiera...',
success: function(form,action){
Ext.Msg.alert('Exito',action.result.msg);
//... demas acciones ...
},
failure: function(form,action){ Ext.Msg.alert('Fallo',action.result.msg);
}
});
}
else {
Ext.Msg.show({
title:'...titulo cualquiera...',
msg: '...msj cualquiera...',
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.ERROR});
}
},
scope:this,
tooltip:'...comentario...',
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 .