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 if (!_this.toggleBtn.pressed) {
190 options.params['event_id'] = 0;
192 if (!_this.personCombo) {
195 var p = _this.personCombo.getValue();
197 options.params.person_id = p;
210 xtype : 'PagingToolbar',
211 emptyMsg : "No core_notify found",
214 displayMsg : "Displaying core_notify{0} - {1} of {2}"
225 url : baseURL + '/Roo/core_notify.php',
234 xtype : 'JsonReader',
236 fields : [{"name":"id","type":"int"},{"name":"ontable","type":"string"}],
237 totalProperty : 'total'
242 sortInfo : { direction : 'ASC', field: 'person_id_name' },
245 beforeload : function (_self, o){
246 o.params = o.params || {};
247 o.params._distinct='person_id';
248 o.params._columns='person_id,person_id_name,person_id_email';
249 o.params['!person_id_name'] = '';
261 triggerAction : 'all',
262 forceSelection : true,
263 selectOnFocus : true,
265 displayField : 'person_id_name',
266 emptyText : "Select person",
269 valueField : 'person_id',
276 qtip : "Select core_notify",
277 queryParam : 'query[person_id_name]',
278 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{person_id_name}</b> {person_id_email}</div>',
279 loadingText : "Searching...",
281 render : function (_self)
283 _this.personCombo = _self;
285 select : function (combo, record, index)
287 _this.grid.footer.onClick('first');
296 '|xns' : 'Roo.Toolbar',
301 '|xns' : 'Roo.Toolbar',
304 cls : 'x-btn-text-icon',
305 icon : rootURL + '/Pman/templates/images/trash.gif',
310 Pman.genericDelete(_this, 'core_notify');
315 '|xns' : 'Roo.Toolbar',
316 text : "Show Completed",
321 toggle : function (_self, pressed)
323 this.setText(pressed ? "Hide Completed" : "Show Completed");
324 _this.grid.footer.onClick('first');
326 render : function (_self)
328 _this.toggleBtn = _self;
336 autoExpandColumn : 'person_id_name',
343 xtype : 'ColumnModel',
347 renderer : function(v) { return String.format('{0}', v ); },
353 xtype : 'ColumnModel',
357 renderer : function(v,x,r)
359 var vv = (typeof(r.data.evtype_align) != 'undefined' && r.data.evtype_align) ? r.data.evtype_align : v;
360 return String.format('<span qtip="{0}">{1}</span>', v, vv );
367 xtype : 'ColumnModel',
371 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); },
373 dataIndex : 'act_when'
377 xtype : 'ColumnModel',
381 renderer : function(v,x,r) {
382 if (r.data.event_id *1 == 0) {
385 return String.format('{0}', v ? v.format('d/M/Y H:i:s') : '');
392 xtype : 'ColumnModel',
395 renderer : function(v,x,r) { return String.format('{0}:{1}', v,r.data.onid); },
397 dataIndex : 'ontable'
401 xtype : 'ColumnModel',
402 header : 'Who to notify',
404 renderer : function(v,x,r) {
405 return String.format('{0} <u><{1}></u>', v, r.data.person_id_email);
408 dataIndex : 'person_id_name'
412 xtype : 'ColumnModel',
413 header : 'Triggered by',
415 renderer : function(v,x,r) {
416 return String.format(
418 r.data.trigger_event_id_on_table,
419 r.data.trigger_event_id_on_id,
420 r.data.trigger_event_id_remarks
424 dataIndex : 'trigger_event_id'
428 xtype : 'ColumnModel',
431 renderer : function(v) { return String.format('{0}', v); },
437 xtype : 'ColumnModel',
440 renderer : function(v) { return String.format('<span qtip="{0}">{0}</span>', v); },
442 dataIndex : 'event_id_remarks'
449 //_this.dialog = Pman.Dialog.FILL_IN
450 if (_this.panel.active) {
451 this.footer.onClick('first');
464 title : "Current Notifications",
468 tableName : 'core_notify',
470 activate : function() {
473 _this.grid.footer.onClick('first');