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'
61 collapsedTitle : 'View Details',
65 title : _this._strings['12ea1a38991aa3bc4992b10adac0f3bc'] /* Event Details */,
68 xtype : 'LayoutRegion'
76 tableName : 'core_notify',
77 title : _this._strings['bf1cb7e2a337a5e2ebf614009cbce9cc'] /* Current Notifications */,
82 activate : function() {
85 _this.grid.footer.onClick('first');
91 autoExpandColumn : 'person_id_name',
100 //_this.dialog = Pman.Dialog.FILL_IN
101 if (_this.panel.active) {
102 this.footer.onClick('first');
108 displayMsg : _this._strings['e4b478c05a833569833f9cc63b6c4354'] /* Displaying core_notify{0} - {1} of {2} */,
109 emptyMsg : _this._strings['dca4dd744d00b6fe1362ef7825ffdee5'] /* No core_notify found */,
113 xtype : 'PagingToolbar'
122 displayField : 'person_id_name',
124 emptyText : _this._strings['c956c97343a45cca5d492e70c56daa8e'] /* Select person */,
125 forceSelection : true,
127 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
130 qtip : _this._strings['c956c97343a45cca5d492e70c56daa8e'] /* Select person */,
131 queryParam : 'query[person_id_name]',
132 selectOnFocus : true,
133 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{person_id_name}</b> {person_id_email}</div>',
134 triggerAction : 'all',
135 valueField : 'person_id',
141 render : function (_self)
143 _this.personCombo = _self;
145 select : function (combo, record, index)
147 _this.grid.footer.onClick('first');
152 sortInfo : { direction : 'ASC', field: 'person_id_name' },
157 beforeload : function (_self, o){
158 o.params = o.params || {};
159 o.params._distinct='person_id';
160 o.params._columns='person_id,person_id_name,person_id_email';
161 o.params['!person_id_name'] = '';
168 url : baseURL + '/Roo/core_notify.php',
174 fields : [{"name":"id","type":"int"},{"name":"ontable","type":"string"}],
177 totalProperty : 'total',
186 '|xns' : 'Roo.Toolbar',
191 displayField : 'display_name',
193 emptyText : _this._strings['136fac3c5c5881e0a7d0039e57decd68'] /* Select notify type */,
194 forceSelection : true,
196 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
199 qtip : _this._strings['8535bcc0f05358a583bb432bbadf7e0d'] /* Select type */,
200 queryParam : 'query[name]',
201 selectOnFocus : true,
202 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b></div>',
203 triggerAction : 'all',
210 render : function (_self)
212 _this.typeCombo = _self;
214 select : function (combo, record, index)
216 _this.grid.footer.onClick('first');
221 sortInfo : { direction : 'ASC', field: 'id' },
226 beforeload : function (_self, o){
227 o.params = o.params || {};
228 o.params.etype = 'Core.NotifyType';
234 url : baseURL + '/Roo/core_enum.php',
240 fields : [{"name":"name","type":"string"},{"name":"display_name","type":"string"}],
243 totalProperty : 'total',
252 '|xns' : 'Roo.Toolbar',
256 text : _this._strings['5da618e8e4b89c66fe86e32cdafde142'] /* From */,
258 '|xns' : 'Roo.Toolbar',
268 render : function (_self)
270 _this.fromDateSel = _self;
271 //_self.setValue( new Date() );
273 select : function (combo, date)
275 _this.grid.footer.onClick('first');
281 '|xns' : 'Roo.Toolbar',
285 text : _this._strings['e12167aa0a7698e6ebc92b4ce3909b53'] /* To */,
287 '|xns' : 'Roo.Toolbar',
297 render : function (_self)
299 _this.toDateSel = _self;
300 //_self.setValue( new Date() );
302 select : function (combo, date)
304 _this.grid.footer.onClick('first');
310 '|xns' : 'Roo.Toolbar',
314 cls : 'x-btn-text-icon',
315 icon : rootURL + '/Pman/templates/images/trash.gif',
316 text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
318 '|xns' : 'Roo.Toolbar',
323 Pman.genericDelete(_this, 'core_notify');
329 text : _this._strings['f821027bade4aa6b7a4191cd1676cf41'] /* Show Completed */,
331 '|xns' : 'Roo.Toolbar',
334 render : function (_self)
336 _this.toggleBtn = _self;
338 toggle : function (_self, pressed)
340 this.setText(pressed ? "Hide Completed" : "Show Completed");
341 _this.grid.footer.onClick('first');
349 sortInfo : { field : 'act_when', direction: 'DESC' },
354 beforeload : function (_self, options)
356 options.params = options.params || {};
358 options.params._evtype_align = 1;
360 if (!_this.toggleBtn.pressed) {
361 options.params['event_id'] = 0;
363 if (!_this.personCombo) {
366 var p = _this.personCombo.getValue();
368 options.params.person_id = p;
371 var from = _this.fromDateSel.getValue();
374 options.params.from = from.format('Y-m-d');
377 var to = _this.toDateSel.getValue();
380 options.params.to = to.format('Y-m-d');
383 var type = _this.typeCombo.getValue();
386 options.params.evtype = type;
392 url : baseURL + '/Roo/core_notify.php',
406 'dateFormat': 'Y-m-d'
427 'dateFormat': 'Y-m-d'
434 'name': 'person_id_id',
438 'name': 'person_id_office_id',
442 'name': 'person_id_name',
446 'name': 'person_id_phone',
450 'name': 'person_id_fax',
454 'name': 'person_id_email',
458 'name': 'person_id_company_id',
462 'name': 'person_id_role',
466 'name': 'person_id_active',
470 'name': 'person_id_remarks',
474 'name': 'person_id_passwd',
478 'name': 'person_id_owner_id',
482 'name': 'person_id_lang',
486 'name': 'person_id_no_reset_sent',
490 'name': 'person_id_action_type',
494 'name': 'person_id_project_id',
498 'name': 'person_id_deleted_by',
502 'name': 'person_id_deleted_dt',
506 'name': 'event_id_id',
510 'name': 'event_id_person_name',
514 'name': 'event_id_event_when',
518 'name': 'event_id_action',
522 'name': 'event_id_ipaddr',
526 'name': 'event_id_on_id',
530 'name': 'event_id_on_table',
534 'name': 'event_id_person_id',
538 'name': 'event_id_remarks',
544 totalProperty : 'total',
554 xtype : 'RowSelectionModel',
556 afterselectionchange : function (_self)
558 // load detail log in _this.viewPanel;
559 if (!this.getSelected()) {
560 this.viewPanel.setContent("Nothing Selected");
563 var id = this.getSelected().data.id;
564 _this.viewPanel.load( { url : baseURL + "/Admin/EventView/" + id + ".html" });
572 header : _this._strings['dc873ea4b71ca217b0d8d1fdd45854ac'] /* id# */,
573 renderer : function(v) { return String.format('{0}', v ); },
578 xtype : 'ColumnModel'
581 dataIndex : 'evtype',
582 header : _this._strings['4c3880bb027f159e801041b1021e88e8'] /* Method */,
583 renderer : function(v,x,r)
585 var vv = (typeof(r.data.evtype_align) != 'undefined' && r.data.evtype_align) ? r.data.evtype_align : v;
586 return String.format('<span qtip="{0}">{1}</span>', v, vv );
592 xtype : 'ColumnModel'
595 dataIndex : 'act_when',
596 header : _this._strings['0f6d01b16d57911731aa44b94dbfefcc'] /* Act when */,
597 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); },
602 xtype : 'ColumnModel'
606 header : _this._strings['7f8c0283f16925caed8e632086b81b9c'] /* Sent */,
607 renderer : function(v,x,r) {
608 if (r.data.event_id *1 == 0) {
611 return String.format('{0}', v ? v.format('d/M/Y H:i:s') : '');
617 xtype : 'ColumnModel'
620 dataIndex : 'ontable',
621 header : _this._strings['478192f02d448c49bc6b7d76818d8483'] /* Ontable */,
622 renderer : function(v,x,r) { return String.format('{0}:{1}', v,r.data.onid); },
626 xtype : 'ColumnModel'
629 dataIndex : 'person_id_name',
630 header : _this._strings['24463f10155b8af973300f86302c4fde'] /* Who to notify */,
631 renderer : function(v,x,r) {
633 var pt = r.data.person_table.toLowerCase() ;
634 var pt = pt.length ? pt : 'person';
635 var ecol = pt + '_id_email' ;
636 var ncol = pt + '_id_name' ;
637 return String.format('{0} <u><{1}></u>', r.data[ncol], r.data[ecol]);
642 xtype : 'ColumnModel'
645 dataIndex : 'trigger_event_id',
646 header : _this._strings['b22e7ea679daf5146f08f477419dd8bd'] /* Triggered by */,
647 renderer : function(v,x,r) {
648 return String.format(
650 r.data.trigger_event_id_on_table,
651 r.data.trigger_event_id_on_id,
652 r.data.trigger_event_id_remarks
658 xtype : 'ColumnModel'
662 header : _this._strings['12832b4def6eb0b6105b3d11e16066ea'] /* Msgid */,
663 renderer : function(v) { return String.format('{0}', v); },
667 xtype : 'ColumnModel'
670 dataIndex : 'event_id_remarks',
671 header : _this._strings['a4ecfc70574394990cf17bd83df499f7'] /* Event */,
672 renderer : function(v) { return String.format('<span qtip="{0}">{0}</span>', v); },
676 xtype : 'ColumnModel'
686 xtype : 'ContentPanel',
688 render : function (_self)
690 _this.viewPanel = _self;