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