break;
+ default:
+ throw "Invalid data base type " + cfg.DBTYPE + " should be MySQL or PostgreSQL";
/*
"Field": "province",
"Type": "varchar(255)",
//print(JSON.stringify(schema, null,4)); Seed.quit();
schema.forEach(function(e) {
- e.Type = e.type;
- e.Field = e.field;
+ e.Type = e.Type || e.type;
+ e.Field = e.Field || e.field;
var type = e.Type.match(/([^(]+)\(([^\)]+)\)/);
var row = { };
'|xns' : 'Roo.form',
xtype : xtype
}
+ if (xtype == 'DateField') {
+ form[row.name].format = 'Y-m-d';
+ form[row.name].width = 100;
+ }
+
if (xtype == 'TextArea') {
form[row.name].height = 100;
}
"|rowdblclick": "function (_self, rowIndex, e)\n" +
"{\n" +
" if (!_this.dialog) return;\n" +
- " _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n" +
+ " _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {\n" +
" _this.grid.footer.onClick('first');\n" +
" }); \n" +
"}\n"
"resizable": false,
"title": "Edit / Create " + reader.table,
"width": 400,
+ "modal" : true,
"xtype": "LayoutDialog",
"|xns": "Roo",
"items": [