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"}]
316 fieldLabel : 'Event',
324 select : function (combo, record, index)
326 _this.grid.footer.onClick('first');
328 render : function (_self)
330 _this.actionSel = _self;
334 displayField : 'action',
336 emptyText : "Select Action",
337 forceSelection : true,
339 loadingText : "Searching...",
343 qtip : "Select Action",
344 queryParam : 'query[action]',
345 selectOnFocus : true,
346 tpl : '<div class="x-grid-cell-text x-btn button"><b>{action}</b> </div>',
347 triggerAction : 'all',
349 valueField : 'action',
355 beforeload : function (_self, o)
357 o.params = o.params || {};
358 // staff can see all logs, other companies can only see their own.
359 if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
360 o.params.company_id = Pman.Login.authUser.company_id;
362 o.params._distinct = 'action';
363 o.params._columns ='action';
367 sortInfo : { field : 'action' , direction : 'ASC' },
372 url : baseURL + '/Roo/Events.php'
377 totalProperty : 'total',
386 'name': 'person_name',
390 'name': 'event_when',
392 'dateFormat': 'Y-m-d'
419 'name': 'person_id_id',
423 'name': 'person_id_office_id',
427 'name': 'person_id_name',
431 'name': 'person_id_phone',
435 'name': 'person_id_fax',
439 'name': 'person_id_email',
443 'name': 'person_id_company_id',
447 'name': 'person_id_role',
451 'name': 'person_id_active',
455 'name': 'person_id_remarks',
459 'name': 'person_id_passwd',
463 'name': 'person_id_owner_id',
467 'name': 'person_id_lang',
471 'name': 'person_id_no_reset_sent',
475 'name': 'person_id_action_type',
479 'name': 'person_id_project_id',
483 'name': 'person_id_deleted_by',
487 'name': 'person_id_deleted_dt',
497 fieldLabel : 'Action',
504 fieldLabel : 'Active',
519 xtype: 'LayoutRegion',
527 click : function (_self, e)
538 click : function (_self, e)
543 _this.dialog.el.mask("Saving");
544 _this.form.doAction("submit");