Pman.Dialog.AdminEventLog.bjs
[Pman.Admin] / Pman.Dialog.AdminEventLog.bjs
1 {
2     "id": "roo-file-545",
3     "name": "Pman.Dialog.AdminEventLog",
4     "parent": "",
5     "title": "",
6     "path": "/home/alan/gitlive/Pman.Admin/Pman.Dialog.AdminEventLog.bjs",
7     "items": [
8         {
9             "|xns": "Roo",
10             "xtype": "LayoutDialog",
11             "items": [
12                 {
13                     "|xns": "Roo",
14                     "xtype": "GridPanel",
15                     "title": "Events",
16                     "fitToframe": true,
17                     "fitContainer": true,
18                     "tableName": "Events",
19                     "background": true,
20                     "region": "center",
21                     "listeners": {
22                         "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
23                     },
24                     "items": [
25                         {
26                             "*prop": "grid",
27                             "xtype": "Grid",
28                             "autoExpandColumn": "person_name",
29                             "loadMask": true,
30                             "listeners": {
31                                 "|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}",
32                                 "|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"
33                             },
34                             "|xns": "Roo.grid",
35                             "items": [
36                                 {
37                                     "*prop": "dataSource",
38                                     "xtype": "Store",
39                                     "remoteSort": true,
40                                     "|sortInfo": "{ field : 'person_name', direction: 'ASC' }",
41                                     "|xns": "Roo.data",
42                                     "items": [
43                                         {
44                                             "*prop": "proxy",
45                                             "xtype": "HttpProxy",
46                                             "method": "GET",
47                                             "|url": "baseURL + '/Roo/Events.php'",
48                                             "|xns": "Roo.data"
49                                         },
50                                         {
51                                             "|xns": "Roo.data",
52                                             "xtype": "JsonReader",
53                                             "totalProperty": "total",
54                                             "root": "data",
55                                             "*prop": "reader",
56                                             "id": "id",
57                                             "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_name',\n        'type': 'string'\n    },\n    {\n        'name': 'event_when',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'action',\n        'type': 'string'\n    },\n    {\n        'name': 'ipaddr',\n        'type': 'string'\n    },\n    {\n        'name': 'on_id',\n        'type': 'int'\n    },\n    {\n        'name': 'on_table',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_table',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_dt',\n        'type': 'date'\n    },\n    {\n        'name': 'person_id_firstname',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_lastname',\n        'type': 'string'\n    }\n]"
58                                         }
59                                     ]
60                                 },
61                                 {
62                                     "*prop": "footer",
63                                     "xtype": "PagingToolbar",
64                                     "pageSize": 25,
65                                     "displayInfo": true,
66                                     "displayMsg": "Displaying Events{0} - {1} of {2}",
67                                     "emptyMsg": "No Events found",
68                                     "|xns": "Roo"
69                                 },
70                                 {
71                                     "*prop": "toolbar",
72                                     "xtype": "Toolbar",
73                                     "|xns": "Roo",
74                                     "items": [
75                                         {
76                                             "text": "Add",
77                                             "xtype": "Button",
78                                             "cls": "x-btn-text-icon",
79                                             "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
80                                             "listeners": {
81                                                 "|click": "function()\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
82                                             },
83                                             "|xns": "Roo.Toolbar"
84                                         },
85                                         {
86                                             "text": "Edit",
87                                             "xtype": "Button",
88                                             "cls": "x-btn-text-icon",
89                                             "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
90                                             "listeners": {
91                                                 "|click": "function()\n{\n    var s = _this.grid.getSelectionModel().getSelections();\n    if (!s.length || (s.length > 1))  {\n        Roo.MessageBox.alert(\"Error\", s.length ? \"Select only one Row\" : \"Select a Row\");\n        return;\n    }\n    if (!_this.dialog) return;\n    _this.dialog.show(s[0].data, function() {\n        _this.grid.footer.onClick('first');\n    }); \n    \n}\n"
92                                             },
93                                             "|xns": "Roo.Toolbar"
94                                         },
95                                         {
96                                             "text": "Delete",
97                                             "cls": "x-btn-text-icon",
98                                             "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
99                                             "xtype": "Button",
100                                             "listeners": {
101                                                 "|click": "function()\n{\n     Pman.genericDelete(_this, 'Events'); \n}\n        "
102                                             },
103                                             "|xns": "Roo.Toolbar"
104                                         }
105                                     ]
106                                 },
107                                 {
108                                     "xtype": "ColumnModel",
109                                     "header": "Id",
110                                     "width": 75,
111                                     "dataIndex": "id",
112                                     "|renderer": "function(v) { return String.format('{0}', v); }",
113                                     "|xns": "Roo.grid",
114                                     "*prop": "colModel[]"
115                                 },
116                                 {
117                                     "xtype": "ColumnModel",
118                                     "header": "Person name",
119                                     "width": 200,
120                                     "dataIndex": "person_name",
121                                     "|renderer": "function(v) { return String.format('{0}', v); }",
122                                     "|xns": "Roo.grid",
123                                     "*prop": "colModel[]"
124                                 },
125                                 {
126                                     "xtype": "ColumnModel",
127                                     "header": "Event when",
128                                     "width": 75,
129                                     "dataIndex": "event_when",
130                                     "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
131                                     "|xns": "Roo.grid",
132                                     "*prop": "colModel[]"
133                                 },
134                                 {
135                                     "xtype": "ColumnModel",
136                                     "header": "Action",
137                                     "width": 200,
138                                     "dataIndex": "action",
139                                     "|renderer": "function(v) { return String.format('{0}', v); }",
140                                     "|xns": "Roo.grid",
141                                     "*prop": "colModel[]"
142                                 },
143                                 {
144                                     "xtype": "ColumnModel",
145                                     "header": "Ipaddr",
146                                     "width": 200,
147                                     "dataIndex": "ipaddr",
148                                     "|renderer": "function(v) { return String.format('{0}', v); }",
149                                     "|xns": "Roo.grid",
150                                     "*prop": "colModel[]"
151                                 },
152                                 {
153                                     "xtype": "ColumnModel",
154                                     "header": "On",
155                                     "width": 75,
156                                     "dataIndex": "on_id",
157                                     "|renderer": "function(v) { return String.format('{0}', v); }",
158                                     "|xns": "Roo.grid",
159                                     "*prop": "colModel[]"
160                                 },
161                                 {
162                                     "xtype": "ColumnModel",
163                                     "header": "On table",
164                                     "width": 200,
165                                     "dataIndex": "on_table",
166                                     "|renderer": "function(v) { return String.format('{0}', v); }",
167                                     "|xns": "Roo.grid",
168                                     "*prop": "colModel[]"
169                                 },
170                                 {
171                                     "xtype": "ColumnModel",
172                                     "header": "Person",
173                                     "width": 75,
174                                     "dataIndex": "person_id",
175                                     "|renderer": "function(v) { return String.format('{0}', v); }",
176                                     "|xns": "Roo.grid",
177                                     "*prop": "colModel[]"
178                                 },
179                                 {
180                                     "xtype": "ColumnModel",
181                                     "header": "Remarks",
182                                     "width": 200,
183                                     "dataIndex": "remarks",
184                                     "|renderer": "function(v) { return String.format('{0}', v); }",
185                                     "|xns": "Roo.grid",
186                                     "*prop": "colModel[]"
187                                 },
188                                 {
189                                     "xtype": "ColumnModel",
190                                     "header": "Person table",
191                                     "width": 200,
192                                     "dataIndex": "person_table",
193                                     "|renderer": "function(v) { return String.format('{0}', v); }",
194                                     "|xns": "Roo.grid",
195                                     "*prop": "colModel[]"
196                                 }
197                             ]
198                         }
199                     ]
200                 }
201             ]
202         }
203     ],
204     "permname": "",
205     "modOrder": "001"
206 }