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.fromDateSel = _self;
\r
320 //_self.setValue( new Date() );
\r
322 select : function (combo, date)
324 _this.grid.footer.onClick('first');
329 '|xns' : 'Roo.Toolbar',
334 '|xns' : 'Roo.Toolbar',
346 render : function (_self)
\r
348 _this.toDateSel = _self;
\r
349 //_self.setValue( new Date() );
\r
351 select : function (combo, date)
353 _this.grid.footer.onClick('first');
358 '|xns' : 'Roo.Toolbar',
363 '|xns' : 'Roo.Toolbar',
366 cls : 'x-btn-text-icon',
367 icon : rootURL + '/Pman/templates/images/trash.gif',
372 Pman.genericDelete(_this, 'core_notify');
377 '|xns' : 'Roo.Toolbar',
378 text : "Show Completed",
383 toggle : function (_self, pressed)
385 this.setText(pressed ? "Hide Completed" : "Show Completed");
386 _this.grid.footer.onClick('first');
388 render : function (_self)
390 _this.toggleBtn = _self;
398 autoExpandColumn : 'person_id_name',
405 xtype : 'ColumnModel',
409 renderer : function(v) { return String.format('{0}', v ); },
415 xtype : 'ColumnModel',
419 renderer : function(v,x,r)
421 var vv = (typeof(r.data.evtype_align) != 'undefined' && r.data.evtype_align) ? r.data.evtype_align : v;
422 return String.format('<span qtip="{0}">{1}</span>', v, vv );
429 xtype : 'ColumnModel',
433 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); },
435 dataIndex : 'act_when'
439 xtype : 'ColumnModel',
443 renderer : function(v,x,r) {
444 if (r.data.event_id *1 == 0) {
447 return String.format('{0}', v ? v.format('d/M/Y H:i:s') : '');
454 xtype : 'ColumnModel',
457 renderer : function(v,x,r) { return String.format('{0}:{1}', v,r.data.onid); },
459 dataIndex : 'ontable'
463 xtype : 'ColumnModel',
464 header : 'Who to notify',
466 renderer : function(v,x,r) {
467 return String.format('{0} <u><{1}></u>', v, r.data.person_id_email);
470 dataIndex : 'person_id_name'
474 xtype : 'ColumnModel',
475 header : 'Triggered by',
477 renderer : function(v,x,r) {
478 return String.format(
480 r.data.trigger_event_id_on_table,
481 r.data.trigger_event_id_on_id,
482 r.data.trigger_event_id_remarks
486 dataIndex : 'trigger_event_id'
490 xtype : 'ColumnModel',
493 renderer : function(v) { return String.format('{0}', v); },
499 xtype : 'ColumnModel',
502 renderer : function(v) { return String.format('<span qtip="{0}">{0}</span>', v); },
504 dataIndex : 'event_id_remarks'
511 //_this.dialog = Pman.Dialog.FILL_IN
512 if (_this.panel.active) {
513 this.footer.onClick('first');
526 title : "Current Notifications",
530 tableName : 'core_notify',
532 activate : function() {
535 _this.grid.footer.onClick('first');