var map = {
'date' : 'date',
- 'datetime' : 'string',
+ 'datetime' : 'date',
+ 'time' : 'string', //bogus
'int' : 'int',
'bigint' : 'int',
root : "data",
'*prop' : "reader",
id : 'id', // maybe no..
+
'|fields' : JSON.stringify(reader.reader, null,4).replace(/"/g,"'")
};
"fitContainer": true,
"tableName": reader.table,
"background": true,
+ "region" : 'center',
"listeners": {
"|activate": "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}"
},
"listeners": {
"|render": "function() \n" +
"{\n" +
- " _this.grid = this; \n" +
+ " _this.grid = this; \n" +
" //_this.dialog = Pman.Dialog.FILL_IN\n" +
" if (_this.panel.active) {\n" +
" this.footer.onClick('first');\n" +
" }\n" +
- "}"
+ "}",
+ "|rowdblclick": "function (_self, rowIndex, e)\n" +
+ "{\n" +
+ " if (!_this.dialog) return;\n" +
+ " _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n" +
+ " _this.grid.footer.onClick('first');\n" +
+ " }); \n" +
+ "}\n"
},
"|xns": "Roo.grid",
{
"*prop": "dataSource",
"xtype": "Store",
-
+ remoteSort : true,
+ '|sortInfo' : "{ field : '" + reader.firstTxtCol + "', direction: 'ASC' }",
"|xns": "Roo.data",
"items": [
"listeners": {
"|click": "function()\n"+
"{\n"+
- " //yourdialog.show( { id : 0 } , function() {\n"+
- " // _this.grid.footer.onClick('first');\n"+
- " //}); \n"+
+ " if (!_this.dialog) return;\n" +
+ " _this.dialog.show( { id : 0 } , function() {\n"+
+ " _this.grid.footer.onClick('first');\n"+
+ " }); \n"+
"}\n"
},
"|xns": "Roo.Toolbar"
" Roo.MessageBox.alert(\"Error\", s.length ? \"Select only one Row\" : \"Select a Row\");\n"+
" return;\n"+
" }\n"+
- " \n"+
- " //_this.dialog.show(s[0].data, function() {\n"+
- " // _this.grid.footer.onClick('first');\n"+
- " // }); \n"+
+ " if (!_this.dialog) return;\n" +
+ " _this.dialog.show(s[0].data, function() {\n"+
+ " _this.grid.footer.onClick('first');\n"+
+ " }); \n"+
" \n"+
"}\n"
"listeners": {
"|click": "function()\n"+
"{\n"+
- " //Pman.genericDelete(_this, _this.grid.tableName); \n"+
+ " Pman.genericDelete(_this, '" + reader.table + "'); \n"+
"}\n"+
" "
},
continue;
}
formHeight += reader.form[k].xtype == 'TextArea' ? 100 : 30;
+
formElements.push(reader.form[k]);
}
- formElements.push(reader.form['id']);
+ if (reader.form['id']) {
+ formElements.push(reader.form['id']);
+ }
+
print("WRITE: " + dir + '/' + cfg.DBNAME + '_' + reader.table + '.json');
var frmCfg =