sync
[Pman.Admin] / Pman.Tab.AdminNotifyRecur.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Roo.namespace('Pman.Tab');
6
7 Pman.Tab.AdminNotifyRecur = new Roo.XComponent({
8
9  _strings : {
10   '04df30d61712300fd31c24e2c7c8f9bc' :"Select core_notify",
11   'be3c26f9baf09972ddc410c5c7c63403' :"Displaying core_notify_recur{0} - {1} of {2}",
12   '808e3eefe289c698ec4def4a54ac36af' :"Last Notification created",
13   '13a831874352b548ac7b5e63a860aa1b' :"Tz",
14   'c348b06d2667edd048ded3c1b1878cc1' :"Recurrent Notifications",
15   'c956c97343a45cca5d492e70c56daa8e' :"Select person",
16   '25af45209313b11d55424103567a1347' :"Dtend",
17   '1243daf593fa297e07ab03bf06d925af' :"Searching...",
18   'effad6ff1d36887ce57d05300912bf61' :"No core_notify_recur found",
19   '83b9a425d6b152330823ab8357f441ae' :"Dtstart",
20   'ac2c474467a60fa4e2c88158a6d2abf9' :"Freq day",
21   '40bed7cf9b3d4bb3a3d7a7e3eb18c5eb' :"Person",
22   '6ffde0d71e2b678e619e4a642d0b22a6' :"Freq hour",
23   '4c3880bb027f159e801041b1021e88e8' :"Method",
24   'd8d80ec41fc8cca7569ac2d2937bd97b' :"Affects",
25   '84307c751e4541f54714472e3df742dd' :"Freq"
26  },
27
28   part     :  ["Admin", "NotifyRecur" ],
29   order    : '800-Pman.Tab.AdminNotifyRecur',
30   region   : 'center',
31   parent   : 'Pman.Tab.AdminWatchNotify',
32   name     : "Pman.Tab.AdminNotifyRecur",
33   disabled : false, 
34   permname : '', 
35   _tree : function()
36   {
37    var _this = this;
38    var MODULE = this;
39    return {
40    background : true,
41    fitContainer : true,
42    fitToframe : true,
43    region : 'center',
44    tableName : 'core_notify_recur',
45    title : _this._strings['c348b06d2667edd048ded3c1b1878cc1'] /* Recurrent Notifications */,
46    xns : Roo,
47    '|xns' : 'Roo',
48    xtype : 'GridPanel',
49    listeners : {
50     activate : function() {
51          _this.panel = this;
52          if (_this.grid) {
53              _this.grid.footer.onClick('first');
54          }
55      }
56    },
57    grid : {
58     autoExpandColumn : 'person_id_name',
59     loadMask : true,
60     xns : Roo.grid,
61     '|xns' : 'Roo.grid',
62     xtype : 'Grid',
63     listeners : {
64      render : function() 
65       {
66           _this.grid = this; 
67           //_this.dialog = Pman.Dialog.FILL_IN
68           if (_this.panel.active) {
69              this.footer.onClick('first');
70           }
71       },
72      rowdblclick : function (_self, rowIndex, e)
73       {
74           if (!_this.dialog) { return; }
75           _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
76               _this.grid.footer.onClick('first');
77           }); 
78       }
79     },
80     footer : {
81      displayInfo : true,
82      displayMsg : _this._strings['be3c26f9baf09972ddc410c5c7c63403'] /* Displaying core_notify_recur{0} - {1} of {2} */,
83      emptyMsg : _this._strings['effad6ff1d36887ce57d05300912bf61'] /* No core_notify_recur found */,
84      pageSize : 25,
85      xns : Roo,
86      '|xns' : 'Roo',
87      xtype : 'PagingToolbar'
88     },
89     toolbar : {
90      xns : Roo,
91      '|xns' : 'Roo',
92      xtype : 'Toolbar',
93      items  : [
94       {
95        allowBlank : true,
96        displayField : 'person_id_name',
97        editable : true,
98        emptyText : _this._strings['c956c97343a45cca5d492e70c56daa8e'] /* Select person */,
99        forceSelection : true,
100        hiddenName : 'id',
101        listWidth : 400,
102        loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
103        minChars : 2,
104        name : 'name',
105        pageSize : 20,
106        qtip : _this._strings['04df30d61712300fd31c24e2c7c8f9bc'] /* Select core_notify */,
107        queryParam : 'query[person_id_name]',
108        selectOnFocus : true,
109        tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{person_id_name}</b> {person_id_email}</div>',
110        triggerAction : 'all',
111        valueField : 'person_id',
112        width : 300,
113        xns : Roo.form,
114        '|xns' : 'Roo.form',
115        xtype : 'ComboBox',
116        listeners : {
117         render : function (_self)
118          {
119             _this.personCombo = _self;
120          },
121         select : function (combo, record, index)
122          {
123             (function() { _this.grid.footer.onClick('first'); }).defer(100);
124          }
125        },
126        store : {
127         remoteSort : true,
128         sortInfo : { direction : 'ASC', field: 'person_id_name' },
129         xns : Roo.data,
130         '|xns' : 'Roo.data',
131         xtype : 'Store',
132         listeners : {
133          beforeload : function (_self, o){
134               o.params = o.params || {};
135               o.params._distinct='person_id';
136               o.params._columns='person_id,person_id_name,person_id_email';
137               o.params['!person_id_name'] = '';
138               
139               // set more here
140           }
141         },
142         proxy : {
143          method : 'GET',
144          url : baseURL + '/Roo/core_notify_recur.php',
145          xns : Roo.data,
146          '|xns' : 'Roo.data',
147          xtype : 'HttpProxy'
148         },
149         reader : {
150          fields : [{"name":"id","type":"int"},{"name":"ontable","type":"string"}],
151          id : 'id',
152          root : 'data',
153          totalProperty : 'total',
154          xns : Roo.data,
155          '|xns' : 'Roo.data',
156          xtype : 'JsonReader'
157         }
158        }
159       }
160      ]
161     },
162     dataSource : {
163      remoteSort : true,
164      sortInfo : { field : 'person_id_name', direction: 'ASC' },
165      xns : Roo.data,
166      '|xns' : 'Roo.data',
167      xtype : 'Store',
168      listeners : {
169       beforeload : function (_self, options)
170        {
171            if (!_this.personCombo) {
172                return false;
173            }
174            var p = _this.personCombo.getValue();
175            if (p*1) { 
176                options.params.person_id = p;
177            }
178        }
179      },
180      proxy : {
181       method : 'GET',
182       url : baseURL + '/Roo/core_notify_recur.php',
183       xns : Roo.data,
184       '|xns' : 'Roo.data',
185       xtype : 'HttpProxy'
186      },
187      reader : {
188       fields : [
189           {
190               'name': 'id',
191               'type': 'int'
192           },
193           {
194               'name': 'person_id',
195               'type': 'int'
196           },
197           {
198               'name': 'dtstart',
199               'type': 'date',
200               'dateFormat': 'Y-m-d'
201           },
202           {
203               'name': 'dtend',
204               'type': 'date',
205               'dateFormat': 'Y-m-d'
206           },
207           {
208               'name': 'max_applied_dt',
209               'type': 'date',
210               'dateFormat': 'Y-m-d'
211           },
212           {
213               'name': 'updated_dt',
214               'type': 'date',
215               'dateFormat': 'Y-m-d'
216           },
217           {
218               'name': 'last_applied_dt',
219               'type': 'date',
220               'dateFormat': 'Y-m-d'
221           },
222           {
223               'name': 'tz',
224               'type': 'string'
225           },
226           {
227               'name': 'freq',
228               'type': 'string'
229           },
230           {
231               'name': 'freq_day',
232               'type': 'string'
233           },
234           {
235               'name': 'freq_hour',
236               'type': 'string'
237           },
238           {
239               'name': 'onid',
240               'type': 'int'
241           },
242           {
243               'name': 'ontable',
244               'type': 'string'
245           },
246           {
247               'name': 'last_event_id',
248               'type': 'int'
249           },
250           {
251               'name': 'method',
252               'type': 'string'
253           }
254       ],
255       id : 'id',
256       root : 'data',
257       totalProperty : 'total',
258       xns : Roo.data,
259       '|xns' : 'Roo.data',
260       xtype : 'JsonReader'
261      }
262     },
263     colModel : [
264      {
265       dataIndex : 'person_id_name',
266       header : _this._strings['40bed7cf9b3d4bb3a3d7a7e3eb18c5eb'] /* Person */,
267       renderer : function(v,x,r) { 
268           return String.format('{0} <a href="mailto:{1}">{1}</a>', v,r.data.person_id_email); 
269       },
270       width : 75,
271       xns : Roo.grid,
272       '|xns' : 'Roo.grid',
273       xtype : 'ColumnModel'
274      },
275      {
276       dataIndex : 'dtstart',
277       header : _this._strings['83b9a425d6b152330823ab8357f441ae'] /* Dtstart */,
278       renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); },
279       width : 75,
280       xns : Roo.grid,
281       '|xns' : 'Roo.grid',
282       xtype : 'ColumnModel'
283      },
284      {
285       dataIndex : 'dtend',
286       header : _this._strings['25af45209313b11d55424103567a1347'] /* Dtend */,
287       renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); },
288       width : 75,
289       xns : Roo.grid,
290       '|xns' : 'Roo.grid',
291       xtype : 'ColumnModel'
292      },
293      {
294       dataIndex : 'last_applied_dt',
295       header : _this._strings['808e3eefe289c698ec4def4a54ac36af'] /* Last Notification created */,
296       renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); },
297       width : 75,
298       xns : Roo.grid,
299       '|xns' : 'Roo.grid',
300       xtype : 'ColumnModel'
301      },
302      {
303       dataIndex : 'tz',
304       header : _this._strings['13a831874352b548ac7b5e63a860aa1b'] /* Tz */,
305       renderer : function(v) { return String.format('{0}', v); },
306       width : 75,
307       xns : Roo.grid,
308       '|xns' : 'Roo.grid',
309       xtype : 'ColumnModel'
310      },
311      {
312       dataIndex : 'freq',
313       header : _this._strings['84307c751e4541f54714472e3df742dd'] /* Freq */,
314       renderer : function(v) { return String.format('{0}', v); },
315       width : 100,
316       xns : Roo.grid,
317       '|xns' : 'Roo.grid',
318       xtype : 'ColumnModel'
319      },
320      {
321       dataIndex : 'freq_day',
322       header : _this._strings['ac2c474467a60fa4e2c88158a6d2abf9'] /* Freq day */,
323       renderer : function(v) { return String.format('{0}', v); },
324       width : 200,
325       xns : Roo.grid,
326       '|xns' : 'Roo.grid',
327       xtype : 'ColumnModel'
328      },
329      {
330       dataIndex : 'freq_hour',
331       header : _this._strings['6ffde0d71e2b678e619e4a642d0b22a6'] /* Freq hour */,
332       renderer : function(v) { return String.format('{0}', v); },
333       width : 200,
334       xns : Roo.grid,
335       '|xns' : 'Roo.grid',
336       xtype : 'ColumnModel'
337      },
338      {
339       dataIndex : 'onid',
340       header : _this._strings['d8d80ec41fc8cca7569ac2d2937bd97b'] /* Affects */,
341       renderer : function(v,x,r) { return String.format('{1}:{0}', v,r.data.ontable); },
342       width : 75,
343       xns : Roo.grid,
344       '|xns' : 'Roo.grid',
345       xtype : 'ColumnModel'
346      },
347      {
348       dataIndex : 'method',
349       header : _this._strings['4c3880bb027f159e801041b1021e88e8'] /* Method */,
350       renderer : function(v) { return String.format('{0}', v); },
351       width : 75,
352       xns : Roo.grid,
353       '|xns' : 'Roo.grid',
354       xtype : 'ColumnModel'
355      }
356     ]
357    }
358   };  }
359 });