1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Tab.AdminWatches = new Roo.XComponent({
6 part : ["Admin","Watches"],
7 order : '860-Pman.Tab.AdminWatches',
9 parent : 'Pman.Tab.AdminWatchNotify',
10 name : "Pman.Tab.AdminWatches",
21 activate : function() {
24 _this.grid.footer.onClick('first');
33 tableName : 'core_watch',
42 _this.dialog = Pman.Dialog.AdminWatch;
43 if (_this.panel.active) {
44 this.footer.onClick('first');
47 rowdblclick : function (_self, rowIndex, e)
49 if (!_this.dialog) return;
50 _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
51 _this.grid.footer.onClick('first');
55 autoExpandColumn : 'person_id_name',
61 beforeload : function (_self, options)
63 var val = _this.affectSel.getValue();
65 options.params.ontable = val;
71 sortInfo : { field : 'ontable', direction: 'ASC' },
76 url : baseURL + '/Roo/core_watch.php'
81 totalProperty : 'total',
114 'name': 'person_id_id',
118 'name': 'person_id_office_id',
122 'name': 'person_id_name',
126 'name': 'person_id_phone',
130 'name': 'person_id_fax',
134 'name': 'person_id_email',
138 'name': 'person_id_company_id',
142 'name': 'person_id_role',
146 'name': 'person_id_active',
150 'name': 'person_id_remarks',
154 'name': 'person_id_passwd',
158 'name': 'person_id_owner_id',
162 'name': 'person_id_lang',
166 'name': 'person_id_no_reset_sent',
170 'name': 'person_id_action_type',
174 'name': 'person_id_project_id',
178 'name': 'person_id_deleted_by',
182 'name': 'person_id_deleted_dt',
189 xtype: 'PagingToolbar',
193 displayMsg : "Displaying core_watch{0} - {1} of {2}",
194 emptyMsg : "No core_watch found"
209 select : function (combo, record, index)
211 _this.grid.footer.onClick('first');
213 render : function (_self)
215 _this.affectSel = _self;
219 displayField : 'on_table',
221 emptyText : "Select Table",
222 forceSelection : true,
224 loadingText : "Searching...",
228 qtip : "Select Action",
229 queryParam : 'query[ontable]',
230 selectOnFocus : true,
231 tpl : '<div class="x-grid-cell-text x-btn button"><b>{on_table}</b> </div>',
232 triggerAction : 'all',
234 valueField : 'on_table',
240 beforeload : function (_self, o)
242 o.params = o.params || {};
243 // staff can see all logs, other companies can only see their own.
244 if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
245 o.params.company_id = Pman.Login.authUser.company_id;
247 o.params._distinct = 'on_table';
248 o.params._columns ='on_table';
252 sortInfo : { field : 'on_table' , direction : 'ASC' },
257 url : baseURL + '/Roo/Events.php'
264 totalProperty : 'total',
287 cls : 'x-btn-text-icon',
288 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
292 if (!_this.dialog) return;
293 _this.dialog.show( { id : 0 } , function() {
294 _this.grid.footer.onClick('first');
303 cls : 'x-btn-text-icon',
304 icon : rootURL + '/Pman/templates/images/trash.gif',
308 Pman.genericDelete(_this, 'core_watch');
316 xtype: 'ColumnModel',
319 header : 'Watch Event',
321 renderer : function(v) { return String.format('{0}', v); }
324 xtype: 'ColumnModel',
326 dataIndex : 'ontable',
327 header : 'Watch Table',
329 renderer : function(v) { return String.format('{0}', v); }
332 xtype: 'ColumnModel',
337 renderer : function(v) { return String.format('{0}', v); }
340 xtype: 'ColumnModel',
342 dataIndex : 'person_id_name',
343 header : 'Who get\'s notified',
345 renderer : function(v) { return String.format('{0}', v); }
348 xtype: 'ColumnModel',
350 dataIndex : 'medium',
351 header : 'What happens',
353 renderer : function(v) { return String.format('{0}', v); }
356 xtype: 'ColumnModel',
360 dataIndex : 'active',
361 renderer : function(v) { return String.format('{0}', v); }