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',
312 render : function (_self)
\r
314 _this.dateSel = _self;
\r
315 _self.setValue( new Date() );
\r
317 select : function (combo, date)
319 _this.wgrid.ds.load({});
324 '|xns' : 'Roo.Toolbar',
329 '|xns' : 'Roo.Toolbar',
332 cls : 'x-btn-text-icon',
333 icon : rootURL + '/Pman/templates/images/trash.gif',
338 Pman.genericDelete(_this, 'core_notify');
343 '|xns' : 'Roo.Toolbar',
344 text : "Show Completed",
349 toggle : function (_self, pressed)
351 this.setText(pressed ? "Hide Completed" : "Show Completed");
352 _this.grid.footer.onClick('first');
354 render : function (_self)
356 _this.toggleBtn = _self;
364 autoExpandColumn : 'person_id_name',
371 xtype : 'ColumnModel',
375 renderer : function(v) { return String.format('{0}', v ); },
381 xtype : 'ColumnModel',
385 renderer : function(v,x,r)
387 var vv = (typeof(r.data.evtype_align) != 'undefined' && r.data.evtype_align) ? r.data.evtype_align : v;
388 return String.format('<span qtip="{0}">{1}</span>', v, vv );
395 xtype : 'ColumnModel',
399 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); },
401 dataIndex : 'act_when'
405 xtype : 'ColumnModel',
409 renderer : function(v,x,r) {
410 if (r.data.event_id *1 == 0) {
413 return String.format('{0}', v ? v.format('d/M/Y H:i:s') : '');
420 xtype : 'ColumnModel',
423 renderer : function(v,x,r) { return String.format('{0}:{1}', v,r.data.onid); },
425 dataIndex : 'ontable'
429 xtype : 'ColumnModel',
430 header : 'Who to notify',
432 renderer : function(v,x,r) {
433 return String.format('{0} <u><{1}></u>', v, r.data.person_id_email);
436 dataIndex : 'person_id_name'
440 xtype : 'ColumnModel',
441 header : 'Triggered by',
443 renderer : function(v,x,r) {
444 return String.format(
446 r.data.trigger_event_id_on_table,
447 r.data.trigger_event_id_on_id,
448 r.data.trigger_event_id_remarks
452 dataIndex : 'trigger_event_id'
456 xtype : 'ColumnModel',
459 renderer : function(v) { return String.format('{0}', v); },
465 xtype : 'ColumnModel',
468 renderer : function(v) { return String.format('<span qtip="{0}">{0}</span>', v); },
470 dataIndex : 'event_id_remarks'
477 //_this.dialog = Pman.Dialog.FILL_IN
478 if (_this.panel.active) {
479 this.footer.onClick('first');
492 title : "Current Notifications",
496 tableName : 'core_notify',
498 activate : function() {
501 _this.grid.footer.onClick('first');