},
{
'name': 'created',
- 'type': 'string'
+ 'type': 'date',
+ 'dateFormat': 'Y-m-d H:i:s'
}
],
totalProperty : 'total'
displayInfo : true
},
'|xns' : 'Roo.grid',
- autoExpandColumn : 'id',
+ autoExpandColumn : 'imgtype',
xtype : 'Grid',
loadMask : true,
xns : Roo.grid,
{
'|xns' : 'Roo.grid',
xtype : 'ColumnModel',
- width : 75,
+ width : 150,
header : 'Date',
renderer : function(v) {
- var d = Date.parseDate(v, 'Y-m-d H:i:s');
- return String.format('{0}', d ? d.format('d/M/Y') : '');
+ return String.format('{0}', v ? v.format('d/M/Y') : '');
},
xns : Roo.grid,
dataIndex : 'created'
'|xns' : 'Roo.grid',
xtype : 'ColumnModel',
header : 'File Name',
- width : 75,
+ width : 200,
renderer : function(v) { return String.format('{0}', v); },
xns : Roo.grid,
dataIndex : 'filename'
'|xns' : 'Roo.grid',
xtype : 'ColumnModel',
header : 'Type',
- width : 75,
+ width : 200,
renderer : function(v) {
return String.format('{0}',v);
},
}
],
listeners : {
+ rowdblclick : function (_self, rowIndex, e)
+ {
+ var s = _self.getDataSource().getAt(rowIndex);
+
+ new Pman.Download({
+ url : baseURL + '/Images/Download/' + s.data.id
+ });
+
+ },
render : function()
{
_this.igrid = this;