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',
84 fieldLabel : 'Ontable',
92 select : function (combo, record, index)
94 _this.grid.footer.onClick('first');
96 render : function (_self)
98 _this.affectSel = _self;
102 displayField : 'on_table',
104 emptyText : "Select Affects",
105 fieldLabel : 'Table',
106 forceSelection : true,
108 loadingText : "Searching...",
112 qtip : "Select Action",
113 queryParam : 'query[on_table]',
114 selectOnFocus : true,
115 tpl : '<div class="x-grid-cell-text x-btn button"><b>{on_table}</b> </div>',
116 triggerAction : 'all',
118 valueField : 'action',
124 beforeload : function (_self, o)
126 o.params = o.params || {};
127 // staff can see all logs, other companies can only see their own.
128 if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
129 o.params.company_id = Pman.Login.authUser.company_id;
131 o.params._distinct = 'on_table';
132 o.params._columns ='on_table';
136 sortInfo : { field : 'on_table' , direction : 'ASC' },
141 url : baseURL + '/Roo/Events.php'
146 totalProperty : 'total',
155 'name': 'person_name',
159 'name': 'event_when',
161 'dateFormat': 'Y-m-d'
188 'name': 'person_id_id',
192 'name': 'person_id_office_id',
196 'name': 'person_id_name',
200 'name': 'person_id_phone',
204 'name': 'person_id_fax',
208 'name': 'person_id_email',
212 'name': 'person_id_company_id',
216 'name': 'person_id_role',
220 'name': 'person_id_active',
224 'name': 'person_id_remarks',
228 'name': 'person_id_passwd',
232 'name': 'person_id_owner_id',
236 'name': 'person_id_lang',
240 'name': 'person_id_no_reset_sent',
244 'name': 'person_id_action_type',
248 'name': 'person_id_project_id',
252 'name': 'person_id_deleted_by',
256 'name': 'person_id_deleted_dt',
273 allowBlank : 'false',
275 emptyText : "Select Person",
276 forceSelection : true,
278 loadingText : "Searching...",
281 qtip : "Select Person",
282 selectOnFocus : true,
283 triggerAction : 'all',
286 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
287 queryParam : 'query[name]',
288 fieldLabel : 'Person',
290 displayField : 'name',
291 hiddenName : 'person_id',
292 name : 'person_id_name',
297 sortInfo : { direction : 'ASC', field: 'id' },
299 beforeload : function (_self, o){
300 o.params = o.params || {};
308 url : baseURL + '/Roo/Person.php'
315 totalProperty : 'total',
316 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
323 fieldLabel : 'Event',
330 fieldLabel : 'Medium',
337 fieldLabel : 'Active',
352 xtype: 'LayoutRegion',
360 click : function (_self, e)
371 click : function (_self, e)
376 _this.dialog.el.mask("Saving");
377 _this.form.doAction("submit");