Pman.Tab.AdminNotifyRecur.bjs
[Pman.Admin] / Pman.Tab.AdminNotifyRecur.bjs
1 {
2     "id": "roo-file-256",
3     "name": "Pman.Tab.AdminNotifyRecur",
4     "parent": "Pman.Tab.AdminWatchNotify",
5     "title": "Pman.Tab.AdminNotifyRecur",
6     "path": "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminNotifyRecur.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_recur",
17             "title": "Recurrent 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).data, 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                             "|xns": "Roo",
34                             "xtype": "Toolbar",
35                             "*prop": "toolbar",
36                             "items": [
37                                 {
38                                     "listeners": {
39                                         "select": "function (combo, record, index)\n{\n   (function() { _this.grid.footer.onClick('first'); }).defer(100);\n}",
40                                         "render": "function (_self)\n{\n   _this.personCombo = _self;\n}"
41                                     },
42                                     "allowBlank": true,
43                                     "displayField": "person_id_name",
44                                     "editable": true,
45                                     "emptyText": "Select person",
46                                     "forceSelection": true,
47                                     "hiddenName": "id",
48                                     "listWidth": 400,
49                                     "loadingText": "Searching...",
50                                     "minChars": 2,
51                                     "name": "name",
52                                     "pageSize": 20,
53                                     "qtip": "Select core_notify",
54                                     "queryParam": "query[person_id_name]",
55                                     "selectOnFocus": true,
56                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{person_id_name}</b> {person_id_email}</div>",
57                                     "triggerAction": "all",
58                                     "valueField": "person_id",
59                                     "width": 300,
60                                     "xtype": "ComboBox",
61                                     "|xns": "Roo.form",
62                                     "items": [
63                                         {
64                                             "listeners": {
65                                                 "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    o.params._distinct='person_id';\n    o.params._columns='person_id,person_id_name,person_id_email';\n    o.params['!person_id_name'] = '';\n    \n    // set more here\n}\n"
66                                             },
67                                             "*prop": "store",
68                                             "remoteSort": true,
69                                             "xtype": "Store",
70                                             "|sortInfo": "{ direction : 'ASC', field: 'person_id_name' }",
71                                             "|xns": "Roo.data",
72                                             "items": [
73                                                 {
74                                                     "*prop": "proxy",
75                                                     "xtype": "HttpProxy",
76                                                     "method": "GET",
77                                                     "|xns": "Roo.data",
78                                                     "|url": "baseURL + '/Roo/core_notify.php'"
79                                                 },
80                                                 {
81                                                     "*prop": "reader",
82                                                     "xtype": "JsonReader",
83                                                     "|xns": "Roo.data",
84                                                     "id": "id",
85                                                     "root": "data",
86                                                     "totalProperty": "total",
87                                                     "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"ontable\",\"type\":\"string\"}]"
88                                                 }
89                                             ]
90                                         }
91                                     ]
92                                 }
93                             ]
94                         },
95                         {
96                             "*prop": "dataSource",
97                             "remoteSort": true,
98                             "xtype": "Store",
99                             "|sortInfo": "{ field : 'person_id_name', direction: 'ASC' }",
100                             "|xns": "Roo.data",
101                             "items": [
102                                 {
103                                     "*prop": "proxy",
104                                     "xtype": "HttpProxy",
105                                     "method": "GET",
106                                     "|url": "baseURL + '/Roo/core_notify_recur.php'",
107                                     "|xns": "Roo.data"
108                                 },
109                                 {
110                                     "|xns": "Roo.data",
111                                     "xtype": "JsonReader",
112                                     "totalProperty": "total",
113                                     "root": "data",
114                                     "*prop": "reader",
115                                     "id": "id",
116                                     "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'dtstart',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'dtend',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'max_applied_dt',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'updated_dt',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'last_applied_dt',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'tz',\n        'type': 'string'\n    },\n    {\n        'name': 'freq',\n        'type': 'string'\n    },\n    {\n        'name': 'freq_day',\n        'type': 'string'\n    },\n    {\n        'name': 'freq_hour',\n        'type': 'string'\n    },\n    {\n        'name': 'onid',\n        'type': 'int'\n    },\n    {\n        'name': 'ontable',\n        'type': 'string'\n    },\n    {\n        'name': 'last_event_id',\n        'type': 'int'\n    },\n    {\n        'name': 'method',\n        'type': 'string'\n    }\n]"
117                                 }
118                             ]
119                         },
120                         {
121                             "*prop": "footer",
122                             "xtype": "PagingToolbar",
123                             "pageSize": 25,
124                             "displayInfo": true,
125                             "displayMsg": "Displaying core_notify_recur{0} - {1} of {2}",
126                             "emptyMsg": "No core_notify_recur found",
127                             "|xns": "Roo"
128                         },
129                         {
130                             "*prop": "colModel[]",
131                             "dataIndex": "person_id_name",
132                             "header": "Person",
133                             "width": 75,
134                             "xtype": "ColumnModel",
135                             "|renderer": "function(v,x,r) { \n    return String.format('{0} <a href=\"mailto:{1}\">{1}</a>', v,r.data.person_id_email); \n}",
136                             "|xns": "Roo.grid"
137                         },
138                         {
139                             "xtype": "ColumnModel",
140                             "header": "Dtstart",
141                             "width": 75,
142                             "dataIndex": "dtstart",
143                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
144                             "|xns": "Roo.grid",
145                             "*prop": "colModel[]"
146                         },
147                         {
148                             "xtype": "ColumnModel",
149                             "header": "Dtend",
150                             "width": 75,
151                             "dataIndex": "dtend",
152                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
153                             "|xns": "Roo.grid",
154                             "*prop": "colModel[]"
155                         },
156                         {
157                             "*prop": "colModel[]",
158                             "dataIndex": "last_applied_dt",
159                             "header": "Last Notification created",
160                             "width": 75,
161                             "xtype": "ColumnModel",
162                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
163                             "|xns": "Roo.grid"
164                         },
165                         {
166                             "*prop": "colModel[]",
167                             "dataIndex": "tz",
168                             "header": "Tz",
169                             "width": 50,
170                             "xtype": "ColumnModel",
171                             "|renderer": "function(v) { return String.format('{0}', v); }",
172                             "|xns": "Roo.grid"
173                         },
174                         {
175                             "*prop": "colModel[]",
176                             "dataIndex": "freq",
177                             "header": "Freq",
178                             "width": 100,
179                             "xtype": "ColumnModel",
180                             "|renderer": "function(v) { return String.format('{0}', v); }",
181                             "|xns": "Roo.grid"
182                         },
183                         {
184                             "*prop": "colModel[]",
185                             "dataIndex": "freq_day",
186                             "header": "Freq day",
187                             "width": 100,
188                             "xtype": "ColumnModel",
189                             "|renderer": "function(v) { return String.format('{0}', v); }",
190                             "|xns": "Roo.grid"
191                         },
192                         {
193                             "xtype": "ColumnModel",
194                             "header": "Freq hour",
195                             "width": 200,
196                             "dataIndex": "freq_hour",
197                             "|renderer": "function(v) { return String.format('{0}', v); }",
198                             "|xns": "Roo.grid",
199                             "*prop": "colModel[]"
200                         },
201                         {
202                             "*prop": "colModel[]",
203                             "dataIndex": "onid",
204                             "header": "Affects",
205                             "width": 75,
206                             "xtype": "ColumnModel",
207                             "|renderer": "function(v,x,r) { return String.format('{1}:{0}', v,r.data.ontable); }",
208                             "|xns": "Roo.grid"
209                         },
210                         {
211                             "*prop": "colModel[]",
212                             "dataIndex": "method",
213                             "header": "Method",
214                             "width": 75,
215                             "xtype": "ColumnModel",
216                             "|renderer": "function(v) { return String.format('{0}', v); }",
217                             "|xns": "Roo.grid"
218                         }
219                     ]
220                 }
221             ]
222         }
223     ],
224     "permname": "",
225     "modOrder": "800"
226 }