Fix #7123 - getting abra ready to test
[Pman.Xtuple] / Pman.Tab.XtupleReports.bjs
index 7021cfa..32528ed 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "id": "roo-file-527",
+    "id": "roo-file-384",
     "name": "Pman.Tab.XtupleReports",
     "parent": "Pman.Tab.Admin",
     "title": "",
@@ -25,7 +25,7 @@
                             "split": true,
                             "title": "Versions",
                             "titlebar": true,
-                            "width": 2,
+                            "width": 200,
                             "xtype": "LayoutRegion",
                             "|xns": "Roo"
                         },
@@ -45,7 +45,7 @@
                                 {
                                     "listeners": {
                                         "|render": "function() \n{\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    var rec = this.ds.getAt(rowIndex);\n    new Pman.Download({\n        url : baseURL + '/Roo/Report/' + rec.data.report_name +'-' + rec.data.report_id + '.rpt',\n        method : 'GET',\n        params : {\n            _id : rec.data.report_id,\n            _download : 1\n        }\n    });\n    Roo.MessageBox.alert(\"Downloading\",\n    \n       \"Report template is downloading - use \" +\n           '<a href=\"http://sourceforge.net/projects/openrpt/files/openrpt/\">' + \n           \"report writer to edit this\" + \n           '</a>'\n       );\n           \n    \n    \n}"
+                                        "rowdblclick": "function (_self, rowIndex, e)\n{\n    var rec = this.ds.getAt(rowIndex);\n    new Pman.Download({\n        url : baseURL + '/Roo/Report/' + rec.data.report_name +'-' + rec.data.report_id + '.rpt',\n        method : 'GET',\n        params : {\n            _id : rec.data.report_id,\n            _download : 1\n        }\n    });\n    Roo.MessageBox.alert(\"Downloading\",\n    \n       \"Report template is downloading - use \" +\n           '<a target=\"_new\" href=\"http://sourceforge.net/projects/openrpt/files/openrpt/\">' + \n           \"report writer to edit this\" + \n           '</a>'\n       );\n           \n    \n    \n}"
                                     },
                                     "*prop": "grid",
                                     "autoExpandColumn": "report_descrip",
                                 {
                                     "listeners": {
                                         "|render": "function() \n{\n    _this.vgrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.vpanel.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).data, function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n"
+                                        "|rowdblclick": "function (_self, rowIndex, e)\n{\n    var rec = this.ds.getAt(rowIndex);\n    new Pman.Download({\n        url : baseURL + '/Roo/Report/' + rec.data.report_name +'-' + rec.data.report_id + '.rpt',\n        method : 'GET',\n        params : {\n            _id : rec.data.report_id,\n            _download : 1\n        }\n    });\n    Roo.MessageBox.alert(\"Downloading\",\n    \n       \"Report template is downloading - use \" +\n           '<a target=\"_new\" href=\"http://sourceforge.net/projects/openrpt/files/openrpt/\">' + \n           \"report writer to edit this\" + \n           '</a>'\n       );\n           \n    \n    \n}"
                                     },
                                     "*prop": "grid",
-                                    "autoExpandColumn": "report_name",
+                                    "autoExpandColumn": "Report loaddate",
                                     "loadMask": true,
                                     "xtype": "Grid",
                                     "|xns": "Roo.grid",
                                     "items": [
                                         {
                                             "listeners": {
-                                                "beforeload": "function (_self, options)\n{\n    if (!_this.grid) {\n        return false;\n    } \n    var sel  = _this.grid.selModel.getSelected()\n    if (!sel) {\n        this.removeAll();\n        return false;\n    }\n    options.params.report_name = sel.data.report_name;\n    \n    \n}"
+                                                "beforeload": "function (_self, options)\n{\n    if (!_this.grid) {\n        return false;\n    } \n    var sel  = _this.grid.selModel.getSelected();\n    if (!sel) {\n        this.removeAll();\n        return false;\n    }\n    options.params.report_name = sel.data.report_name;\n    \n    \n}"
                                             },
                                             "*prop": "dataSource",
                                             "remoteSort": true,
                                             "|xns": "Roo"
                                         },
                                         {
-                                            "xtype": "ColumnModel",
-                                            "header": "Report grade",
-                                            "width": 75,
+                                            "*prop": "colModel[]",
                                             "dataIndex": "report_grade",
+                                            "header": "Version",
+                                            "width": 20,
+                                            "xtype": "ColumnModel",
                                             "|renderer": "function(v) { return String.format('{0}', v); }",
-                                            "|xns": "Roo.grid",
-                                            "*prop": "colModel[]"
+                                            "|xns": "Roo.grid"
                                         },
                                         {
                                             "*prop": "colModel[]",
                                             "dataIndex": "report_loaddate",
-                                            "header": "Report loaddate",
-                                            "width": 75,
+                                            "header": "Created",
+                                            "width": 200,
                                             "xtype": "ColumnModel",
-                                            "|renderer": "function(v,x,r) { \n    var vv =   Date.parseDate(r.json.report_loaddatesplit('.')[0], 'Y-m-d H:i:s').format('d/M/Y h:ia');\n    return String.format('{0}', vv? vv.format('d/M/Y') : ''); \n\n    }",
+                                            "|renderer": "function(v,x,r) { \n    var vv =   Date.parseDate(r.json.report_loaddate.split('.')[0], 'Y-m-d H:i:s').format('d/M/Y h:ia');\n    return String.format('{0}', vv); \n\n    }",
                                             "|xns": "Roo.grid"
                                         }
                                     ]