Pman.Tab.AdminNotifyRecur.bjs
[Pman.Admin] / Pman.Tab.AdminNotifyRecur.bjs
1 {
2     "id": "roo-file-361",
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             "|xns": "Roo",
10             "xtype": "GridPanel",
11             "title": "core_notify_recur",
12             "fitToframe": true,
13             "fitContainer": true,
14             "tableName": "core_notify_recur",
15             "background": true,
16             "region": "center",
17             "listeners": {
18                 "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
19             },
20             "items": [
21                 {
22                     "*prop": "grid",
23                     "xtype": "Grid",
24                     "autoExpandColumn": "tz",
25                     "loadMask": true,
26                     "listeners": {
27                         "|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}",
28                         "|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"
29                     },
30                     "|xns": "Roo.grid",
31                     "items": [
32                         {
33                             "*prop": "dataSource",
34                             "xtype": "Store",
35                             "remoteSort": true,
36                             "|sortInfo": "{ field : 'tz', direction: 'ASC' }",
37                             "|xns": "Roo.data",
38                             "items": [
39                                 {
40                                     "*prop": "proxy",
41                                     "xtype": "HttpProxy",
42                                     "method": "GET",
43                                     "|url": "baseURL + '/Roo/core_notify_recur.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': '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]"
54                                 }
55                             ]
56                         },
57                         {
58                             "*prop": "footer",
59                             "xtype": "PagingToolbar",
60                             "pageSize": 25,
61                             "displayInfo": true,
62                             "displayMsg": "Displaying core_notify_recur{0} - {1} of {2}",
63                             "emptyMsg": "No core_notify_recur found",
64                             "|xns": "Roo"
65                         },
66                         {
67                             "*prop": "toolbar",
68                             "xtype": "Toolbar",
69                             "|xns": "Roo",
70                             "items": [
71                                 {
72                                     "text": "Add",
73                                     "xtype": "Button",
74                                     "cls": "x-btn-text-icon",
75                                     "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
76                                     "listeners": {
77                                         "|click": "function()\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
78                                     },
79                                     "|xns": "Roo.Toolbar"
80                                 },
81                                 {
82                                     "text": "Edit",
83                                     "xtype": "Button",
84                                     "cls": "x-btn-text-icon",
85                                     "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
86                                     "listeners": {
87                                         "|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"
88                                     },
89                                     "|xns": "Roo.Toolbar"
90                                 },
91                                 {
92                                     "text": "Delete",
93                                     "cls": "x-btn-text-icon",
94                                     "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
95                                     "xtype": "Button",
96                                     "listeners": {
97                                         "|click": "function()\n{\n     Pman.genericDelete(_this, 'core_notify_recur'); \n}\n        "
98                                     },
99                                     "|xns": "Roo.Toolbar"
100                                 }
101                             ]
102                         },
103                         {
104                             "*prop": "colModel[]",
105                             "dataIndex": "person_id_name",
106                             "header": "Person",
107                             "width": 75,
108                             "xtype": "ColumnModel",
109                             "|renderer": "function(v,x,r) { \n    return String.format('{0} <a href=\"mailto:{1}\">{1}</a>', v,r,data.person_id.email); \n}",
110                             "|xns": "Roo.grid"
111                         },
112                         {
113                             "xtype": "ColumnModel",
114                             "header": "Dtstart",
115                             "width": 75,
116                             "dataIndex": "dtstart",
117                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
118                             "|xns": "Roo.grid",
119                             "*prop": "colModel[]"
120                         },
121                         {
122                             "xtype": "ColumnModel",
123                             "header": "Dtend",
124                             "width": 75,
125                             "dataIndex": "dtend",
126                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
127                             "|xns": "Roo.grid",
128                             "*prop": "colModel[]"
129                         },
130                         {
131                             "xtype": "ColumnModel",
132                             "header": "Updated dt",
133                             "width": 75,
134                             "dataIndex": "updated_dt",
135                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
136                             "|xns": "Roo.grid",
137                             "*prop": "colModel[]"
138                         },
139                         {
140                             "xtype": "ColumnModel",
141                             "header": "Last applied dt",
142                             "width": 75,
143                             "dataIndex": "last_applied_dt",
144                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
145                             "|xns": "Roo.grid",
146                             "*prop": "colModel[]"
147                         },
148                         {
149                             "xtype": "ColumnModel",
150                             "header": "Tz",
151                             "width": 200,
152                             "dataIndex": "tz",
153                             "|renderer": "function(v) { return String.format('{0}', v); }",
154                             "|xns": "Roo.grid",
155                             "*prop": "colModel[]"
156                         },
157                         {
158                             "xtype": "ColumnModel",
159                             "header": "Freq",
160                             "width": 200,
161                             "dataIndex": "freq",
162                             "|renderer": "function(v) { return String.format('{0}', v); }",
163                             "|xns": "Roo.grid",
164                             "*prop": "colModel[]"
165                         },
166                         {
167                             "xtype": "ColumnModel",
168                             "header": "Freq day",
169                             "width": 200,
170                             "dataIndex": "freq_day",
171                             "|renderer": "function(v) { return String.format('{0}', v); }",
172                             "|xns": "Roo.grid",
173                             "*prop": "colModel[]"
174                         },
175                         {
176                             "xtype": "ColumnModel",
177                             "header": "Freq hour",
178                             "width": 200,
179                             "dataIndex": "freq_hour",
180                             "|renderer": "function(v) { return String.format('{0}', v); }",
181                             "|xns": "Roo.grid",
182                             "*prop": "colModel[]"
183                         },
184                         {
185                             "xtype": "ColumnModel",
186                             "header": "Onid",
187                             "width": 75,
188                             "dataIndex": "onid",
189                             "|renderer": "function(v) { return String.format('{0}', v); }",
190                             "|xns": "Roo.grid",
191                             "*prop": "colModel[]"
192                         },
193                         {
194                             "xtype": "ColumnModel",
195                             "header": "Ontable",
196                             "width": 200,
197                             "dataIndex": "ontable",
198                             "|renderer": "function(v) { return String.format('{0}', v); }",
199                             "|xns": "Roo.grid",
200                             "*prop": "colModel[]"
201                         },
202                         {
203                             "xtype": "ColumnModel",
204                             "header": "Last event",
205                             "width": 75,
206                             "dataIndex": "last_event_id",
207                             "|renderer": "function(v) { return String.format('{0}', v); }",
208                             "|xns": "Roo.grid",
209                             "*prop": "colModel[]"
210                         },
211                         {
212                             "xtype": "ColumnModel",
213                             "header": "Method",
214                             "width": 200,
215                             "dataIndex": "method",
216                             "|renderer": "function(v) { return String.format('{0}', v); }",
217                             "|xns": "Roo.grid",
218                             "*prop": "colModel[]"
219                         }
220                     ]
221                 }
222             ]
223         }
224     ],
225     "permname": "",
226     "modOrder": "800"
227 }