Fix #7123 - getting abra ready to test
[Pman.Xtuple] / Pman.Dialog.XtupleCustomer.js
index f21c44b..465fbfd 100644 (file)
@@ -1930,7 +1930,8 @@ Pman.Dialog.XtupleCustomer = {
                                     },
                                     {
                                         'name': 'created',
-                                        'type': 'string'
+                                        'type': 'date',
+                                        'dateFormat': 'Y-m-d H:i:s'
                                     }
                                 ],
                                 totalProperty : 'total'
@@ -1971,7 +1972,7 @@ Pman.Dialog.XtupleCustomer = {
                             displayInfo : true
                         },
                         '|xns' : 'Roo.grid',
-                        autoExpandColumn : 'id',
+                        autoExpandColumn : 'imgtype',
                         xtype : 'Grid',
                         loadMask : true,
                         xns : Roo.grid,
@@ -1990,11 +1991,10 @@ Pman.Dialog.XtupleCustomer = {
 {
                                        '|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'
@@ -2003,7 +2003,7 @@ Pman.Dialog.XtupleCustomer = {
                                        '|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'
@@ -2012,7 +2012,7 @@ Pman.Dialog.XtupleCustomer = {
                                        '|xns' : 'Roo.grid',
                                        xtype : 'ColumnModel',
                                        header : 'Type',
-                                       width : 75,
+                                       width : 200,
                                        renderer : function(v) { 
                                            return String.format('{0}',v);
                                         },
@@ -2021,6 +2021,15 @@ Pman.Dialog.XtupleCustomer = {
                                    }
                         ],
                         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;