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