Pman.Tab.AdminNotify.bjs
[Pman.Admin] / Pman.Tab.AdminNotify.bjs
1 {
2     "id": "roo-file-215",
3     "name": "Pman.Tab.AdminNotify",
4     "parent": "",
5     "title": "",
6     "path": "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminNotify.bjs",
7     "items": [
8         {
9             "listeners": {
10                 "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
11             },
12             "background": true,
13             "fitContainer": true,
14             "fitToframe": true,
15             "region": "center",
16             "tableName": "core_notify",
17             "title": "Notifications",
18             "xtype": "GridPanel",
19             "|xns": "Roo",
20             "items": [
21                 {
22                     "listeners": {
23                         "|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}",
24                         "|rowdblclick": "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n"
25                     },
26                     "*prop": "grid",
27                     "autoExpandColumn": "person_id_name",
28                     "loadMask": true,
29                     "xtype": "Grid",
30                     "|xns": "Roo.grid",
31                     "items": [
32                         {
33                             "*prop": "dataSource",
34                             "xtype": "Store",
35                             "remoteSort": true,
36                             "|sortInfo": "{ field : 'ontable', direction: 'ASC' }",
37                             "|xns": "Roo.data",
38                             "items": [
39                                 {
40                                     "*prop": "proxy",
41                                     "xtype": "HttpProxy",
42                                     "method": "GET",
43                                     "|url": "baseURL + '/Roo/core_notify.php'",
44                                     "|xns": "Roo.data"
45                                 },
46                                 {
47                                     "|xns": "Roo.data",
48                                     "xtype": "JsonReader",
49                                     "totalProperty": "total",
50                                     "root": "data",
51                                     "*prop": "reader",
52                                     "id": "id",
53                                     "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'act_when',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'onid',\n        'type': 'int'\n    },\n    {\n        'name': 'ontable',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'msgid',\n        'type': 'string'\n    },\n    {\n        'name': 'sent',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'event_id',\n        'type': 'int'\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': 'event_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'event_id_person_name',\n        'type': 'string'\n    },\n    {\n        'name': 'event_id_event_when',\n        'type': 'date'\n    },\n    {\n        'name': 'event_id_action',\n        'type': 'string'\n    },\n    {\n        'name': 'event_id_ipaddr',\n        'type': 'string'\n    },\n    {\n        'name': 'event_id_on_id',\n        'type': 'int'\n    },\n    {\n        'name': 'event_id_on_table',\n        'type': 'string'\n    },\n    {\n        'name': 'event_id_person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'event_id_remarks',\n        'type': 'string'\n    }\n]"
54                                 }
55                             ]
56                         },
57                         {
58                             "*prop": "footer",
59                             "xtype": "PagingToolbar",
60                             "pageSize": 25,
61                             "displayInfo": true,
62                             "displayMsg": "Displaying core_notify{0} - {1} of {2}",
63                             "emptyMsg": "No core_notify found",
64                             "|xns": "Roo"
65                         },
66                         {
67                             "*prop": "toolbar",
68                             "xtype": "Toolbar",
69                             "|xns": "Roo",
70                             "items": [
71                                 {
72                                     "enableToggle": true,
73                                     "text": "Show Completed",
74                                     "xtype": "Button",
75                                     "|xns": "Roo.Toolbar"
76                                 }
77                             ]
78                         },
79                         {
80                             "*prop": "colModel[]",
81                             "dataIndex": "act_when",
82                             "header": "Act when",
83                             "width": 100,
84                             "xtype": "ColumnModel",
85                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
86                             "|xns": "Roo.grid"
87                         },
88                         {
89                             "*prop": "colModel[]",
90                             "dataIndex": "sent",
91                             "header": "Sent",
92                             "width": 100,
93                             "xtype": "ColumnModel",
94                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
95                             "|xns": "Roo.grid"
96                         },
97                         {
98                             "*prop": "colModel[]",
99                             "dataIndex": "ontable",
100                             "header": "Ontable",
101                             "width": 200,
102                             "xtype": "ColumnModel",
103                             "|renderer": "function(v,x,r) { return String.format('{0}:{1}', v,r.data.onid); }",
104                             "|xns": "Roo.grid"
105                         },
106                         {
107                             "*prop": "colModel[]",
108                             "dataIndex": "person_id_name",
109                             "header": "Who to notify",
110                             "width": 200,
111                             "xtype": "ColumnModel",
112                             "|renderer": "function(v,x,r) {\n     return String.format('{0} <u>&lt;{1}&lt;</u>', v, r.data.email); \n }",
113                             "|xns": "Roo.grid"
114                         },
115                         {
116                             "xtype": "ColumnModel",
117                             "header": "Msgid",
118                             "width": 200,
119                             "dataIndex": "msgid",
120                             "|renderer": "function(v) { return String.format('{0}', v); }",
121                             "|xns": "Roo.grid",
122                             "*prop": "colModel[]"
123                         },
124                         {
125                             "*prop": "colModel[]",
126                             "dataIndex": "event_id_remarks",
127                             "header": "Event",
128                             "width": 75,
129                             "xtype": "ColumnModel",
130                             "|renderer": "function(v) { return String.format('{0}', v); }",
131                             "|xns": "Roo.grid"
132                         }
133                     ]
134                 }
135             ]
136         }
137     ],
138     "permname": "",
139     "modOrder": "001"
140 }