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',
268 emptyText : "Select Person",
269 forceSelection : true,
271 loadingText : "Searching...",
274 qtip : "Select Person",
275 selectOnFocus : true,
276 triggerAction : 'all',
279 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
280 queryParam : 'query[name]',
281 fieldLabel : 'Person',
283 displayField : 'name',
284 hiddenName : 'person_id',
285 name : 'person_id_name',
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',
323 fieldLabel : 'Action',
330 fieldLabel : 'Active',
345 xtype: 'LayoutRegion',
353 click : function (_self, e)
364 click : function (_self, e)
369 _this.dialog.el.mask("Saving");
370 _this.form.doAction("submit");