1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Tab');
7 Pman.Tab.AdminWatches = new Roo.XComponent({
10 'ec211f7c20af43e742bf2570c3cb84f9' :"Add",
11 '1a86349be7851cf03d6fe959b94ed6fb' :"Watch ID",
12 '1243daf593fa297e07ab03bf06d925af' :"Searching...",
13 'c4523f19258f444b936df7f96f57c7b9' :"Watch Table",
14 '498f79c4c5bbde77f1bceb6c86fd0f6d' :"Show",
15 '56abc507eda6d3226af192bf9b0e5d1f' :"What happens",
16 '5e97bbccf01aa772225ef15435177395' :"(function() {Roo.log('title') ;Roo.log(_this); return _this.title || \"Watches\"; })()",
17 'a4e70e911022ccc98ab8055a09222cf2' :"No core_watch found",
18 'a8929eb5c1553d3f70497f862d25d0ce' :"Select Action",
19 'b548a2ee926c118cc3211c5d8bb92a40' :"Who get's notified",
20 '6ceb94ff48a58bd6d612b1f031d2c2ca' :"Displaying core_watch{0} - {1} of {2}",
21 'c122d95a9c28f9a54baef2c7784bb038' :"Watch Event",
22 'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
23 '4d3d769b812b6faa6b76e1a8abaece2d' :"Active",
24 '314b26dabb519a609db698728284683f' :"Select Table"
27 part : ["Admin", "Watches" ],
28 order : '860-Pman.Tab.AdminWatches',
30 parent : 'Pman.Tab.AdminWatchNotify',
31 name : "Pman.Tab.AdminWatches",
44 tableName : 'core_watch',
45 title : (function() {Roo.log('title') ;Roo.log(_this); return _this.title || "Watches"; })(),
50 activate : function() {
53 _this.grid.footer.onClick('first');
58 autoExpandColumn : 'person_id_name',
67 _this.dialog = Pman.Dialog.AdminWatch;
68 if (_this.panel.active) {
69 this.footer.onClick('first');
72 rowdblclick : function (_self, rowIndex, e)
77 _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
78 _this.grid.footer.onClick('first');
84 displayMsg : _this._strings['6ceb94ff48a58bd6d612b1f031d2c2ca'] /* Displaying core_watch{0} - {1} of {2} */,
85 emptyMsg : _this._strings['a4e70e911022ccc98ab8055a09222cf2'] /* No core_watch found */,
89 xtype : 'PagingToolbar'
97 text : _this._strings['498f79c4c5bbde77f1bceb6c86fd0f6d'] /* Show */,
99 '|xns' : 'Roo.Toolbar',
104 displayField : 'on_table',
106 emptyText : _this._strings['314b26dabb519a609db698728284683f'] /* Select Table */,
107 forceSelection : true,
109 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
113 qtip : _this._strings['a8929eb5c1553d3f70497f862d25d0ce'] /* Select Action */,
114 queryParam : 'query[ontable]',
115 selectOnFocus : true,
116 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{on_table}</b> </div>',
117 triggerAction : 'all',
119 valueField : 'on_table',
125 render : function (_self)
127 _this.affectSel = _self;
129 select : function (combo, record, index)
131 _this.grid.footer.onClick('first');
136 sortInfo : { field : 'on_table' , direction : 'ASC' },
141 beforeload : function (_self, o)
143 o.params = o.params || {};
144 // staff can see all logs, other companies can only see their own.
145 if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
146 o.params.company_id = Pman.Login.authUser.company_id;
148 o.params._distinct = 'on_table';
149 o.params._columns ='on_table';
154 url : baseURL + '/Roo/Events.php',
173 totalProperty : 'total',
182 '|xns' : 'Roo.Toolbar',
186 cls : 'x-btn-text-icon',
187 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
188 text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
190 '|xns' : 'Roo.Toolbar',
198 _this.dialog.show( { id : 0 } , function() {
199 _this.grid.footer.onClick('first');
205 cls : 'x-btn-text-icon',
206 icon : rootURL + '/Pman/templates/images/trash.gif',
207 text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
209 '|xns' : 'Roo.Toolbar',
214 Pman.genericDelete(_this, 'core_watch');
222 sortInfo : { field : 'ontable', direction: 'ASC' },
227 beforeload : function (_self, options)
229 var val = _this.affectSel.getValue();
231 options.params.ontable = val;
233 if (_this.requestArgs) {
234 Roo.apply(options.params, _this.requestArgs);
241 url : baseURL + '/Roo/core_watch.php',
277 'name': 'person_id_id',
281 'name': 'person_id_office_id',
285 'name': 'person_id_name',
289 'name': 'person_id_phone',
293 'name': 'person_id_fax',
297 'name': 'person_id_email',
301 'name': 'person_id_company_id',
305 'name': 'person_id_role',
309 'name': 'person_id_active',
313 'name': 'person_id_remarks',
317 'name': 'person_id_passwd',
321 'name': 'person_id_owner_id',
325 'name': 'person_id_lang',
329 'name': 'person_id_no_reset_sent',
333 'name': 'person_id_action_type',
337 'name': 'person_id_project_id',
341 'name': 'person_id_deleted_by',
345 'name': 'person_id_deleted_dt',
351 totalProperty : 'total',
360 header : _this._strings['c122d95a9c28f9a54baef2c7784bb038'] /* Watch Event */,
361 renderer : function(v,x,r) {
362 if (typeof(r.data.event_right_display_name) != 'undefined') {
363 return String.format('{0}: {1}', r.data.event_left, r.data.event_right_display_name);
365 return String.format('{0}', v);
371 xtype : 'ColumnModel'
374 dataIndex : 'ontable',
375 header : _this._strings['c4523f19258f444b936df7f96f57c7b9'] /* Watch Table */,
376 renderer : function(v) { return String.format('{0}', v); },
380 xtype : 'ColumnModel'
384 header : _this._strings['1a86349be7851cf03d6fe959b94ed6fb'] /* Watch ID */,
385 renderer : function(v) { return String.format('{0}', v); },
389 xtype : 'ColumnModel'
392 dataIndex : 'person_id_name',
393 header : _this._strings['b548a2ee926c118cc3211c5d8bb92a40'] /* Who get's notified */,
394 renderer : function(v) { return String.format('{0}', v); },
398 xtype : 'ColumnModel'
401 dataIndex : 'medium',
402 header : _this._strings['56abc507eda6d3226af192bf9b0e5d1f'] /* What happens */,
403 renderer : function(v) {
404 var ar = v.split(':');
406 var act = ar[1].replace(/^notify/,'');
408 return String.format('<span qtip="{0}">{1}<span>', v, act);
411 return String.format('{0}', v);
416 xtype : 'ColumnModel'
419 dataIndex : 'active',
420 header : _this._strings['4d3d769b812b6faa6b76e1a8abaece2d'] /* Active */,
421 renderer : function(v) { return String.format('{0}', v); },
425 xtype : 'ColumnModel'