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',
34 title : (function() {Roo.log('title') ;Roo.log(_this); return _this.title || "Watches"; })(),
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;
67 if (_this.requestArgs) {
68 Roo.apply(options.params, _this.requestArgs);
74 sortInfo : { field : 'ontable', direction: 'ASC' },
79 url : baseURL + '/Roo/core_watch.php'
84 totalProperty : 'total',
117 'name': 'person_id_id',
121 'name': 'person_id_office_id',
125 'name': 'person_id_name',
129 'name': 'person_id_phone',
133 'name': 'person_id_fax',
137 'name': 'person_id_email',
141 'name': 'person_id_company_id',
145 'name': 'person_id_role',
149 'name': 'person_id_active',
153 'name': 'person_id_remarks',
157 'name': 'person_id_passwd',
161 'name': 'person_id_owner_id',
165 'name': 'person_id_lang',
169 'name': 'person_id_no_reset_sent',
173 'name': 'person_id_action_type',
177 'name': 'person_id_project_id',
181 'name': 'person_id_deleted_by',
185 'name': 'person_id_deleted_dt',
192 xtype: 'PagingToolbar',
196 displayMsg : "Displaying core_watch{0} - {1} of {2}",
197 emptyMsg : "No core_watch found"
212 select : function (combo, record, index)
214 _this.grid.footer.onClick('first');
216 render : function (_self)
218 _this.affectSel = _self;
222 displayField : 'on_table',
224 emptyText : "Select Table",
225 forceSelection : true,
227 loadingText : "Searching...",
231 qtip : "Select Action",
232 queryParam : 'query[ontable]',
233 selectOnFocus : true,
234 tpl : '<div class="x-grid-cell-text x-btn button"><b>{on_table}</b> </div>',
235 triggerAction : 'all',
237 valueField : 'on_table',
243 beforeload : function (_self, o)
245 o.params = o.params || {};
246 // staff can see all logs, other companies can only see their own.
247 if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
248 o.params.company_id = Pman.Login.authUser.company_id;
250 o.params._distinct = 'on_table';
251 o.params._columns ='on_table';
255 sortInfo : { field : 'on_table' , direction : 'ASC' },
260 url : baseURL + '/Roo/Events.php'
267 totalProperty : 'total',
290 cls : 'x-btn-text-icon',
291 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
295 if (!_this.dialog) return;
296 _this.dialog.show( { id : 0 } , function() {
297 _this.grid.footer.onClick('first');
306 cls : 'x-btn-text-icon',
307 icon : rootURL + '/Pman/templates/images/trash.gif',
311 Pman.genericDelete(_this, 'core_watch');
319 xtype: 'ColumnModel',
322 header : 'Watch Event',
324 renderer : function(v,x,r) {
325 if (typeof(r.data.event_right_display_name) != 'undefined') {
326 return String.format('{0} {1}', r.data.event_left, r.data.event_right_display_name);
328 return String.format('{0}', v);
333 xtype: 'ColumnModel',
335 dataIndex : 'ontable',
336 header : 'Watch Table',
338 renderer : function(v) { return String.format('{0}', v); }
341 xtype: 'ColumnModel',
346 renderer : function(v) { return String.format('{0}', v); }
349 xtype: 'ColumnModel',
351 dataIndex : 'person_id_name',
352 header : 'Who get\'s notified',
354 renderer : function(v) { return String.format('{0}', v); }
357 xtype: 'ColumnModel',
359 dataIndex : 'medium',
360 header : 'What happens',
362 renderer : function(v) { return String.format('{0}', v); }
365 xtype: 'ColumnModel',
369 dataIndex : 'active',
370 renderer : function(v) { return String.format('{0}', v); }