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