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({
8 part : ["Admin", "Notify" ],
9 order : '001-Pman.Tab.AdminNotify',
11 parent : 'Pman.Tab.AdminWatchNotify',
12 name : "Pman.Tab.AdminNotify",
24 url : baseURL + '/Roo/core_notify.php',
71 'name': 'person_id_id',
75 'name': 'person_id_office_id',
79 'name': 'person_id_name',
83 'name': 'person_id_phone',
87 'name': 'person_id_fax',
91 'name': 'person_id_email',
95 'name': 'person_id_company_id',
99 'name': 'person_id_role',
103 'name': 'person_id_active',
107 'name': 'person_id_remarks',
111 'name': 'person_id_passwd',
115 'name': 'person_id_owner_id',
119 'name': 'person_id_lang',
123 'name': 'person_id_no_reset_sent',
127 'name': 'person_id_action_type',
131 'name': 'person_id_project_id',
135 'name': 'person_id_deleted_by',
139 'name': 'person_id_deleted_dt',
143 'name': 'event_id_id',
147 'name': 'event_id_person_name',
151 'name': 'event_id_event_when',
155 'name': 'event_id_action',
159 'name': 'event_id_ipaddr',
163 'name': 'event_id_on_id',
167 'name': 'event_id_on_table',
171 'name': 'event_id_person_id',
175 'name': 'event_id_remarks',
179 totalProperty : 'total'
184 sortInfo : { field : 'act_when', direction: 'DESC' },
187 beforeload : function (_self, options)
189 options.params = options.params || {};
191 options.params._evtype_align = 1;
193 if (!_this.toggleBtn.pressed) {
194 options.params['event_id'] = 0;
196 if (!_this.personCombo) {
199 var p = _this.personCombo.getValue();
201 options.params.person_id = p;
214 xtype : 'PagingToolbar',
215 emptyMsg : "No core_notify found",
218 displayMsg : "Displaying core_notify{0} - {1} of {2}"
229 url : baseURL + '/Roo/core_notify.php',
238 xtype : 'JsonReader',
240 fields : [{"name":"id","type":"int"},{"name":"ontable","type":"string"}],
241 totalProperty : 'total'
246 sortInfo : { direction : 'ASC', field: 'person_id_name' },
249 beforeload : function (_self, o){
250 o.params = o.params || {};
251 o.params._distinct='person_id';
252 o.params._columns='person_id,person_id_name,person_id_email';
253 o.params['!person_id_name'] = '';
265 triggerAction : 'all',
266 forceSelection : true,
267 selectOnFocus : true,
269 displayField : 'person_id_name',
270 emptyText : "Select person",
273 valueField : 'person_id',
280 qtip : "Select core_notify",
281 queryParam : 'query[person_id_name]',
282 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{person_id_name}</b> {person_id_email}</div>',
283 loadingText : "Searching...",
285 render : function (_self)
287 _this.personCombo = _self;
289 select : function (combo, record, index)
291 _this.grid.footer.onClick('first');
300 '|xns' : 'Roo.Toolbar',
305 '|xns' : 'Roo.Toolbar',
317 render : function (_self)
\r
319 _this.dateSel = _self;
\r
320 _self.setValue( new Date() );
\r
322 select : function (combo, date)
324 _this.wgrid.ds.load({});
329 '|xns' : 'Roo.Toolbar',
334 '|xns' : 'Roo.Toolbar',
337 cls : 'x-btn-text-icon',
338 icon : rootURL + '/Pman/templates/images/trash.gif',
343 Pman.genericDelete(_this, 'core_notify');
348 '|xns' : 'Roo.Toolbar',
349 text : "Show Completed",
354 toggle : function (_self, pressed)
356 this.setText(pressed ? "Hide Completed" : "Show Completed");
357 _this.grid.footer.onClick('first');
359 render : function (_self)
361 _this.toggleBtn = _self;
369 autoExpandColumn : 'person_id_name',
376 xtype : 'ColumnModel',
380 renderer : function(v) { return String.format('{0}', v ); },
386 xtype : 'ColumnModel',
390 renderer : function(v,x,r)
392 var vv = (typeof(r.data.evtype_align) != 'undefined' && r.data.evtype_align) ? r.data.evtype_align : v;
393 return String.format('<span qtip="{0}">{1}</span>', v, vv );
400 xtype : 'ColumnModel',
404 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); },
406 dataIndex : 'act_when'
410 xtype : 'ColumnModel',
414 renderer : function(v,x,r) {
415 if (r.data.event_id *1 == 0) {
418 return String.format('{0}', v ? v.format('d/M/Y H:i:s') : '');
425 xtype : 'ColumnModel',
428 renderer : function(v,x,r) { return String.format('{0}:{1}', v,r.data.onid); },
430 dataIndex : 'ontable'
434 xtype : 'ColumnModel',
435 header : 'Who to notify',
437 renderer : function(v,x,r) {
438 return String.format('{0} <u><{1}></u>', v, r.data.person_id_email);
441 dataIndex : 'person_id_name'
445 xtype : 'ColumnModel',
446 header : 'Triggered by',
448 renderer : function(v,x,r) {
449 return String.format(
451 r.data.trigger_event_id_on_table,
452 r.data.trigger_event_id_on_id,
453 r.data.trigger_event_id_remarks
457 dataIndex : 'trigger_event_id'
461 xtype : 'ColumnModel',
464 renderer : function(v) { return String.format('{0}', v); },
470 xtype : 'ColumnModel',
473 renderer : function(v) { return String.format('<span qtip="{0}">{0}</span>', v); },
475 dataIndex : 'event_id_remarks'
482 //_this.dialog = Pman.Dialog.FILL_IN
483 if (_this.panel.active) {
484 this.footer.onClick('first');
497 title : "Current Notifications",
501 tableName : 'core_notify',
503 activate : function() {
506 _this.grid.footer.onClick('first');