sync
[Pman.Admin] / Pman.Tab.AdminNotifyRecur.bjs
1 {
2  "name" : "Pman.Tab.AdminNotifyRecur",
3  "parent" : "Pman.Tab.AdminWatchNotify",
4  "title" : "Pman.Tab.AdminNotifyRecur",
5  "path" : "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminNotifyRecur.bjs",
6  "permname" : "",
7  "modOrder" : "800",
8  "strings" : {
9   "04df30d61712300fd31c24e2c7c8f9bc" : "Select core_notify",
10   "be3c26f9baf09972ddc410c5c7c63403" : "Displaying core_notify_recur{0} - {1} of {2}",
11   "808e3eefe289c698ec4def4a54ac36af" : "Last Notification created",
12   "13a831874352b548ac7b5e63a860aa1b" : "Tz",
13   "c348b06d2667edd048ded3c1b1878cc1" : "Recurrent Notifications",
14   "c956c97343a45cca5d492e70c56daa8e" : "Select person",
15   "25af45209313b11d55424103567a1347" : "Dtend",
16   "1243daf593fa297e07ab03bf06d925af" : "Searching...",
17   "effad6ff1d36887ce57d05300912bf61" : "No core_notify_recur found",
18   "83b9a425d6b152330823ab8357f441ae" : "Dtstart",
19   "ac2c474467a60fa4e2c88158a6d2abf9" : "Freq day",
20   "40bed7cf9b3d4bb3a3d7a7e3eb18c5eb" : "Person",
21   "6ffde0d71e2b678e619e4a642d0b22a6" : "Freq hour",
22   "4c3880bb027f159e801041b1021e88e8" : "Method",
23   "d8d80ec41fc8cca7569ac2d2937bd97b" : "Affects",
24   "84307c751e4541f54714472e3df742dd" : "Freq"
25  },
26  "items" : [
27   {
28    "listeners" : {
29     "|activate" : "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
30    },
31    "fitToframe" : true,
32    "background" : true,
33    "region" : "center",
34    "title" : "Recurrent Notifications",
35    "xtype" : "GridPanel",
36    "fitContainer" : true,
37    "$ xns" : "Roo",
38    "tableName" : "core_notify_recur",
39    "items" : [
40     {
41      "listeners" : {
42       "|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       "|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}"
44      },
45      "autoExpandColumn" : "person_id_name",
46      "xtype" : "Grid",
47      "loadMask" : true,
48      "$ xns" : "Roo.grid",
49      "* prop" : "grid",
50      "items" : [
51       {
52        "xtype" : "Toolbar",
53        "$ xns" : "Roo",
54        "* prop" : "toolbar",
55        "items" : [
56         {
57          "listeners" : {
58           "render" : "function (_self)\n{\n   _this.personCombo = _self;\n}",
59           "select" : "function (combo, record, index)\n{\n   (function() { _this.grid.footer.onClick('first'); }).defer(100);\n}"
60          },
61          "listWidth" : 400,
62          "triggerAction" : "all",
63          "forceSelection" : true,
64          "selectOnFocus" : true,
65          "pageSize" : 20,
66          "displayField" : "person_id_name",
67          "emptyText" : "Select person",
68          "hiddenName" : "id",
69          "minChars" : 2,
70          "valueField" : "person_id",
71          "xtype" : "ComboBox",
72          "allowBlank" : true,
73          "editable" : true,
74          "width" : 300,
75          "$ xns" : "Roo.form",
76          "name" : "name",
77          "qtip" : "Select core_notify",
78          "queryParam" : "query[person_id_name]",
79          "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{person_id_name}</b> {person_id_email}</div>",
80          "loadingText" : "Searching...",
81          "items" : [
82           {
83            "listeners" : {
84             "|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"
85            },
86            "xtype" : "Store",
87            "remoteSort" : true,
88            "$ sortInfo" : "{ direction : 'ASC', field: 'person_id_name' }",
89            "$ xns" : "Roo.data",
90            "* prop" : "store",
91            "items" : [
92             {
93              "$ url" : "baseURL + '/Roo/core_notify_recur.php'",
94              "xtype" : "HttpProxy",
95              "method" : "GET",
96              "$ xns" : "Roo.data",
97              "* prop" : "proxy"
98             },
99             {
100              "id" : "id",
101              "root" : "data",
102              "xtype" : "JsonReader",
103              "$ xns" : "Roo.data",
104              "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"ontable\",\"type\":\"string\"}]",
105              "* prop" : "reader",
106              "totalProperty" : "total"
107             }
108            ]
109           }
110          ]
111         }
112        ]
113       },
114       {
115        "listeners" : {
116         "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}"
117        },
118        "xtype" : "Store",
119        "remoteSort" : true,
120        "$ sortInfo" : "{ field : 'person_id_name', direction: 'ASC' }",
121        "$ xns" : "Roo.data",
122        "* prop" : "dataSource",
123        "items" : [
124         {
125          "$ url" : "baseURL + '/Roo/core_notify_recur.php'",
126          "method" : "GET",
127          "xtype" : "HttpProxy",
128          "$ xns" : "Roo.data",
129          "* prop" : "proxy"
130         },
131         {
132          "id" : "id",
133          "root" : "data",
134          "xtype" : "JsonReader",
135          "$ xns" : "Roo.data",
136          "$ 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]",
137          "* prop" : "reader",
138          "totalProperty" : "total"
139         }
140        ]
141       },
142       {
143        "pageSize" : 25,
144        "xtype" : "PagingToolbar",
145        "emptyMsg" : "No core_notify_recur found",
146        "$ xns" : "Roo",
147        "displayInfo" : true,
148        "displayMsg" : "Displaying core_notify_recur{0} - {1} of {2}",
149        "* prop" : "footer"
150       },
151       {
152        "xtype" : "ColumnModel",
153        "header" : "Person",
154        "width" : 75,
155        "$ renderer" : "function(v,x,r) { \n    return String.format('{0} <a href=\"mailto:{1}\">{1}</a>', v,r.data.person_id_email); \n}",
156        "$ xns" : "Roo.grid",
157        "* prop" : "colModel[]",
158        "dataIndex" : "person_id_name"
159       },
160       {
161        "xtype" : "ColumnModel",
162        "width" : 75,
163        "header" : "Dtstart",
164        "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
165        "$ xns" : "Roo.grid",
166        "* prop" : "colModel[]",
167        "dataIndex" : "dtstart"
168       },
169       {
170        "xtype" : "ColumnModel",
171        "width" : 75,
172        "header" : "Dtend",
173        "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
174        "$ xns" : "Roo.grid",
175        "* prop" : "colModel[]",
176        "dataIndex" : "dtend"
177       },
178       {
179        "xtype" : "ColumnModel",
180        "header" : "Last Notification created",
181        "width" : 75,
182        "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
183        "$ xns" : "Roo.grid",
184        "* prop" : "colModel[]",
185        "dataIndex" : "last_applied_dt"
186       },
187       {
188        "xtype" : "ColumnModel",
189        "header" : "Tz",
190        "width" : 75,
191        "$ renderer" : "function(v) { return String.format('{0}', v); }",
192        "$ xns" : "Roo.grid",
193        "* prop" : "colModel[]",
194        "dataIndex" : "tz"
195       },
196       {
197        "xtype" : "ColumnModel",
198        "header" : "Freq",
199        "width" : 100,
200        "$ renderer" : "function(v) { return String.format('{0}', v); }",
201        "$ xns" : "Roo.grid",
202        "* prop" : "colModel[]",
203        "dataIndex" : "freq"
204       },
205       {
206        "xtype" : "ColumnModel",
207        "header" : "Freq day",
208        "width" : 200,
209        "$ renderer" : "function(v) { return String.format('{0}', v); }",
210        "$ xns" : "Roo.grid",
211        "* prop" : "colModel[]",
212        "dataIndex" : "freq_day"
213       },
214       {
215        "xtype" : "ColumnModel",
216        "width" : 200,
217        "header" : "Freq hour",
218        "$ renderer" : "function(v) { return String.format('{0}', v); }",
219        "$ xns" : "Roo.grid",
220        "* prop" : "colModel[]",
221        "dataIndex" : "freq_hour"
222       },
223       {
224        "xtype" : "ColumnModel",
225        "header" : "Affects",
226        "width" : 75,
227        "$ renderer" : "function(v,x,r) { return String.format('{1}:{0}', v,r.data.ontable); }",
228        "$ xns" : "Roo.grid",
229        "* prop" : "colModel[]",
230        "dataIndex" : "onid"
231       },
232       {
233        "xtype" : "ColumnModel",
234        "header" : "Method",
235        "width" : 75,
236        "$ renderer" : "function(v) { return String.format('{0}', v); }",
237        "$ xns" : "Roo.grid",
238        "* prop" : "colModel[]",
239        "dataIndex" : "method"
240       }
241      ]
242     }
243    ]
244   }
245  ]
246 }