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 '12ea1a38991aa3bc4992b10adac0f3bc' :"Event Details",
29 'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
30 'f821027bade4aa6b7a4191cd1676cf41' :"Show Completed"
33 part : ["Admin", "Notify" ],
34 order : '001-Pman.Tab.AdminNotify',
36 parent : 'Pman.Tab.AdminWatchNotify',
37 name : "Pman.Tab.AdminNotify",
46 title : _this._strings['bf1cb7e2a337a5e2ebf614009cbce9cc'] /* Current Notifications */,
49 xtype : 'NestedLayoutPanel',
53 xtype : 'BorderLayout',
57 xtype : 'LayoutRegion'
64 title : _this._strings['12ea1a38991aa3bc4992b10adac0f3bc'] /* Event Details */,
67 xtype : 'LayoutRegion'
75 tableName : 'core_notify',
76 title : _this._strings['bf1cb7e2a337a5e2ebf614009cbce9cc'] /* Current Notifications */,
81 activate : function() {
84 _this.grid.footer.onClick('first');
90 autoExpandColumn : 'person_id_name',
99 //_this.dialog = Pman.Dialog.FILL_IN
100 if (_this.panel.active) {
101 this.footer.onClick('first');
107 displayMsg : _this._strings['e4b478c05a833569833f9cc63b6c4354'] /* Displaying core_notify{0} - {1} of {2} */,
108 emptyMsg : _this._strings['dca4dd744d00b6fe1362ef7825ffdee5'] /* No core_notify found */,
112 xtype : 'PagingToolbar'
121 displayField : 'person_id_name',
123 emptyText : _this._strings['c956c97343a45cca5d492e70c56daa8e'] /* Select person */,
124 forceSelection : true,
126 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
129 qtip : _this._strings['c956c97343a45cca5d492e70c56daa8e'] /* Select person */,
130 queryParam : 'query[person_id_name]',
131 selectOnFocus : true,
132 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{person_id_name}</b> {person_id_email}</div>',
133 triggerAction : 'all',
134 valueField : 'person_id',
140 render : function (_self)
142 _this.personCombo = _self;
144 select : function (combo, record, index)
146 _this.grid.footer.onClick('first');
151 sortInfo : { direction : 'ASC', field: 'person_id_name' },
156 beforeload : function (_self, o){
157 o.params = o.params || {};
158 o.params._distinct='person_id';
159 o.params._columns='person_id,person_id_name,person_id_email';
160 o.params['!person_id_name'] = '';
167 url : baseURL + '/Roo/core_notify.php',
173 fields : [{"name":"id","type":"int"},{"name":"ontable","type":"string"}],
176 totalProperty : 'total',
185 '|xns' : 'Roo.Toolbar',
190 displayField : 'display_name',
192 emptyText : _this._strings['136fac3c5c5881e0a7d0039e57decd68'] /* Select notify type */,
193 forceSelection : true,
195 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
198 qtip : _this._strings['8535bcc0f05358a583bb432bbadf7e0d'] /* Select type */,
199 queryParam : 'query[name]',
200 selectOnFocus : true,
201 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b></div>',
202 triggerAction : 'all',
209 render : function (_self)
211 _this.typeCombo = _self;
213 select : function (combo, record, index)
215 _this.grid.footer.onClick('first');
220 sortInfo : { direction : 'ASC', field: 'id' },
225 beforeload : function (_self, o){
226 o.params = o.params || {};
227 o.params.etype = 'Core.NotifyType';
233 url : baseURL + '/Roo/core_enum.php',
239 fields : [{"name":"name","type":"string"},{"name":"display_name","type":"string"}],
242 totalProperty : 'total',
251 '|xns' : 'Roo.Toolbar',
255 text : _this._strings['5da618e8e4b89c66fe86e32cdafde142'] /* From */,
257 '|xns' : 'Roo.Toolbar',
267 render : function (_self)
269 _this.fromDateSel = _self;
270 //_self.setValue( new Date() );
272 select : function (combo, date)
274 _this.grid.footer.onClick('first');
280 '|xns' : 'Roo.Toolbar',
284 text : _this._strings['e12167aa0a7698e6ebc92b4ce3909b53'] /* To */,
286 '|xns' : 'Roo.Toolbar',
296 render : function (_self)
298 _this.toDateSel = _self;
299 //_self.setValue( new Date() );
301 select : function (combo, date)
303 _this.grid.footer.onClick('first');
309 '|xns' : 'Roo.Toolbar',
313 cls : 'x-btn-text-icon',
314 icon : rootURL + '/Pman/templates/images/trash.gif',
315 text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
317 '|xns' : 'Roo.Toolbar',
322 Pman.genericDelete(_this, 'core_notify');
328 text : _this._strings['f821027bade4aa6b7a4191cd1676cf41'] /* Show Completed */,
330 '|xns' : 'Roo.Toolbar',
333 render : function (_self)
335 _this.toggleBtn = _self;
337 toggle : function (_self, pressed)
339 this.setText(pressed ? "Hide Completed" : "Show Completed");
340 _this.grid.footer.onClick('first');
348 sortInfo : { field : 'act_when', direction: 'DESC' },
353 beforeload : function (_self, options)
355 options.params = options.params || {};
357 options.params._evtype_align = 1;
359 if (!_this.toggleBtn.pressed) {
360 options.params['event_id'] = 0;
362 if (!_this.personCombo) {
365 var p = _this.personCombo.getValue();
367 options.params.person_id = p;
370 var from = _this.fromDateSel.getValue();
373 options.params.from = from.format('Y-m-d');
376 var to = _this.toDateSel.getValue();
379 options.params.to = to.format('Y-m-d');
382 var type = _this.typeCombo.getValue();
385 options.params.evtype = type;
391 url : baseURL + '/Roo/core_notify.php',
405 'dateFormat': 'Y-m-d'
426 'dateFormat': 'Y-m-d'
433 'name': 'person_id_id',
437 'name': 'person_id_office_id',
441 'name': 'person_id_name',
445 'name': 'person_id_phone',
449 'name': 'person_id_fax',
453 'name': 'person_id_email',
457 'name': 'person_id_company_id',
461 'name': 'person_id_role',
465 'name': 'person_id_active',
469 'name': 'person_id_remarks',
473 'name': 'person_id_passwd',
477 'name': 'person_id_owner_id',
481 'name': 'person_id_lang',
485 'name': 'person_id_no_reset_sent',
489 'name': 'person_id_action_type',
493 'name': 'person_id_project_id',
497 'name': 'person_id_deleted_by',
501 'name': 'person_id_deleted_dt',
505 'name': 'event_id_id',
509 'name': 'event_id_person_name',
513 'name': 'event_id_event_when',
517 'name': 'event_id_action',
521 'name': 'event_id_ipaddr',
525 'name': 'event_id_on_id',
529 'name': 'event_id_on_table',
533 'name': 'event_id_person_id',
537 'name': 'event_id_remarks',
543 totalProperty : 'total',
552 header : _this._strings['dc873ea4b71ca217b0d8d1fdd45854ac'] /* id# */,
553 renderer : function(v) { return String.format('{0}', v ); },
558 xtype : 'ColumnModel'
561 dataIndex : 'evtype',
562 header : _this._strings['4c3880bb027f159e801041b1021e88e8'] /* Method */,
563 renderer : function(v,x,r)
565 var vv = (typeof(r.data.evtype_align) != 'undefined' && r.data.evtype_align) ? r.data.evtype_align : v;
566 return String.format('<span qtip="{0}">{1}</span>', v, vv );
572 xtype : 'ColumnModel'
575 dataIndex : 'act_when',
576 header : _this._strings['0f6d01b16d57911731aa44b94dbfefcc'] /* Act when */,
577 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); },
582 xtype : 'ColumnModel'
586 header : _this._strings['7f8c0283f16925caed8e632086b81b9c'] /* Sent */,
587 renderer : function(v,x,r) {
588 if (r.data.event_id *1 == 0) {
591 return String.format('{0}', v ? v.format('d/M/Y H:i:s') : '');
597 xtype : 'ColumnModel'
600 dataIndex : 'ontable',
601 header : _this._strings['478192f02d448c49bc6b7d76818d8483'] /* Ontable */,
602 renderer : function(v,x,r) { return String.format('{0}:{1}', v,r.data.onid); },
606 xtype : 'ColumnModel'
609 dataIndex : 'person_id_name',
610 header : _this._strings['24463f10155b8af973300f86302c4fde'] /* Who to notify */,
611 renderer : function(v,x,r) {
613 var pt = r.data.person_table.toLowerCase() ;
614 var pt = pt.length ? pt : 'person';
615 var ecol = pt + '_id_email' ;
616 var ncol = pt + '_id_name' ;
617 return String.format('{0} <u><{1}></u>', r.data[ncol], r.data[ecol]);
622 xtype : 'ColumnModel'
625 dataIndex : 'trigger_event_id',
626 header : _this._strings['b22e7ea679daf5146f08f477419dd8bd'] /* Triggered by */,
627 renderer : function(v,x,r) {
628 return String.format(
630 r.data.trigger_event_id_on_table,
631 r.data.trigger_event_id_on_id,
632 r.data.trigger_event_id_remarks
638 xtype : 'ColumnModel'
642 header : _this._strings['12832b4def6eb0b6105b3d11e16066ea'] /* Msgid */,
643 renderer : function(v) { return String.format('{0}', v); },
647 xtype : 'ColumnModel'
650 dataIndex : 'event_id_remarks',
651 header : _this._strings['a4ecfc70574394990cf17bd83df499f7'] /* Event */,
652 renderer : function(v) { return String.format('<span qtip="{0}">{0}</span>', v); },
656 xtype : 'ColumnModel'
666 xtype : 'ContentPanel',
668 render : function (_self)
670 _this.viewPanel = _self;