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             "listeners": {
10                 "show": "function (_self)\n{\n    _this.grid.footer.onClick('first');\n}"
11             },
12             "height": 500,
13             "title": "Event history",
14             "width": 800,
15             "xtype": "LayoutDialog",
16             "|xns": "Roo",
17             "items": [
18                 {
19                     "|xns": "Roo",
20                     "xtype": "LayoutRegion",
21                     "*prop": "center"
22                 },
23                 {
24                     "listeners": {
25                         "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
26                     },
27                     "background": false,
28                     "fitContainer": true,
29                     "fitToframe": true,
30                     "region": "center",
31                     "tableName": "Events",
32                     "title": "Events",
33                     "xtype": "GridPanel",
34                     "|xns": "Roo",
35                     "items": [
36                         {
37                             "listeners": {
38                                 "|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}",
39                                 "|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"
40                             },
41                             "*prop": "grid",
42                             "autoExpandColumn": "remarks",
43                             "loadMask": true,
44                             "xtype": "Grid",
45                             "|xns": "Roo.grid",
46                             "items": [
47                                 {
48                                     "listeners": {
49                                         "beforeload": "function (_self,o )\n{\n    if (!_this.data || !_this.data.on_id) {\n        return false;\n    }\n    o.params.on_table = _this.data.on_table;\n    o.params.on_id = _this.data.on_id;\n    \n    if (typeof(_this.data.person_table) != 'undefined') {\n         o.params.person_table =_this.data.person_table;\n     }\n}"
50                                     },
51                                     "*prop": "dataSource",
52                                     "remoteSort": true,
53                                     "xtype": "Store",
54                                     "|sortInfo": "{ field : 'event_when', direction: 'DESC' }",
55                                     "|xns": "Roo.data",
56                                     "items": [
57                                         {
58                                             "*prop": "proxy",
59                                             "xtype": "HttpProxy",
60                                             "method": "GET",
61                                             "|url": "baseURL + '/Roo/Events.php'",
62                                             "|xns": "Roo.data"
63                                         },
64                                         {
65                                             "|xns": "Roo.data",
66                                             "xtype": "JsonReader",
67                                             "totalProperty": "total",
68                                             "root": "data",
69                                             "*prop": "reader",
70                                             "id": "id",
71                                             "|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]"
72                                         }
73                                     ]
74                                 },
75                                 {
76                                     "*prop": "footer",
77                                     "xtype": "PagingToolbar",
78                                     "pageSize": 25,
79                                     "displayInfo": true,
80                                     "displayMsg": "Displaying Events{0} - {1} of {2}",
81                                     "emptyMsg": "No Events found",
82                                     "|xns": "Roo"
83                                 },
84                                 {
85                                     "xtype": "ColumnModel",
86                                     "header": "Event when",
87                                     "width": 75,
88                                     "dataIndex": "event_when",
89                                     "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
90                                     "|xns": "Roo.grid",
91                                     "*prop": "colModel[]"
92                                 },
93                                 {
94                                     "*prop": "colModel[]",
95                                     "dataIndex": "person_id_name",
96                                     "header": "Person name",
97                                     "width": 100,
98                                     "xtype": "ColumnModel",
99                                     "|renderer": "function(v) { return String.format('{0}', v); }",
100                                     "|xns": "Roo.grid"
101                                 },
102                                 {
103                                     "*prop": "colModel[]",
104                                     "dataIndex": "action",
105                                     "header": "Action",
106                                     "width": 80,
107                                     "xtype": "ColumnModel",
108                                     "|renderer": "function(v) { return String.format('{0}', v); }",
109                                     "|xns": "Roo.grid"
110                                 },
111                                 {
112                                     "*prop": "colModel[]",
113                                     "dataIndex": "ipaddr",
114                                     "header": "Ipaddr",
115                                     "width": 80,
116                                     "xtype": "ColumnModel",
117                                     "|renderer": "function(v) { return String.format('{0}', v); }",
118                                     "|xns": "Roo.grid"
119                                 },
120                                 {
121                                     "xtype": "ColumnModel",
122                                     "header": "Remarks",
123                                     "width": 200,
124                                     "dataIndex": "remarks",
125                                     "|renderer": "function(v) { return String.format('{0}', v); }",
126                                     "|xns": "Roo.grid",
127                                     "*prop": "colModel[]"
128                                 }
129                             ]
130                         }
131                     ]
132                 },
133                 {
134                     "listeners": {
135                         "click": "function (_self, e)\n{\n    _this.dialog.hide();\n}"
136                     },
137                     "*prop": "buttons[]",
138                     "text": "Close",
139                     "xtype": "Button",
140                     "|xns": "Roo"
141                 }
142             ]
143         }
144     ],
145     "permname": "",
146     "modOrder": "001"
147 }