3 "name": "Pman.Dialog.CoreNotifyRecur",
6 "path": "/home/alan/gitlive/Pman.Core/Pman.Dialog.CoreNotifyRecur.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",
41 "afteredit": "function (e)\n{\n e.record.commit();\n}"
44 "autoExpandColumn": "freq_day",
47 "xtype": "EditorGrid",
52 "update": "function (_self, record, operation)\n{\n Roo.log(operation);\n if (operation != 'commit') {\n return;\n }\n new Pman.Request({\n url : baseURL + '/Roo/Core_notify_recur',\n method :'POST',\n params : record.data,\n success : function()\n {\n //??\n },\n failure : function() {\n Roo.MessageBox.alert(\"Error\", \"There was a problem saving\");\n }\n });\n \n \n \n}"
54 "*prop": "dataSource",
57 "|sortInfo": "{ field : 'freq', direction: 'ASC' }",
64 "|url": "baseURL + '/Roo/core_notify_recur.php'",
71 "totalProperty": "total",
72 "xtype": "JsonReader",
73 "|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]",
80 "xtype": "PagingToolbar",
83 "displayMsg": "Displaying core_notify_recur{0} - {1} of {2}",
84 "emptyMsg": "No core_notify_recur found",
94 "|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}\n"
96 "cls": "x-btn-text-icon",
99 "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
100 "|xns": "Roo.Toolbar"
103 "|xns": "Roo.Toolbar",
108 "cls": "x-btn-text-icon",
109 "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
112 "|click": "function()\n{\n Pman.genericDelete(_this, 'core_notify_recur'); \n}\n "
114 "|xns": "Roo.Toolbar"
119 "*prop": "colModel[]",
120 "dataIndex": "dtstart",
123 "xtype": "ColumnModel",
124 "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
129 "xtype": "GridEditor",
134 "xtype": "DateField",
142 "*prop": "colModel[]",
143 "dataIndex": "dtend",
146 "xtype": "ColumnModel",
147 "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
152 "xtype": "GridEditor",
157 "xtype": "DateField",
165 "*prop": "colModel[]",
166 "dataIndex": "freq_day",
167 "header": "on day(s)",
169 "xtype": "ColumnModel",
170 "|renderer": "function(v,x,r) { \n \n return String.format('{0}', r.data.freq_day_name || v); \n \n}",
175 "xtype": "GridEditor",
181 "displayField": "title",
183 "fieldLabel": "Country",
184 "hiddenName": "freq_day",
187 "name": "freq_day_name",
189 "triggerAction": "all",
190 "valueField": "code",
191 "xtype": "ComboCheck",
196 "xtype": "SimpleStore",
197 "|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})()",
198 "|fields": "['code', 'title']",
199 "|sortInfo": "{ field : 'title', direction: 'ASC' }",
209 "*prop": "colModel[]",
210 "dataIndex": "freq_hour",
211 "header": "at Hour(s)",
213 "xtype": "ColumnModel",
214 "|renderer": "function(v,x,r) { \n \n return String.format('{0}', r.data.freq_hour_name || v); \n \n}",
219 "xtype": "GridEditor",
225 "displayField": "title",
227 "fieldLabel": "Country",
228 "hiddenName": "freq_hour",
231 "name": "freq_hour_name",
233 "triggerAction": "all",
234 "valueField": "code",
235 "xtype": "ComboCheck",
240 "xtype": "SimpleStore",
241 "|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 < 13 ? 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})()",
242 "|fields": "['code', 'title']",
243 "|sortInfo": "{ field : 'title', direction: 'ASC' }",
253 "*prop": "colModel[]",
255 "header": "Timezone",
257 "xtype": "ColumnModel",
258 "|renderer": "function(v) { return String.format('{0}', v); }",
263 "xtype": "GridEditor",
268 "allowBlank": "false",
269 "displayField": "tz",
271 "emptyText": "Select timezone",
272 "fieldLabel": "core_enum",
273 "forceSelection": true,
276 "loadingText": "Searching...",
280 "qtip": "Select timezone",
282 "selectOnFocus": true,
283 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{tz}</b> </div>",
284 "triggerAction": "all",
293 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
298 "|sortInfo": "{ direction : 'ASC', field: 'tz' }",
304 "xtype": "HttpProxy",
305 "|url": "baseURL + '/Core/I18n/Timezone.php'\n",
312 "totalProperty": "total",
313 "xtype": "JsonReader",
314 "|fields": "[{\"name\":\"tz\",\"type\":\"string\"}]",
326 "xtype": "ColumnModel",
327 "header": "Last event",
329 "dataIndex": "last_event_id",
330 "|renderer": "function(v) { return String.format('{0}', v); }",
332 "*prop": "colModel[]"
339 "*prop": "buttons[]",