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',
37 title : "Edit / Create core_watch",
41 xtype: 'ContentPanel',
49 actioncomplete : function(_self,action)
51 if (action.type == 'setdata') {
52 //_this.dialog.el.mask("Loading");
53 //this.load({ method: 'GET', params: { '_id' : _this.data.id }});
56 if (action.type == 'load') {
57 _this.dialog.el.unmask();
60 if (action.type =='submit') {
62 _this.dialog.el.unmask();
66 _this.callback.call(_this, _this.form.getValues());
72 rendered : function (form)
78 style : 'margin:10px;',
79 url : baseURL + '/Roo/core_watch.php',
85 select : function (combo, record, index)
87 _this.grid.footer.onClick('first');
89 render : function (_self)
91 _this.affectSel = _self;
95 displayField : 'on_table',
97 emptyText : "Select Table",
99 forceSelection : true,
101 loadingText : "Searching...",
105 qtip : "Select Action",
106 queryParam : 'query[on_table]',
107 selectOnFocus : true,
108 tpl : '<div class="x-grid-cell-text x-btn button"><b>{on_table}</b> </div>',
109 triggerAction : 'all',
111 valueField : 'action',
117 beforeload : function (_self, o)
119 o.params = o.params || {};
120 // staff can see all logs, other companies can only see their own.
121 if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
122 o.params.company_id = Pman.Login.authUser.company_id;
124 o.params._distinct = 'on_table';
125 o.params._columns ='on_table';
129 sortInfo : { field : 'on_table' , direction : 'ASC' },
134 url : baseURL + '/Roo/Events.php'
139 totalProperty : 'total',
148 'name': 'person_name',
152 'name': 'event_when',
154 'dateFormat': 'Y-m-d'
181 'name': 'person_id_id',
185 'name': 'person_id_office_id',
189 'name': 'person_id_name',
193 'name': 'person_id_phone',
197 'name': 'person_id_fax',
201 'name': 'person_id_email',
205 'name': 'person_id_company_id',
209 'name': 'person_id_role',
213 'name': 'person_id_active',
217 'name': 'person_id_remarks',
221 'name': 'person_id_passwd',
225 'name': 'person_id_owner_id',
229 'name': 'person_id_lang',
233 'name': 'person_id_no_reset_sent',
237 'name': 'person_id_action_type',
241 'name': 'person_id_project_id',
245 'name': 'person_id_deleted_by',
249 'name': 'person_id_deleted_dt',
257 xtype: 'NumberField',
266 allowBlank : 'false',
267 displayField : 'name',
269 emptyText : "Select Person",
270 fieldLabel : 'Notify Who',
271 forceSelection : true,
272 hiddenName : 'person_id',
274 loadingText : "Searching...",
276 name : 'person_id_name',
278 qtip : "Select Person",
279 queryParam : 'query[name]',
280 selectOnFocus : true,
281 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
282 triggerAction : 'all',
290 sortInfo : { direction : 'ASC', field: 'id' },
292 beforeload : function (_self, o){
293 o.params = o.params || {};
301 url : baseURL + '/Roo/Person.php'
308 totalProperty : 'total',
309 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
317 select : function (combo, record, index)
319 _this.grid.footer.onClick('first');
321 render : function (_self)
323 _this.actionSel = _self;
327 displayField : 'action',
329 emptyText : "Select 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 (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',
497 triggerAction : 'all',
501 xtype: 'SimpleStore',
503 data : [ [ 'email' ], [ 'APPROVAL' ] ],
510 fieldLabel : 'Active?',
524 xtype: 'LayoutRegion',
532 click : function (_self, e)
543 click : function (_self, e)
548 _this.dialog.el.mask("Saving");
549 _this.form.doAction("submit");