1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Tab');
7 Pman.Tab.AdminNotify = new Roo.XComponent({
10 '136fac3c5c5881e0a7d0039e57decd68' :"Select notify type",
11 'bf1cb7e2a337a5e2ebf614009cbce9cc' :"Current Notifications",
12 '8535bcc0f05358a583bb432bbadf7e0d' :"Select type",
13 'e12167aa0a7698e6ebc92b4ce3909b53' :"To",
14 '478192f02d448c49bc6b7d76818d8483' :"Ontable",
15 'dca4dd744d00b6fe1362ef7825ffdee5' :"No core_notify found",
16 'dc873ea4b71ca217b0d8d1fdd45854ac' :"id#",
17 '0f6d01b16d57911731aa44b94dbfefcc' :"Act when",
18 '7f8c0283f16925caed8e632086b81b9c' :"Sent",
19 'c956c97343a45cca5d492e70c56daa8e' :"Select person",
20 '12832b4def6eb0b6105b3d11e16066ea' :"Msgid",
21 '1243daf593fa297e07ab03bf06d925af' :"Searching...",
22 '24463f10155b8af973300f86302c4fde' :"Who to notify",
23 'b22e7ea679daf5146f08f477419dd8bd' :"Triggered by",
24 '5da618e8e4b89c66fe86e32cdafde142' :"From",
25 'e4b478c05a833569833f9cc63b6c4354' :"Displaying core_notify{0} - {1} of {2}",
26 '4c3880bb027f159e801041b1021e88e8' :"Method",
27 'a4ecfc70574394990cf17bd83df499f7' :"Event",
28 'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
29 'f821027bade4aa6b7a4191cd1676cf41' :"Show Completed"
32 part : ["Admin", "Notify" ],
33 order : '001-Pman.Tab.AdminNotify',
35 parent : 'Pman.Tab.AdminWatchNotify',
36 name : "Pman.Tab.AdminNotify",
46 xtype : 'NestedLayoutPanel',
50 xtype : 'BorderLayout',
57 tableName : 'core_notify',
58 title : _this._strings['bf1cb7e2a337a5e2ebf614009cbce9cc'] /* Current Notifications */,
63 activate : function() {
66 _this.grid.footer.onClick('first');
72 autoExpandColumn : 'person_id_name',
81 //_this.dialog = Pman.Dialog.FILL_IN
82 if (_this.panel.active) {
83 this.footer.onClick('first');
89 displayMsg : _this._strings['e4b478c05a833569833f9cc63b6c4354'] /* Displaying core_notify{0} - {1} of {2} */,
90 emptyMsg : _this._strings['dca4dd744d00b6fe1362ef7825ffdee5'] /* No core_notify found */,
94 xtype : 'PagingToolbar'
103 displayField : 'person_id_name',
105 emptyText : _this._strings['c956c97343a45cca5d492e70c56daa8e'] /* Select person */,
106 forceSelection : true,
108 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
111 qtip : _this._strings['c956c97343a45cca5d492e70c56daa8e'] /* Select person */,
112 queryParam : 'query[person_id_name]',
113 selectOnFocus : true,
114 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{person_id_name}</b> {person_id_email}</div>',
115 triggerAction : 'all',
116 valueField : 'person_id',
122 render : function (_self)
124 _this.personCombo = _self;
126 select : function (combo, record, index)
128 _this.grid.footer.onClick('first');
133 sortInfo : { direction : 'ASC', field: 'person_id_name' },
138 beforeload : function (_self, o){
139 o.params = o.params || {};
140 o.params._distinct='person_id';
141 o.params._columns='person_id,person_id_name,person_id_email';
142 o.params['!person_id_name'] = '';
149 url : baseURL + '/Roo/core_notify.php',
155 fields : [{"name":"id","type":"int"},{"name":"ontable","type":"string"}],
158 totalProperty : 'total',
167 '|xns' : 'Roo.Toolbar',
172 displayField : 'display_name',
174 emptyText : _this._strings['136fac3c5c5881e0a7d0039e57decd68'] /* Select notify type */,
175 forceSelection : true,
177 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
180 qtip : _this._strings['8535bcc0f05358a583bb432bbadf7e0d'] /* Select type */,
181 queryParam : 'query[name]',
182 selectOnFocus : true,
183 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b></div>',
184 triggerAction : 'all',
191 render : function (_self)
193 _this.typeCombo = _self;
195 select : function (combo, record, index)
197 _this.grid.footer.onClick('first');
202 sortInfo : { direction : 'ASC', field: 'id' },
207 beforeload : function (_self, o){
208 o.params = o.params || {};
209 o.params.etype = 'Core.NotifyType';
215 url : baseURL + '/Roo/core_enum.php',
221 fields : [{"name":"name","type":"string"},{"name":"display_name","type":"string"}],
224 totalProperty : 'total',
233 '|xns' : 'Roo.Toolbar',
237 text : _this._strings['5da618e8e4b89c66fe86e32cdafde142'] /* From */,
239 '|xns' : 'Roo.Toolbar',
249 render : function (_self)
251 _this.fromDateSel = _self;
252 //_self.setValue( new Date() );
254 select : function (combo, date)
256 _this.grid.footer.onClick('first');
262 '|xns' : 'Roo.Toolbar',
266 text : _this._strings['e12167aa0a7698e6ebc92b4ce3909b53'] /* To */,
268 '|xns' : 'Roo.Toolbar',
278 render : function (_self)
280 _this.toDateSel = _self;
281 //_self.setValue( new Date() );
283 select : function (combo, date)
285 _this.grid.footer.onClick('first');
291 '|xns' : 'Roo.Toolbar',
295 cls : 'x-btn-text-icon',
296 icon : rootURL + '/Pman/templates/images/trash.gif',
297 text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
299 '|xns' : 'Roo.Toolbar',
304 Pman.genericDelete(_this, 'core_notify');
310 text : _this._strings['f821027bade4aa6b7a4191cd1676cf41'] /* Show Completed */,
312 '|xns' : 'Roo.Toolbar',
315 render : function (_self)
317 _this.toggleBtn = _self;
319 toggle : function (_self, pressed)
321 this.setText(pressed ? "Hide Completed" : "Show Completed");
322 _this.grid.footer.onClick('first');
330 sortInfo : { field : 'act_when', direction: 'DESC' },
335 beforeload : function (_self, options)
337 options.params = options.params || {};
339 options.params._evtype_align = 1;
341 if (!_this.toggleBtn.pressed) {
342 options.params['event_id'] = 0;
344 if (!_this.personCombo) {
347 var p = _this.personCombo.getValue();
349 options.params.person_id = p;
352 var from = _this.fromDateSel.getValue();
355 options.params.from = from.format('Y-m-d');
358 var to = _this.toDateSel.getValue();
361 options.params.to = to.format('Y-m-d');
364 var type = _this.typeCombo.getValue();
367 options.params.evtype = type;
373 url : baseURL + '/Roo/core_notify.php',
387 'dateFormat': 'Y-m-d'
408 'dateFormat': 'Y-m-d'
415 'name': 'person_id_id',
419 'name': 'person_id_office_id',
423 'name': 'person_id_name',
427 'name': 'person_id_phone',
431 'name': 'person_id_fax',
435 'name': 'person_id_email',
439 'name': 'person_id_company_id',
443 'name': 'person_id_role',
447 'name': 'person_id_active',
451 'name': 'person_id_remarks',
455 'name': 'person_id_passwd',
459 'name': 'person_id_owner_id',
463 'name': 'person_id_lang',
467 'name': 'person_id_no_reset_sent',
471 'name': 'person_id_action_type',
475 'name': 'person_id_project_id',
479 'name': 'person_id_deleted_by',
483 'name': 'person_id_deleted_dt',
487 'name': 'event_id_id',
491 'name': 'event_id_person_name',
495 'name': 'event_id_event_when',
499 'name': 'event_id_action',
503 'name': 'event_id_ipaddr',
507 'name': 'event_id_on_id',
511 'name': 'event_id_on_table',
515 'name': 'event_id_person_id',
519 'name': 'event_id_remarks',
525 totalProperty : 'total',
534 header : _this._strings['dc873ea4b71ca217b0d8d1fdd45854ac'] /* id# */,
535 renderer : function(v) { return String.format('{0}', v ); },
540 xtype : 'ColumnModel'
543 dataIndex : 'evtype',
544 header : _this._strings['4c3880bb027f159e801041b1021e88e8'] /* Method */,
545 renderer : function(v,x,r)
547 var vv = (typeof(r.data.evtype_align) != 'undefined' && r.data.evtype_align) ? r.data.evtype_align : v;
548 return String.format('<span qtip="{0}">{1}</span>', v, vv );
554 xtype : 'ColumnModel'
557 dataIndex : 'act_when',
558 header : _this._strings['0f6d01b16d57911731aa44b94dbfefcc'] /* Act when */,
559 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); },
564 xtype : 'ColumnModel'
568 header : _this._strings['7f8c0283f16925caed8e632086b81b9c'] /* Sent */,
569 renderer : function(v,x,r) {
570 if (r.data.event_id *1 == 0) {
573 return String.format('{0}', v ? v.format('d/M/Y H:i:s') : '');
579 xtype : 'ColumnModel'
582 dataIndex : 'ontable',
583 header : _this._strings['478192f02d448c49bc6b7d76818d8483'] /* Ontable */,
584 renderer : function(v,x,r) { return String.format('{0}:{1}', v,r.data.onid); },
588 xtype : 'ColumnModel'
591 dataIndex : 'person_id_name',
592 header : _this._strings['24463f10155b8af973300f86302c4fde'] /* Who to notify */,
593 renderer : function(v,x,r) {
595 var pt = r.data.person_table.toLowerCase() ;
596 var pt = pt.length ? pt : 'person';
597 var ecol = pt + '_id_email' ;
598 var ncol = pt + '_id_name' ;
599 return String.format('{0} <u><{1}></u>', r.data[ncol], r.data[ecol]);
604 xtype : 'ColumnModel'
607 dataIndex : 'trigger_event_id',
608 header : _this._strings['b22e7ea679daf5146f08f477419dd8bd'] /* Triggered by */,
609 renderer : function(v,x,r) {
610 return String.format(
612 r.data.trigger_event_id_on_table,
613 r.data.trigger_event_id_on_id,
614 r.data.trigger_event_id_remarks
620 xtype : 'ColumnModel'
624 header : _this._strings['12832b4def6eb0b6105b3d11e16066ea'] /* Msgid */,
625 renderer : function(v) { return String.format('{0}', v); },
629 xtype : 'ColumnModel'
632 dataIndex : 'event_id_remarks',
633 header : _this._strings['a4ecfc70574394990cf17bd83df499f7'] /* Event */,
634 renderer : function(v) { return String.format('<span qtip="{0}">{0}</span>', v); },
638 xtype : 'ColumnModel'