3 "name": "Pman.Dialog.CoreNotifyRefer",
6 "path": "/home/alan/gitlive/Pman.Core/Pman.Dialog.CoreNotifyRefer.bjs",
12 "title": "Modify Recurrent Notifications",
14 "xtype": "LayoutDialog",
21 "xtype": "LayoutRegion",
26 "|activate": "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}"
32 "tableName": "core_notify_recur",
33 "title": "core_notify_recur",
39 "|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}",
40 "|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"
43 "autoExpandColumn": "freq_day",
46 "xtype": "EditorGrid",
50 "*prop": "dataSource",
53 "|sortInfo": "{ field : 'freq', direction: 'ASC' }",
60 "|url": "baseURL + '/Roo/core_notify_recur.php'",
67 "totalProperty": "total",
68 "xtype": "JsonReader",
69 "|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': 'tz',\n 'type': 'float'\n },\n {\n 'name': 'last_applied_dt',\n 'type': 'date',\n 'dateFormat': 'Y-m-d'\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': 'last_event_id',\n 'type': 'int'\n },\n {\n 'name': 'method',\n 'type': 'string'\n }\n]",
76 "xtype": "PagingToolbar",
79 "displayMsg": "Displaying core_notify_recur{0} - {1} of {2}",
80 "emptyMsg": "No core_notify_recur found",
90 "|click": "function()\n{\n var grid = _this.grid;\n var r = grid.getDataSource().reader.newRow({\n // defaults..\n person_id : _this.data.person_id,\n dtstart : new Date(0),\n dtend : Date.parseDate('2050-01-01', 'Y-m-d'),\n tz : 'Asia/Hong Kong',\n onid : _this.data.onid,\n ontable : _this.data.ontable,\n method : _this.data.method,\n last_event_id : 0,\n freq_day_name : '',\n freq_hour_name : '',\n freq_name : ''\n \n \n });\n grid.stopEditing();\n grid.getDataSource().insert(0, r); \n grid.startEditing(0, 2); \n\n}\n"
92 "cls": "x-btn-text-icon",
95 "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
99 "|xns": "Roo.Toolbar",
104 "cls": "x-btn-text-icon",
105 "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
108 "|click": "function()\n{\n Pman.genericDelete(_this, 'core_notify_recur'); \n}\n "
110 "|xns": "Roo.Toolbar"
115 "*prop": "colModel[]",
116 "dataIndex": "dtstart",
119 "xtype": "ColumnModel",
120 "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
125 "xtype": "GridEditor",
130 "xtype": "DateField",
138 "*prop": "colModel[]",
139 "dataIndex": "dtend",
142 "xtype": "ColumnModel",
143 "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
148 "xtype": "GridEditor",
153 "xtype": "DateField",
161 "*prop": "colModel[]",
163 "header": "Frequency",
165 "xtype": "ColumnModel",
166 "|renderer": "function(v,x,r) { \n\n Roo.log(this);\n var cm = _this.grid.colModel;\n var ix = cm.findColumnIndex('freq');\n var ce = cm.getCellEditor(ix)\n var matches = ce.field.store.query('code',v);\n if (!matches.length) {\n return '';\n }\n return String.format('{0}', matches.first().data.title);\n }",
171 "xtype": "GridEditor",
177 "displayField": "title",
179 "fieldLabel": "Country",
180 "hiddenName": "freq",
184 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{title}</b> </div>",
185 "triggerAction": "all",
186 "valueField": "code",
193 "xtype": "SimpleStore",
194 "|data": "[ \n [ 'HOURLY' , 'Hourly at' ] ,\n [ 'DAILY' , 'Daily at'] ,\n [ 'WEEKLY' , 'Weekly at'] ,\n [ 'Montly' , 'Montly at'] \n]",
195 "|fields": "['code', 'title']",
196 "|sortInfo": "{ field : 'title', direction: 'ASC' }",
206 "*prop": "colModel[]",
207 "dataIndex": "freq_day",
208 "header": "on day(s)",
210 "xtype": "ColumnModel",
211 "|renderer": "function(v,x,r) { \n \n return String.format('{0}', r.data.freq_day_name || v); \n \n}",
216 "xtype": "GridEditor",
222 "displayField": "title",
224 "fieldLabel": "Country",
225 "hiddenName": "freq_day",
228 "name": "freq_day_name",
230 "triggerAction": "all",
231 "valueField": "code",
232 "xtype": "ComboCheck",
237 "xtype": "SimpleStore",
238 "|data": "(function() { \n var ret = [];\n Roo.each(Date.dayNames, function(d) {\n ret.push([ d.substring(0,3).toUpperCase(), d ]);\n });\n return ret;\n})()",
239 "|fields": "['code', 'title']",
240 "|sortInfo": "{ field : 'title', direction: 'ASC' }",
250 "*prop": "colModel[]",
251 "dataIndex": "freq_hour",
252 "header": "at Hour(s)",
254 "xtype": "ColumnModel",
255 "|renderer": "function(v) { return String.format('{0}', v); }",
260 "xtype": "GridEditor",
266 "displayField": "title",
268 "fieldLabel": "Country",
269 "hiddenName": "freq_hour",
272 "name": "freq_hour_name",
274 "triggerAction": "all",
275 "valueField": "code",
276 "xtype": "ComboCheck",
281 "xtype": "SimpleStore",
282 "|data": "(function() { \n var ret = [];\n for (var i = 5; i < 25; i++) {\n var h = i < 10 ? ('0' + i) : i;\n var mer = i < 12 || i > 23 ? 'am' : 'pm';\n var dh = i < 12 ? i : i-12;\n \n ret.push([ h+':00', dh+':00' + mer ]);\n ret.push([ h+':00', dh+':30' + mer ]); \n }\n return ret;\n})()",
283 "|fields": "['code', 'title']",
284 "|sortInfo": "{ field : 'title', direction: 'ASC' }",
294 "*prop": "colModel[]",
296 "header": "Timezone",
298 "xtype": "ColumnModel",
299 "|renderer": "function(v) { return String.format('{0}', v); }",
303 "xtype": "ColumnModel",
304 "header": "Last event",
306 "dataIndex": "last_event_id",
307 "|renderer": "function(v) { return String.format('{0}', v); }",
309 "*prop": "colModel[]"
316 "*prop": "buttons[]",