1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Dialog.AdminWatch = {
10 show : function(data, cb)
18 this.dialog.show(this.data._el);
21 this.form.setValues(data);
22 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
30 this.dialog = Roo.factory({
31 xtype: 'LayoutDialog',
38 title : "Edit / Create core_watch",
42 xtype: 'ContentPanel',
50 actioncomplete : function(_self,action)
52 if (action.type == 'setdata') {
53 //_this.dialog.el.mask("Loading");
55 this.load({ method: 'GET', params: { '_id' : _this.data.id }});
59 if (action.type == 'load') {
62 if (action.type =='submit') {
67 _this.callback.call(_this, _this.form.getValues());
73 rendered : function (form)
79 style : 'margin:10px;',
80 url : baseURL + '/Roo/core_watch.php',
86 select : function (combo, record, index)
88 _this.grid.footer.onClick('first');
90 render : function (_self)
92 _this.affectSel = _self;
96 displayField : 'on_table',
98 emptyText : "Select Table",
100 forceSelection : true,
102 loadingText : "Searching...",
106 qtip : "Select Action",
107 queryParam : 'query[on_table]',
108 selectOnFocus : true,
109 tpl : '<div class="x-grid-cell-text x-btn button"><b>{on_table}</b> </div>',
110 triggerAction : 'all',
112 valueField : 'action',
118 beforeload : function (_self, o)
120 o.params = o.params || {};
121 // staff can see all logs, other companies can only see their own.
122 if ((typeof(Pman.Login) != 'undefined') && Pman.Login.authUser.company_id_comptype != 'OWNER') {
123 o.params.company_id = Pman.Login.authUser.company_id;
125 o.params._distinct = 'on_table';
126 o.params._columns ='on_table';
130 sortInfo : { field : 'on_table' , direction : 'ASC' },
135 url : baseURL + '/Roo/Events.php'
140 totalProperty : 'total',
149 'name': 'person_name',
153 'name': 'event_when',
155 'dateFormat': 'Y-m-d'
182 'name': 'person_id_id',
186 'name': 'person_id_office_id',
190 'name': 'person_id_name',
194 'name': 'person_id_phone',
198 'name': 'person_id_fax',
202 'name': 'person_id_email',
206 'name': 'person_id_company_id',
210 'name': 'person_id_role',
214 'name': 'person_id_active',
218 'name': 'person_id_remarks',
222 'name': 'person_id_passwd',
226 'name': 'person_id_owner_id',
230 'name': 'person_id_lang',
234 'name': 'person_id_no_reset_sent',
238 'name': 'person_id_action_type',
242 'name': 'person_id_project_id',
246 'name': 'person_id_deleted_by',
250 'name': 'person_id_deleted_dt',
258 xtype: 'NumberField',
267 allowBlank : 'false',
268 displayField : 'name',
270 emptyText : "Select Person",
271 fieldLabel : 'Notify Who',
272 forceSelection : true,
273 hiddenName : 'person_id',
275 loadingText : "Searching...",
277 name : 'person_id_name',
279 qtip : "Select Person",
280 queryParam : 'query[name]',
281 selectOnFocus : true,
282 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> ({company_id_name}) <{email}></div>',
283 triggerAction : 'all',
291 beforeload : function (_self, o){
292 o.params = o.params || {};
297 sortInfo : { direction : 'ASC', field: 'name' },
302 url : baseURL + '/Roo/core_person'
309 totalProperty : 'total',
310 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
318 select : function (combo, record, index)
320 _this.grid.footer.onClick('first');
322 render : function (_self)
324 _this.actionSel = _self;
328 displayField : 'action',
330 fieldLabel : 'Match Event',
331 forceSelection : false,
333 loadingText : "Searching...",
337 qtip : "Select Action",
338 queryParam : 'query[action]',
339 selectOnFocus : true,
340 tpl : '<div class="x-grid-cell-text x-btn button"><b>{action}</b> </div>',
341 triggerAction : 'all',
343 valueField : 'action',
349 beforeload : function (_self, o)
351 o.params = o.params || {};
352 // staff can see all logs, other companies can only see their own.
353 if (typeof(Pman.Login) !='undefined' && Pman.Login.authUser.company_id_comptype != 'OWNER') {
354 o.params.company_id = Pman.Login.authUser.company_id;
356 o.params._distinct = 'action';
357 o.params._columns ='action';
361 sortInfo : { field : 'action' , direction : 'ASC' },
366 url : baseURL + '/Roo/Events.php'
371 totalProperty : 'total',
380 'name': 'person_name',
384 'name': 'event_when',
386 'dateFormat': 'Y-m-d'
413 'name': 'person_id_id',
417 'name': 'person_id_office_id',
421 'name': 'person_id_name',
425 'name': 'person_id_phone',
429 'name': 'person_id_fax',
433 'name': 'person_id_email',
437 'name': 'person_id_company_id',
441 'name': 'person_id_role',
445 'name': 'person_id_active',
449 'name': 'person_id_remarks',
453 'name': 'person_id_passwd',
457 'name': 'person_id_owner_id',
461 'name': 'person_id_lang',
465 'name': 'person_id_no_reset_sent',
469 'name': 'person_id_action_type',
473 'name': 'person_id_project_id',
477 'name': 'person_id_deleted_by',
481 'name': 'person_id_deleted_dt',
492 displayField : 'val',
494 fieldLabel : 'Action',
495 forceSelection : false,
498 triggerAction : 'all',
502 xtype: 'SimpleStore',
504 data : [ [ 'email' ], [ 'APPROVAL' ], ['ENDOFDAYMAIL'] ],
511 fieldLabel : 'Active?',
525 xtype: 'LayoutRegion',
533 click : function (_self, e)
544 click : function (_self, e)
550 _this.form.doAction("submit");