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",
45 title : _this._strings['bf1cb7e2a337a5e2ebf614009cbce9cc'] /* Current Notifications */,
48 xtype : 'NestedLayoutPanel',
52 xtype : 'BorderLayout',
56 xtype : 'LayoutRegion'
64 xtype : 'LayoutRegion'
72 tableName : 'core_notify',
73 title : _this._strings['bf1cb7e2a337a5e2ebf614009cbce9cc'] /* Current Notifications */,
78 activate : function() {
81 _this.grid.footer.onClick('first');
87 autoExpandColumn : 'person_id_name',
96 //_this.dialog = Pman.Dialog.FILL_IN
97 if (_this.panel.active) {
98 this.footer.onClick('first');
104 displayMsg : _this._strings['e4b478c05a833569833f9cc63b6c4354'] /* Displaying core_notify{0} - {1} of {2} */,
105 emptyMsg : _this._strings['dca4dd744d00b6fe1362ef7825ffdee5'] /* No core_notify found */,
109 xtype : 'PagingToolbar'
118 displayField : 'person_id_name',
120 emptyText : _this._strings['c956c97343a45cca5d492e70c56daa8e'] /* Select person */,
121 forceSelection : true,
123 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
126 qtip : _this._strings['c956c97343a45cca5d492e70c56daa8e'] /* Select person */,
127 queryParam : 'query[person_id_name]',
128 selectOnFocus : true,
129 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{person_id_name}</b> {person_id_email}</div>',
130 triggerAction : 'all',
131 valueField : 'person_id',
137 render : function (_self)
139 _this.personCombo = _self;
141 select : function (combo, record, index)
143 _this.grid.footer.onClick('first');
148 sortInfo : { direction : 'ASC', field: 'person_id_name' },
153 beforeload : function (_self, o){
154 o.params = o.params || {};
155 o.params._distinct='person_id';
156 o.params._columns='person_id,person_id_name,person_id_email';
157 o.params['!person_id_name'] = '';
164 url : baseURL + '/Roo/core_notify.php',
170 fields : [{"name":"id","type":"int"},{"name":"ontable","type":"string"}],
173 totalProperty : 'total',
182 '|xns' : 'Roo.Toolbar',
187 displayField : 'display_name',
189 emptyText : _this._strings['136fac3c5c5881e0a7d0039e57decd68'] /* Select notify type */,
190 forceSelection : true,
192 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
195 qtip : _this._strings['8535bcc0f05358a583bb432bbadf7e0d'] /* Select type */,
196 queryParam : 'query[name]',
197 selectOnFocus : true,
198 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b></div>',
199 triggerAction : 'all',
206 render : function (_self)
208 _this.typeCombo = _self;
210 select : function (combo, record, index)
212 _this.grid.footer.onClick('first');
217 sortInfo : { direction : 'ASC', field: 'id' },
222 beforeload : function (_self, o){
223 o.params = o.params || {};
224 o.params.etype = 'Core.NotifyType';
230 url : baseURL + '/Roo/core_enum.php',
236 fields : [{"name":"name","type":"string"},{"name":"display_name","type":"string"}],
239 totalProperty : 'total',
248 '|xns' : 'Roo.Toolbar',
252 text : _this._strings['5da618e8e4b89c66fe86e32cdafde142'] /* From */,
254 '|xns' : 'Roo.Toolbar',
264 render : function (_self)
266 _this.fromDateSel = _self;
267 //_self.setValue( new Date() );
269 select : function (combo, date)
271 _this.grid.footer.onClick('first');
277 '|xns' : 'Roo.Toolbar',
281 text : _this._strings['e12167aa0a7698e6ebc92b4ce3909b53'] /* To */,
283 '|xns' : 'Roo.Toolbar',
293 render : function (_self)
295 _this.toDateSel = _self;
296 //_self.setValue( new Date() );
298 select : function (combo, date)
300 _this.grid.footer.onClick('first');
306 '|xns' : 'Roo.Toolbar',
310 cls : 'x-btn-text-icon',
311 icon : rootURL + '/Pman/templates/images/trash.gif',
312 text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
314 '|xns' : 'Roo.Toolbar',
319 Pman.genericDelete(_this, 'core_notify');
325 text : _this._strings['f821027bade4aa6b7a4191cd1676cf41'] /* Show Completed */,
327 '|xns' : 'Roo.Toolbar',
330 render : function (_self)
332 _this.toggleBtn = _self;
334 toggle : function (_self, pressed)
336 this.setText(pressed ? "Hide Completed" : "Show Completed");
337 _this.grid.footer.onClick('first');
345 sortInfo : { field : 'act_when', direction: 'DESC' },
350 beforeload : function (_self, options)
352 options.params = options.params || {};
354 options.params._evtype_align = 1;
356 if (!_this.toggleBtn.pressed) {
357 options.params['event_id'] = 0;
359 if (!_this.personCombo) {
362 var p = _this.personCombo.getValue();
364 options.params.person_id = p;
367 var from = _this.fromDateSel.getValue();
370 options.params.from = from.format('Y-m-d');
373 var to = _this.toDateSel.getValue();
376 options.params.to = to.format('Y-m-d');
379 var type = _this.typeCombo.getValue();
382 options.params.evtype = type;
388 url : baseURL + '/Roo/core_notify.php',
402 'dateFormat': 'Y-m-d'
423 'dateFormat': 'Y-m-d'
430 'name': 'person_id_id',
434 'name': 'person_id_office_id',
438 'name': 'person_id_name',
442 'name': 'person_id_phone',
446 'name': 'person_id_fax',
450 'name': 'person_id_email',
454 'name': 'person_id_company_id',
458 'name': 'person_id_role',
462 'name': 'person_id_active',
466 'name': 'person_id_remarks',
470 'name': 'person_id_passwd',
474 'name': 'person_id_owner_id',
478 'name': 'person_id_lang',
482 'name': 'person_id_no_reset_sent',
486 'name': 'person_id_action_type',
490 'name': 'person_id_project_id',
494 'name': 'person_id_deleted_by',
498 'name': 'person_id_deleted_dt',
502 'name': 'event_id_id',
506 'name': 'event_id_person_name',
510 'name': 'event_id_event_when',
514 'name': 'event_id_action',
518 'name': 'event_id_ipaddr',
522 'name': 'event_id_on_id',
526 'name': 'event_id_on_table',
530 'name': 'event_id_person_id',
534 'name': 'event_id_remarks',
540 totalProperty : 'total',
549 header : _this._strings['dc873ea4b71ca217b0d8d1fdd45854ac'] /* id# */,
550 renderer : function(v) { return String.format('{0}', v ); },
555 xtype : 'ColumnModel'
558 dataIndex : 'evtype',
559 header : _this._strings['4c3880bb027f159e801041b1021e88e8'] /* Method */,
560 renderer : function(v,x,r)
562 var vv = (typeof(r.data.evtype_align) != 'undefined' && r.data.evtype_align) ? r.data.evtype_align : v;
563 return String.format('<span qtip="{0}">{1}</span>', v, vv );
569 xtype : 'ColumnModel'
572 dataIndex : 'act_when',
573 header : _this._strings['0f6d01b16d57911731aa44b94dbfefcc'] /* Act when */,
574 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); },
579 xtype : 'ColumnModel'
583 header : _this._strings['7f8c0283f16925caed8e632086b81b9c'] /* Sent */,
584 renderer : function(v,x,r) {
585 if (r.data.event_id *1 == 0) {
588 return String.format('{0}', v ? v.format('d/M/Y H:i:s') : '');
594 xtype : 'ColumnModel'
597 dataIndex : 'ontable',
598 header : _this._strings['478192f02d448c49bc6b7d76818d8483'] /* Ontable */,
599 renderer : function(v,x,r) { return String.format('{0}:{1}', v,r.data.onid); },
603 xtype : 'ColumnModel'
606 dataIndex : 'person_id_name',
607 header : _this._strings['24463f10155b8af973300f86302c4fde'] /* Who to notify */,
608 renderer : function(v,x,r) {
610 var pt = r.data.person_table.toLowerCase() ;
611 var pt = pt.length ? pt : 'person';
612 var ecol = pt + '_id_email' ;
613 var ncol = pt + '_id_name' ;
614 return String.format('{0} <u><{1}></u>', r.data[ncol], r.data[ecol]);
619 xtype : 'ColumnModel'
622 dataIndex : 'trigger_event_id',
623 header : _this._strings['b22e7ea679daf5146f08f477419dd8bd'] /* Triggered by */,
624 renderer : function(v,x,r) {
625 return String.format(
627 r.data.trigger_event_id_on_table,
628 r.data.trigger_event_id_on_id,
629 r.data.trigger_event_id_remarks
635 xtype : 'ColumnModel'
639 header : _this._strings['12832b4def6eb0b6105b3d11e16066ea'] /* Msgid */,
640 renderer : function(v) { return String.format('{0}', v); },
644 xtype : 'ColumnModel'
647 dataIndex : 'event_id_remarks',
648 header : _this._strings['a4ecfc70574394990cf17bd83df499f7'] /* Event */,
649 renderer : function(v) { return String.format('<span qtip="{0}">{0}</span>', v); },
653 xtype : 'ColumnModel'
663 xtype : 'ContentPanel',
665 render : function (_self)
667 _this.viewPanel = _self;