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