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',
41 _this.dialog = Pman.Dialog.AdminWatch;
42 if (_this.panel.active) {
43 this.footer.onClick('first');
46 rowdblclick : function (_self, rowIndex, e)
48 if (!_this.dialog) return;
49 _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
50 _this.grid.footer.onClick('first');
54 autoExpandColumn : 'person_id_name',
60 beforeload : function (_self, options)
62 var val = _this.affectSel.getValue();
64 options.params.ontable = val;
70 sortInfo : { field : 'ontable', direction: 'ASC' },
75 url : baseURL + '/Roo/core_watch.php'
80 totalProperty : 'total',
113 'name': 'person_id_id',
117 'name': 'person_id_office_id',
121 'name': 'person_id_name',
125 'name': 'person_id_phone',
129 'name': 'person_id_fax',
133 'name': 'person_id_email',
137 'name': 'person_id_company_id',
141 'name': 'person_id_role',
145 'name': 'person_id_active',
149 'name': 'person_id_remarks',
153 'name': 'person_id_passwd',
157 'name': 'person_id_owner_id',
161 'name': 'person_id_lang',
165 'name': 'person_id_no_reset_sent',
169 'name': 'person_id_action_type',
173 'name': 'person_id_project_id',
177 'name': 'person_id_deleted_by',
181 'name': 'person_id_deleted_dt',
188 xtype: 'PagingToolbar',
192 displayMsg : "Displaying core_watch{0} - {1} of {2}",
193 emptyMsg : "No core_watch found"
208 select : function (combo, record, index)
210 _this.grid.footer.onClick('first');
212 render : function (_self)
214 _this.affectSel = _self;
218 displayField : 'on_table',
220 emptyText : "Select Table",
221 forceSelection : true,
223 loadingText : "Searching...",
227 qtip : "Select Action",
228 queryParam : 'query[ontable]',
229 selectOnFocus : true,
230 tpl : '<div class="x-grid-cell-text x-btn button"><b>{on_table}</b> </div>',
231 triggerAction : 'all',
233 valueField : 'on_table',
239 beforeload : function (_self, o)
241 o.params = o.params || {};
242 // staff can see all logs, other companies can only see their own.
243 if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
244 o.params.company_id = Pman.Login.authUser.company_id;
246 o.params._distinct = 'on_table';
247 o.params._columns ='on_table';
251 sortInfo : { field : 'on_table' , direction : 'ASC' },
256 url : baseURL + '/Roo/Events.php'
263 totalProperty : 'total',
286 cls : 'x-btn-text-icon',
287 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
291 if (!_this.dialog) return;
292 _this.dialog.show( { id : 0 } , function() {
293 _this.grid.footer.onClick('first');
302 cls : 'x-btn-text-icon',
303 icon : rootURL + '/Pman/templates/images/trash.gif',
307 Pman.genericDelete(_this, 'core_watch');
315 xtype: 'ColumnModel',
318 header : 'Watch Event',
320 renderer : function(v) { return String.format('{0}', v); }
323 xtype: 'ColumnModel',
325 dataIndex : 'ontable',
326 header : 'Watch Table',
328 renderer : function(v) { return String.format('{0}', v); }
331 xtype: 'ColumnModel',
336 renderer : function(v) { return String.format('{0}', v); }
339 xtype: 'ColumnModel',
341 dataIndex : 'person_id_name',
342 header : 'Who get\'s notified',
344 renderer : function(v) { return String.format('{0}', v); }
347 xtype: 'ColumnModel',
349 dataIndex : 'medium',
350 header : 'What happens',
352 renderer : function(v) { return String.format('{0}', v); }
355 xtype: 'ColumnModel',
359 dataIndex : 'active',
360 renderer : function(v) { return String.format('{0}', v); }