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",
44 title : _this._strings['bf1cb7e2a337a5e2ebf614009cbce9cc'] /* Current Notifications */,
47 xtype : 'NestedLayoutPanel',
51 xtype : 'BorderLayout',
55 xtype : 'LayoutRegion'
63 xtype : 'LayoutRegion'
71 tableName : 'core_notify',
72 title : _this._strings['bf1cb7e2a337a5e2ebf614009cbce9cc'] /* Current Notifications */,
77 activate : function() {
80 _this.grid.footer.onClick('first');
86 autoExpandColumn : 'person_id_name',
95 //_this.dialog = Pman.Dialog.FILL_IN
96 if (_this.panel.active) {
97 this.footer.onClick('first');
103 displayMsg : _this._strings['e4b478c05a833569833f9cc63b6c4354'] /* Displaying core_notify{0} - {1} of {2} */,
104 emptyMsg : _this._strings['dca4dd744d00b6fe1362ef7825ffdee5'] /* No core_notify found */,
108 xtype : 'PagingToolbar'
117 displayField : 'person_id_name',
119 emptyText : _this._strings['c956c97343a45cca5d492e70c56daa8e'] /* Select person */,
120 forceSelection : true,
122 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
125 qtip : _this._strings['c956c97343a45cca5d492e70c56daa8e'] /* Select person */,
126 queryParam : 'query[person_id_name]',
127 selectOnFocus : true,
128 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{person_id_name}</b> {person_id_email}</div>',
129 triggerAction : 'all',
130 valueField : 'person_id',
136 render : function (_self)
138 _this.personCombo = _self;
140 select : function (combo, record, index)
142 _this.grid.footer.onClick('first');
147 sortInfo : { direction : 'ASC', field: 'person_id_name' },
152 beforeload : function (_self, o){
153 o.params = o.params || {};
154 o.params._distinct='person_id';
155 o.params._columns='person_id,person_id_name,person_id_email';
156 o.params['!person_id_name'] = '';
163 url : baseURL + '/Roo/core_notify.php',
169 fields : [{"name":"id","type":"int"},{"name":"ontable","type":"string"}],
172 totalProperty : 'total',
181 '|xns' : 'Roo.Toolbar',
186 displayField : 'display_name',
188 emptyText : _this._strings['136fac3c5c5881e0a7d0039e57decd68'] /* Select notify type */,
189 forceSelection : true,
191 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
194 qtip : _this._strings['8535bcc0f05358a583bb432bbadf7e0d'] /* Select type */,
195 queryParam : 'query[name]',
196 selectOnFocus : true,
197 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b></div>',
198 triggerAction : 'all',
205 render : function (_self)
207 _this.typeCombo = _self;
209 select : function (combo, record, index)
211 _this.grid.footer.onClick('first');
216 sortInfo : { direction : 'ASC', field: 'id' },
221 beforeload : function (_self, o){
222 o.params = o.params || {};
223 o.params.etype = 'Core.NotifyType';
229 url : baseURL + '/Roo/core_enum.php',
235 fields : [{"name":"name","type":"string"},{"name":"display_name","type":"string"}],
238 totalProperty : 'total',
247 '|xns' : 'Roo.Toolbar',
251 text : _this._strings['5da618e8e4b89c66fe86e32cdafde142'] /* From */,
253 '|xns' : 'Roo.Toolbar',
263 render : function (_self)
265 _this.fromDateSel = _self;
266 //_self.setValue( new Date() );
268 select : function (combo, date)
270 _this.grid.footer.onClick('first');
276 '|xns' : 'Roo.Toolbar',
280 text : _this._strings['e12167aa0a7698e6ebc92b4ce3909b53'] /* To */,
282 '|xns' : 'Roo.Toolbar',
292 render : function (_self)
294 _this.toDateSel = _self;
295 //_self.setValue( new Date() );
297 select : function (combo, date)
299 _this.grid.footer.onClick('first');
305 '|xns' : 'Roo.Toolbar',
309 cls : 'x-btn-text-icon',
310 icon : rootURL + '/Pman/templates/images/trash.gif',
311 text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
313 '|xns' : 'Roo.Toolbar',
318 Pman.genericDelete(_this, 'core_notify');
324 text : _this._strings['f821027bade4aa6b7a4191cd1676cf41'] /* Show Completed */,
326 '|xns' : 'Roo.Toolbar',
329 render : function (_self)
331 _this.toggleBtn = _self;
333 toggle : function (_self, pressed)
335 this.setText(pressed ? "Hide Completed" : "Show Completed");
336 _this.grid.footer.onClick('first');
344 sortInfo : { field : 'act_when', direction: 'DESC' },
349 beforeload : function (_self, options)
351 options.params = options.params || {};
353 options.params._evtype_align = 1;
355 if (!_this.toggleBtn.pressed) {
356 options.params['event_id'] = 0;
358 if (!_this.personCombo) {
361 var p = _this.personCombo.getValue();
363 options.params.person_id = p;
366 var from = _this.fromDateSel.getValue();
369 options.params.from = from.format('Y-m-d');
372 var to = _this.toDateSel.getValue();
375 options.params.to = to.format('Y-m-d');
378 var type = _this.typeCombo.getValue();
381 options.params.evtype = type;
387 url : baseURL + '/Roo/core_notify.php',
401 'dateFormat': 'Y-m-d'
422 'dateFormat': 'Y-m-d'
429 'name': 'person_id_id',
433 'name': 'person_id_office_id',
437 'name': 'person_id_name',
441 'name': 'person_id_phone',
445 'name': 'person_id_fax',
449 'name': 'person_id_email',
453 'name': 'person_id_company_id',
457 'name': 'person_id_role',
461 'name': 'person_id_active',
465 'name': 'person_id_remarks',
469 'name': 'person_id_passwd',
473 'name': 'person_id_owner_id',
477 'name': 'person_id_lang',
481 'name': 'person_id_no_reset_sent',
485 'name': 'person_id_action_type',
489 'name': 'person_id_project_id',
493 'name': 'person_id_deleted_by',
497 'name': 'person_id_deleted_dt',
501 'name': 'event_id_id',
505 'name': 'event_id_person_name',
509 'name': 'event_id_event_when',
513 'name': 'event_id_action',
517 'name': 'event_id_ipaddr',
521 'name': 'event_id_on_id',
525 'name': 'event_id_on_table',
529 'name': 'event_id_person_id',
533 'name': 'event_id_remarks',
539 totalProperty : 'total',
548 header : _this._strings['dc873ea4b71ca217b0d8d1fdd45854ac'] /* id# */,
549 renderer : function(v) { return String.format('{0}', v ); },
554 xtype : 'ColumnModel'
557 dataIndex : 'evtype',
558 header : _this._strings['4c3880bb027f159e801041b1021e88e8'] /* Method */,
559 renderer : function(v,x,r)
561 var vv = (typeof(r.data.evtype_align) != 'undefined' && r.data.evtype_align) ? r.data.evtype_align : v;
562 return String.format('<span qtip="{0}">{1}</span>', v, vv );
568 xtype : 'ColumnModel'
571 dataIndex : 'act_when',
572 header : _this._strings['0f6d01b16d57911731aa44b94dbfefcc'] /* Act when */,
573 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); },
578 xtype : 'ColumnModel'
582 header : _this._strings['7f8c0283f16925caed8e632086b81b9c'] /* Sent */,
583 renderer : function(v,x,r) {
584 if (r.data.event_id *1 == 0) {
587 return String.format('{0}', v ? v.format('d/M/Y H:i:s') : '');
593 xtype : 'ColumnModel'
596 dataIndex : 'ontable',
597 header : _this._strings['478192f02d448c49bc6b7d76818d8483'] /* Ontable */,
598 renderer : function(v,x,r) { return String.format('{0}:{1}', v,r.data.onid); },
602 xtype : 'ColumnModel'
605 dataIndex : 'person_id_name',
606 header : _this._strings['24463f10155b8af973300f86302c4fde'] /* Who to notify */,
607 renderer : function(v,x,r) {
609 var pt = r.data.person_table.toLowerCase() ;
610 var pt = pt.length ? pt : 'person';
611 var ecol = pt + '_id_email' ;
612 var ncol = pt + '_id_name' ;
613 return String.format('{0} <u><{1}></u>', r.data[ncol], r.data[ecol]);
618 xtype : 'ColumnModel'
621 dataIndex : 'trigger_event_id',
622 header : _this._strings['b22e7ea679daf5146f08f477419dd8bd'] /* Triggered by */,
623 renderer : function(v,x,r) {
624 return String.format(
626 r.data.trigger_event_id_on_table,
627 r.data.trigger_event_id_on_id,
628 r.data.trigger_event_id_remarks
634 xtype : 'ColumnModel'
638 header : _this._strings['12832b4def6eb0b6105b3d11e16066ea'] /* Msgid */,
639 renderer : function(v) { return String.format('{0}', v); },
643 xtype : 'ColumnModel'
646 dataIndex : 'event_id_remarks',
647 header : _this._strings['a4ecfc70574394990cf17bd83df499f7'] /* Event */,
648 renderer : function(v) { return String.format('<span qtip="{0}">{0}</span>', v); },
652 xtype : 'ColumnModel'
662 xtype : 'ContentPanel',
664 render : function (_self)
666 _this.viewPanel = _self;