Pman.Tab.XtupleReports.bjs
[Pman.Xtuple] / Pman.Tab.XtupleReports.bjs
1 {
2     "id": "roo-file-527",
3     "name": "Pman.Tab.XtupleReports",
4     "parent": "Pman.Tab.Admin",
5     "title": "",
6     "path": "/home/alan/gitlive/web.xtuple/Pman/Xtuple/Pman.Tab.XtupleReports.bjs",
7     "items": [
8         {
9             "title": "Reports",
10             "xtype": "NestedLayoutPanel",
11             "|xns": "Roo",
12             "items": [
13                 {
14                     "|xns": "Roo",
15                     "xtype": "BorderLayout",
16                     "*prop": "layout",
17                     "items": [
18                         {
19                             "|xns": "Roo",
20                             "xtype": "LayoutRegion",
21                             "*prop": "center"
22                         },
23                         {
24                             "*prop": "east",
25                             "split": true,
26                             "title": "Versions",
27                             "titlebar": true,
28                             "width": 150,
29                             "xtype": "LayoutRegion",
30                             "|xns": "Roo"
31                         },
32                         {
33                             "|xns": "Roo",
34                             "xtype": "GridPanel",
35                             "title": "report",
36                             "fitToframe": true,
37                             "fitContainer": true,
38                             "tableName": "report",
39                             "background": true,
40                             "region": "center",
41                             "listeners": {
42                                 "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
43                             },
44                             "items": [
45                                 {
46                                     "listeners": {
47                                         "|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}",
48                                         "|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"
49                                     },
50                                     "*prop": "grid",
51                                     "autoExpandColumn": "report_descrip",
52                                     "loadMask": true,
53                                     "xtype": "Grid",
54                                     "|xns": "Roo.grid",
55                                     "items": [
56                                         {
57                                             "listeners": {
58                                                 "beforeload": "function (_self, options)\n{\n    options.params['search[name]'] = _this.searchName.getValue();\n    options.params._max_versions = 1;\n}"
59                                             },
60                                             "*prop": "dataSource",
61                                             "remoteSort": true,
62                                             "xtype": "Store",
63                                             "|sortInfo": "{ field : 'report_name', direction: 'ASC' }",
64                                             "|xns": "Roo.data",
65                                             "items": [
66                                                 {
67                                                     "*prop": "proxy",
68                                                     "xtype": "HttpProxy",
69                                                     "method": "GET",
70                                                     "|url": "baseURL + '/Roo/report.php'",
71                                                     "|xns": "Roo.data"
72                                                 },
73                                                 {
74                                                     "|xns": "Roo.data",
75                                                     "xtype": "JsonReader",
76                                                     "totalProperty": "total",
77                                                     "root": "data",
78                                                     "*prop": "reader",
79                                                     "id": "id",
80                                                     "|fields": "[\n    {\n        'name': 'report_id',\n        'type': 'int'\n    },\n    {\n        'name': 'report_name',\n        'type': 'string'\n    },\n    {\n        'name': 'report_sys',\n        'type': 'int'\n    },\n    {\n        'name': 'report_source',\n        'type': 'string'\n    },\n    {\n        'name': 'report_descrip',\n        'type': 'string'\n    },\n    {\n        'name': 'report_grade',\n        'type': 'int'\n    },\n    {\n        'name': 'report_loaddate',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    }\n]"
81                                                 }
82                                             ]
83                                         },
84                                         {
85                                             "*prop": "footer",
86                                             "xtype": "PagingToolbar",
87                                             "pageSize": 25,
88                                             "displayInfo": true,
89                                             "displayMsg": "Displaying report{0} - {1} of {2}",
90                                             "emptyMsg": "No report found",
91                                             "|xns": "Roo"
92                                         },
93                                         {
94                                             "*prop": "toolbar",
95                                             "xtype": "Toolbar",
96                                             "|xns": "Roo",
97                                             "items": [
98                                                 {
99                                                     "listeners": {
100                                                         "render": "function (_self)\n{\n    _this.searchName = _self;\n}",
101                                                         "specialkey": "function (_self, e)\n{\n    _this.grid.footer.onClick('first');\n}"
102                                                     },
103                                                     "xtype": "TextField",
104                                                     "|xns": "Roo.form"
105                                                 },
106                                                 {
107                                                     "listeners": {
108                                                         "|click": "function (_self, e)\n{\n_this.grid.footer.onClick('first');\n}"
109                                                     },
110                                                     "cls": "x-btn-icon",
111                                                     "xtype": "Button",
112                                                     "|icon": "rootURL + '/Pman/templates/images/search.gif'",
113                                                     "|xns": "Roo.Toolbar"
114                                                 },
115                                                 {
116                                                     "listeners": {
117                                                         "|click": "function (_self, e)\n{\n    _this.searchBox.setValue('');\n    _this.publication_name_combo.setValue('');\n    _this.publication_lang_combo.setValue('');\n    _this.country_combo.setValue('');\n    _this.category_media_id_combo.setValue('');\n    _this.role_combo.setValue('');      \n\n    \n    _this.grid.footer.onClick('first');\n}"
118                                                     },
119                                                     "cls": "x-btn-icon",
120                                                     "xtype": "Button",
121                                                     "|icon": "rootURL + '/Pman/templates/images/edit-clear.gif'",
122                                                     "|xns": "Roo.Toolbar"
123                                                 },
124                                                 {
125                                                     "|xns": "Roo.Toolbar",
126                                                     "xtype": "Fill"
127                                                 },
128                                                 {
129                                                     "text": "Add",
130                                                     "xtype": "Button",
131                                                     "cls": "x-btn-text-icon",
132                                                     "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
133                                                     "listeners": {
134                                                         "|click": "function()\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
135                                                     },
136                                                     "|xns": "Roo.Toolbar"
137                                                 }
138                                             ]
139                                         },
140                                         {
141                                             "xtype": "ColumnModel",
142                                             "header": "Report name",
143                                             "width": 200,
144                                             "dataIndex": "report_name",
145                                             "|renderer": "function(v) { return String.format('{0}', v); }",
146                                             "|xns": "Roo.grid",
147                                             "*prop": "colModel[]"
148                                         },
149                                         {
150                                             "xtype": "ColumnModel",
151                                             "header": "Report descrip",
152                                             "width": 200,
153                                             "dataIndex": "report_descrip",
154                                             "|renderer": "function(v) { return String.format('{0}', v); }",
155                                             "|xns": "Roo.grid",
156                                             "*prop": "colModel[]"
157                                         }
158                                     ]
159                                 }
160                             ]
161                         },
162                         {
163                             "listeners": {
164                                 "|activate": "function() {\n    _this.vpanel = this;\n    if (_this.vgrid) {\n        _this.vgrid.footer.onClick('first');\n    }\n}"
165                             },
166                             "background": false,
167                             "fitContainer": true,
168                             "fitToframe": true,
169                             "region": "center",
170                             "tableName": "report",
171                             "title": "report",
172                             "xtype": "GridPanel",
173                             "|xns": "Roo",
174                             "items": [
175                                 {
176                                     "listeners": {
177                                         "|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}",
178                                         "|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"
179                                     },
180                                     "*prop": "grid",
181                                     "autoExpandColumn": "report_name",
182                                     "loadMask": true,
183                                     "xtype": "Grid",
184                                     "|xns": "Roo.grid",
185                                     "items": [
186                                         {
187                                             "listeners": {
188                                                 "beforeload": "function (_self, options)\n{\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}"
189                                             },
190                                             "*prop": "dataSource",
191                                             "remoteSort": true,
192                                             "xtype": "Store",
193                                             "|sortInfo": "{ field : 'report_name', direction: 'ASC' }",
194                                             "|xns": "Roo.data",
195                                             "items": [
196                                                 {
197                                                     "*prop": "proxy",
198                                                     "xtype": "HttpProxy",
199                                                     "method": "GET",
200                                                     "|url": "baseURL + '/Roo/report.php'",
201                                                     "|xns": "Roo.data"
202                                                 },
203                                                 {
204                                                     "|xns": "Roo.data",
205                                                     "xtype": "JsonReader",
206                                                     "totalProperty": "total",
207                                                     "root": "data",
208                                                     "*prop": "reader",
209                                                     "id": "id",
210                                                     "|fields": "[\n    {\n        'name': 'report_id',\n        'type': 'int'\n    },\n    {\n        'name': 'report_name',\n        'type': 'string'\n    },\n    {\n        'name': 'report_sys',\n        'type': 'int'\n    },\n    {\n        'name': 'report_source',\n        'type': 'string'\n    },\n    {\n        'name': 'report_descrip',\n        'type': 'string'\n    },\n    {\n        'name': 'report_grade',\n        'type': 'int'\n    },\n    {\n        'name': 'report_loaddate',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    }\n]"
211                                                 }
212                                             ]
213                                         },
214                                         {
215                                             "*prop": "footer",
216                                             "xtype": "PagingToolbar",
217                                             "pageSize": 25,
218                                             "displayInfo": true,
219                                             "displayMsg": "Displaying report{0} - {1} of {2}",
220                                             "emptyMsg": "No report found",
221                                             "|xns": "Roo"
222                                         },
223                                         {
224                                             "xtype": "ColumnModel",
225                                             "header": "Report grade",
226                                             "width": 75,
227                                             "dataIndex": "report_grade",
228                                             "|renderer": "function(v) { return String.format('{0}', v); }",
229                                             "|xns": "Roo.grid",
230                                             "*prop": "colModel[]"
231                                         },
232                                         {
233                                             "xtype": "ColumnModel",
234                                             "header": "Report loaddate",
235                                             "width": 75,
236                                             "dataIndex": "report_loaddate",
237                                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
238                                             "|xns": "Roo.grid",
239                                             "*prop": "colModel[]"
240                                         }
241                                     ]
242                                 }
243                             ]
244                         }
245                     ]
246                 }
247             ]
248         }
249     ],
250     "permname": "",
251     "modOrder": "500"
252 }