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 forceSelection : true,
107 loadingText : "Searching...",
111 qtip : "Select Action",
112 queryParam : 'query[on_table]',
113 selectOnFocus : true,
114 tpl : '<div class="x-grid-cell-text x-btn button"><b>{on_table}</b> </div>',
115 triggerAction : 'all',
117 valueField : 'action',
123 beforeload : function (_self, o)
125 o.params = o.params || {};
126 // staff can see all logs, other companies can only see their own.
127 if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
128 o.params.company_id = Pman.Login.authUser.company_id;
130 o.params._distinct = 'on_table';
131 o.params._columns ='on_table';
135 sortInfo : { field : 'on_table' , direction : 'ASC' },
140 url : baseURL + '/Roo/Events.php'
145 totalProperty : 'total',
154 'name': 'person_name',
158 'name': 'event_when',
160 'dateFormat': 'Y-m-d'
187 'name': 'person_id_id',
191 'name': 'person_id_office_id',
195 'name': 'person_id_name',
199 'name': 'person_id_phone',
203 'name': 'person_id_fax',
207 'name': 'person_id_email',
211 'name': 'person_id_company_id',
215 'name': 'person_id_role',
219 'name': 'person_id_active',
223 'name': 'person_id_remarks',
227 'name': 'person_id_passwd',
231 'name': 'person_id_owner_id',
235 'name': 'person_id_lang',
239 'name': 'person_id_no_reset_sent',
243 'name': 'person_id_action_type',
247 'name': 'person_id_project_id',
251 'name': 'person_id_deleted_by',
255 'name': 'person_id_deleted_dt',
272 allowBlank : 'false',
274 emptyText : "Select Person",
275 forceSelection : true,
277 loadingText : "Searching...",
280 qtip : "Select Person",
281 selectOnFocus : true,
282 triggerAction : 'all',
285 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
286 queryParam : 'query[name]',
287 fieldLabel : 'Person',
289 displayField : 'name',
290 hiddenName : 'person_id',
291 name : 'person_id_name',
296 sortInfo : { direction : 'ASC', field: 'id' },
298 beforeload : function (_self, o){
299 o.params = o.params || {};
307 url : baseURL + '/Roo/Person.php'
314 totalProperty : 'total',
315 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
322 fieldLabel : 'Event',
329 fieldLabel : 'Medium',
336 fieldLabel : 'Active',
351 xtype: 'LayoutRegion',
359 click : function (_self, e)
370 click : function (_self, e)
375 _this.dialog.el.mask("Saving");
376 _this.form.doAction("submit");