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