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                                                     "method": "GET",
76                                                     "xtype": "HttpProxy",
77                                                     "|url": "baseURL + '/Roo/core_notify_recur.php'",
78                                                     "|xns": "Roo.data"
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                             "listeners": {
97                                 "beforeload": "function (_self, options)\n{\n    if (!_this.personCombo) {\n        return false;\n    }\n    var p = _this.personCombo.getValue();\n    if (p*1) { \n        options.params.person_id = p;\n    }\n}"
98                             },
99                             "*prop": "dataSource",
100                             "remoteSort": true,
101                             "xtype": "Store",
102                             "|sortInfo": "{ field : 'person_id_name', direction: 'ASC' }",
103                             "|xns": "Roo.data",
104                             "items": [
105                                 {
106                                     "*prop": "proxy",
107                                     "xtype": "HttpProxy",
108                                     "method": "GET",
109                                     "|url": "baseURL + '/Roo/core_notify_recur.php'",
110                                     "|xns": "Roo.data"
111                                 },
112                                 {
113                                     "|xns": "Roo.data",
114                                     "xtype": "JsonReader",
115                                     "totalProperty": "total",
116                                     "root": "data",
117                                     "*prop": "reader",
118                                     "id": "id",
119                                     "|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]"
120                                 }
121                             ]
122                         },
123                         {
124                             "*prop": "footer",
125                             "xtype": "PagingToolbar",
126                             "pageSize": 25,
127                             "displayInfo": true,
128                             "displayMsg": "Displaying core_notify_recur{0} - {1} of {2}",
129                             "emptyMsg": "No core_notify_recur found",
130                             "|xns": "Roo"
131                         },
132                         {
133                             "*prop": "colModel[]",
134                             "dataIndex": "person_id_name",
135                             "header": "Person",
136                             "width": 75,
137                             "xtype": "ColumnModel",
138                             "|renderer": "function(v,x,r) { \n    return String.format('{0} <a href=\"mailto:{1}\">{1}</a>', v,r.data.person_id_email); \n}",
139                             "|xns": "Roo.grid"
140                         },
141                         {
142                             "xtype": "ColumnModel",
143                             "header": "Dtstart",
144                             "width": 75,
145                             "dataIndex": "dtstart",
146                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
147                             "|xns": "Roo.grid",
148                             "*prop": "colModel[]"
149                         },
150                         {
151                             "xtype": "ColumnModel",
152                             "header": "Dtend",
153                             "width": 75,
154                             "dataIndex": "dtend",
155                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
156                             "|xns": "Roo.grid",
157                             "*prop": "colModel[]"
158                         },
159                         {
160                             "*prop": "colModel[]",
161                             "dataIndex": "last_applied_dt",
162                             "header": "Last Notification created",
163                             "width": 75,
164                             "xtype": "ColumnModel",
165                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
166                             "|xns": "Roo.grid"
167                         },
168                         {
169                             "*prop": "colModel[]",
170                             "dataIndex": "tz",
171                             "header": "Tz",
172                             "width": 75,
173                             "xtype": "ColumnModel",
174                             "|renderer": "function(v) { return String.format('{0}', v); }",
175                             "|xns": "Roo.grid"
176                         },
177                         {
178                             "*prop": "colModel[]",
179                             "dataIndex": "freq",
180                             "header": "Freq",
181                             "width": 100,
182                             "xtype": "ColumnModel",
183                             "|renderer": "function(v) { return String.format('{0}', v); }",
184                             "|xns": "Roo.grid"
185                         },
186                         {
187                             "*prop": "colModel[]",
188                             "dataIndex": "freq_day",
189                             "header": "Freq day",
190                             "width": 200,
191                             "xtype": "ColumnModel",
192                             "|renderer": "function(v) { return String.format('{0}', v); }",
193                             "|xns": "Roo.grid"
194                         },
195                         {
196                             "xtype": "ColumnModel",
197                             "header": "Freq hour",
198                             "width": 200,
199                             "dataIndex": "freq_hour",
200                             "|renderer": "function(v) { return String.format('{0}', v); }",
201                             "|xns": "Roo.grid",
202                             "*prop": "colModel[]"
203                         },
204                         {
205                             "*prop": "colModel[]",
206                             "dataIndex": "onid",
207                             "header": "Affects",
208                             "width": 75,
209                             "xtype": "ColumnModel",
210                             "|renderer": "function(v,x,r) { return String.format('{1}:{0}', v,r.data.ontable); }",
211                             "|xns": "Roo.grid"
212                         },
213                         {
214                             "*prop": "colModel[]",
215                             "dataIndex": "method",
216                             "header": "Method",
217                             "width": 75,
218                             "xtype": "ColumnModel",
219                             "|renderer": "function(v) { return String.format('{0}', v); }",
220                             "|xns": "Roo.grid"
221                         }
222                     ]
223                 }
224             ]
225         }
226     ],
227     "permname": "",
228     "modOrder": "800"
229 }