Pman.Tab.AdminEnum.bjs
[Pman.Admin] / Pman.Tab.AdminEnum.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Roo.namespace('Pman.Tab');
6
7 Pman.Tab.AdminEnum = new Roo.XComponent({
8
9  _strings : {
10   '2df80d5febcde0c10a66818488622b7c' :"Pulldown Options",
11   'd1228f5476d15142b1358ae4b5fa2454' :"Order #",
12   'fdff10eac021dfbb69e9c38204237fdc' :"Add new pulldown list",
13   '1206eb8aea05be4625371c9c12818785' :"Pulldown",
14   '801ab24683a4a8c433c6eb40c48bcd9d' :"Download",
15   '7af54708cf5a4286cf0cfa58ff5148a8' :"Internal #",
16   'be53a0541a6d36f6ecb879fa2c584b08' :"Image",
17   '1a87a3d29199e3435b8fb314624c008f' :"Merge Option",
18   'b48968e1c912da07df5e8d6d246291ec' :"Display Name",
19   '510bc6e58593b2b8002c9fe0c21f3fde' :"Displaying core_enum{0} - {1} of {2}",
20   '1ba4d808fc7b27a7f60ce2ff75a8af3a' :"No core_enum found",
21   'c550aeed26e71a81a88360c1889245ab' :"Upload Values",
22   'd9ec74f5aa29ceef6bf7b45f7fec5d0f' :"Add Value",
23   'b9c49611cfda3259a2b837b39489e650' :"Add Image",
24   '4d3d769b812b6faa6b76e1a8abaece2d' :"Active",
25   'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
26   '49ee3087348e8d44e1feda1917443987' :"Name",
27   '7215ee9c7d9dc229d2921a40e899ec5f' :" "
28  },
29
30   part     :  ["Admin", "Enum" ],
31   order    : '500-Pman.Tab.AdminEnum',
32   region   : 'center',
33   parent   : 'Pman.Tab.Admin',
34   name     : "Pman.Tab.AdminEnum",
35   disabled : false, 
36   permname : '', 
37   _tree : function()
38   {
39    var _this = this;
40    var MODULE = this;
41    return {
42    layout : {
43     west : {
44      '|xns' : 'Roo',
45      split : true,
46      width : 200,
47      xns : Roo,
48      xtype : 'LayoutRegion'
49     },
50     center : {
51      '|xns' : 'Roo',
52      xns : Roo,
53      xtype : 'LayoutRegion'
54     },
55     '|xns' : 'Roo',
56     xns : Roo,
57     xtype : 'BorderLayout',
58     items : [
59      {
60       grid : {
61        dataSource : {
62         proxy : {
63          '|xns' : 'Roo.data',
64          method : 'GET',
65          url : baseURL + '/Roo/core_enum.php',
66          xns : Roo.data,
67          xtype : 'HttpProxy'
68         },
69         reader : {
70          '|xns' : 'Roo.data',
71          fields : [
72              {
73                  'name': 'id',
74                  'type': 'int'
75              },
76              {
77                  'name': 'etype',
78                  'type': 'string'
79              },
80              {
81                  'name': 'name',
82                  'type': 'string'
83              },
84              {
85                  'name': 'active',
86                  'type': 'int'
87              },
88              {
89                  'name': 'seqid',
90                  'type': 'int'
91              }
92          ],
93          id : 'id',
94          root : 'data',
95          totalProperty : 'total',
96          xns : Roo.data,
97          xtype : 'JsonReader'
98         },
99         '|xns' : 'Roo.data',
100         remoteSort : true,
101         sortInfo : { field : 'etype', direction: 'ASC' },
102         xns : Roo.data,
103         xtype : 'Store',
104         listeners : {
105          beforeload : function (_self, o)
106           {
107               o.params['query[empty_etype]'] = 1; 
108             
109           },
110          update : function (_self, record, operation)
111           {
112               if (operation != Roo.data.Record.COMMIT) {
113                   return;
114               }
115               // got commit..
116               new Pman.Request({
117                   url : baseURL + '/Roo/Core_enum.php',
118                   method : 'POST',
119                   params : {
120                       id : record.data.id,
121                       etype : _this.grid.ds.getById(record.id).data.etype,
122                       name : record.data.name,
123                       active : record.data.active,
124                       seqid : record.data.seqid,
125                       display_name : record.data.display_name
126                   }, 
127                   success : function(res) {
128                       //Roo.log(data);
129                       // update the ID if it's not set..
130                       if (record.data.id * 1 < 1) {
131                           record.set('id', res.data.id);
132                       }
133                   }
134               });
135               
136           }
137         },
138         items : [
139
140         ]
141
142        },
143        sm : {
144         '|xns' : 'Roo.grid',
145         xns : Roo.grid,
146         xtype : 'CellSelectionModel',
147         listeners : {
148          selectionchange : function (_self, selection)
149           {
150               _this.grid.footer.onClick('first');
151           }
152         }
153        },
154        footer : {
155         '|xns' : 'Roo',
156         displayInfo : false,
157         displayMsg : _this._strings['7215ee9c7d9dc229d2921a40e899ec5f'],
158         emptyMsg : _this._strings['1ba4d808fc7b27a7f60ce2ff75a8af3a'],
159         pageSize : 100,
160         xns : Roo,
161         xtype : 'PagingToolbar'
162        },
163        toolbar : {
164         '|xns' : 'Roo',
165         xns : Roo,
166         xtype : 'Toolbar',
167         items : [
168          {
169           '|xns' : 'Roo.Toolbar',
170           cls : 'x-btn-text-icon',
171           icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
172           text : _this._strings['fdff10eac021dfbb69e9c38204237fdc'],
173           xns : Roo.Toolbar,
174           xtype : 'Button',
175           listeners : {
176            click : function()
177             {
178                 
179                 var data = {
180                     active:1,
181                     display_name:'',
182                     etype:'',
183                     name:''
184                 };
185                 Pman.Dialog.AdminEnumType.show(data,function(){
186                     
187                     _this.egrid.footer.onClick('first');
188                 });
189                      
190                      
191             
192             }
193           }
194          }
195         ]
196
197        },
198        '|xns' : 'Roo.grid',
199        autoExpandColumn : 'display_name',
200        clicksToEdit : 1,
201        loadMask : true,
202        xns : Roo.grid,
203        xtype : 'EditorGrid',
204        colModel : [
205          {
206           '|xns' : 'Roo.grid',
207           dataIndex : 'display_name',
208           header : _this._strings['1206eb8aea05be4625371c9c12818785'],
209           renderer : function(v,x,r) { 
210           
211           
212               return String.format('<span qtip="{1}">{0}</span>', (''+v).length ? v : r.data.name, r.data.name); 
213           },
214           width : 200,
215           xns : Roo.grid,
216           xtype : 'ColumnModel'
217          },
218 {
219           '|xns' : 'Roo.grid',
220           dataIndex : 'active',
221           header : _this._strings['4d3d769b812b6faa6b76e1a8abaece2d'],
222           renderer : function(v) {  
223               var state = v> 0 ?  '-checked' : '';
224           
225               return '<img class="x-grid-check-icon' + state + '" src="' + Roo.BLANK_IMAGE_URL + '"/>';
226                           
227            },
228           width : 50,
229           xns : Roo.grid,
230           xtype : 'ColumnModel'
231          }
232        ],
233        listeners : {
234         afteredit : function (e)
235          {
236             e.record.commit();     
237          },
238         beforeedit : function (e)
239          {
240              if(e.field == 'name' && e.record.data.is_system_enum*1 == 1){
241                  return false;
242              }
243          },
244         cellclick : function (_self, rowIndex, columnIndex, e)
245          {
246          
247                  var di = this.colModel.getDataIndex(columnIndex);
248                  if (di != 'active') {
249                      return;
250                  }
251                   
252                  var rec = _this.grid.ds.getAt(rowIndex);
253                  
254                  rec.set('active', rec.data.active ? 0 : 1);
255                  rec.commit();
256                   
257                  
258          },
259         celldblclick : function (_self, rowIndex, columnIndex, e)
260          {
261              var rec = _this.egrid.ds.getAt(rowIndex);
262              Pman.Dialog.AdminEnumType.show(rec.data,function(){
263                  
264                  _this.egrid.footer.onClick('first');
265              });
266          },
267         render : function() 
268          {
269              _this.egrid = this; 
270              //_this.dialog = Pman.Dialog.FILL_IN
271              if (_this.epanel.active) {
272                 this.footer.onClick('first');
273              }
274          }
275        },
276        items : [
277
278        ]
279
280       },
281       '|xns' : 'Roo',
282       background : false,
283       region : 'west',
284       tableName : 'core_enum',
285       title : _this._strings['2df80d5febcde0c10a66818488622b7c'],
286       xns : Roo,
287       xtype : 'GridPanel',
288       listeners : {
289        activate : function() {
290             _this.epanel = this;
291             //if (_this.egrid) {
292             //    _this.egrid.footer.onClick('first');
293             //}
294         }
295       },
296       items : [
297
298       ]
299
300      },
301      {
302       grid : {
303        dataSource : {
304         proxy : {
305          '|xns' : 'Roo.data',
306          method : 'GET',
307          url : baseURL + '/Roo/core_enum.php',
308          xns : Roo.data,
309          xtype : 'HttpProxy'
310         },
311         reader : {
312          '|xns' : 'Roo.data',
313          fields : [
314              {
315                  'name': 'id',
316                  'type': 'int'
317              },
318              {
319                  'name': 'etype',
320                  'type': 'string'
321              },
322              {
323                  'name': 'name',
324                  'type': 'string'
325              },
326              {
327                  'name': 'active',
328                  'type': 'int'
329              },
330              {
331                  'name': 'seqid',
332                  'type': 'int'
333              }
334          ],
335          id : 'id',
336          root : 'data',
337          totalProperty : 'total',
338          xns : Roo.data,
339          xtype : 'JsonReader'
340         },
341         '|xns' : 'Roo.data',
342         remoteSort : true,
343         sortInfo : { field : 'etype', direction: 'ASC' },
344         xns : Roo.data,
345         xtype : 'Store',
346         listeners : {
347          beforeload : function (_self, options)
348           {
349           
350               var s =     _this.egrid.getSelectionModel().getSelectedCell();
351               
352           
353               if (!s) {
354                   return false;
355               }
356               var d = _this.egrid.dataSource.getAt(s[0]);
357               
358               options.params.etype = d.data.name;
359               options.params['query[search]'] = _this.searchBox.getValue();
360               if (!options.params.etype.length) {
361                   return false;
362               }
363           },
364          update : function (_self, record, operation)
365           {
366               if (operation != Roo.data.Record.COMMIT) {
367                   return;
368               }
369               // got commit..
370               new Pman.Request({
371                   url : baseURL + '/Roo/Core_enum.php',
372                   method : 'POST',
373                   params : {
374                       id : record.data.id,
375                       etype : _this.grid.ds.getById(record.id).data.etype,
376                       name : record.data.name,
377                       active : record.data.active,
378                       seqid : record.data.seqid,
379                       display_name : record.data.display_name
380                   }, 
381                   success : function(res) {
382                       //Roo.log(data);
383                       // update the ID if it's not set..
384                       if (record.data.id * 1 < 1) {
385                           record.set('id', res.data.id);
386                       }
387                   }
388               });
389               
390           }
391         },
392         items : [
393
394         ]
395
396        },
397        footer : {
398         '|xns' : 'Roo',
399         displayInfo : true,
400         displayMsg : _this._strings['510bc6e58593b2b8002c9fe0c21f3fde'],
401         emptyMsg : _this._strings['1ba4d808fc7b27a7f60ce2ff75a8af3a'],
402         pageSize : 25,
403         xns : Roo,
404         xtype : 'PagingToolbar',
405         items : [
406          {
407           '|xns' : 'Roo.Toolbar',
408           text : _this._strings['801ab24683a4a8c433c6eb40c48bcd9d'],
409           xns : Roo.Toolbar,
410           xtype : 'Button',
411           listeners : {
412            click : function (_self, e)
413             {
414                 new Pman.Download({
415                     grid : _this.grid
416                 });
417                 Roo.MessageBox.alert("Downloading", "File is downloading");
418             }
419           }
420          },
421          {
422           '|xns' : 'Roo.Toolbar',
423           text : _this._strings['c550aeed26e71a81a88360c1889245ab'],
424           xns : Roo.Toolbar,
425           xtype : 'Button',
426           listeners : {
427            click : function (_self, e)
428             {
429             
430               var s =     _this.egrid.getSelectionModel().getSelectedCell();
431                 
432             
433                 if (!s) {
434                     Roo.MessageBox.alert("Error", "Select a pulldown");
435                 }
436                 
437                 var d = _this.egrid.dataSource.getAt(s[0]);
438              
439             
440                 var etype = d.data.name;
441                 
442                 if(!etype.length){
443                     Roo.MessageBox.alert('Error', 'Please select a pulldown');
444                     return;
445                 }
446                 
447                 Pman.Dialog.Image.show(
448                    {
449                         _url : baseURL+'/Admin/Import/Enum?' + Roo.urlEncode({'etype' : etype})
450                     
451                    },
452                    function () {
453                         _this.grid.footer.onClick('first');
454                    }
455                );
456             }
457           }
458          }
459         ]
460
461        },
462        toolbar : {
463         '|xns' : 'Roo',
464         xns : Roo,
465         xtype : 'Toolbar',
466         items : [
467          {
468           '|xns' : 'Roo.Toolbar',
469           cls : 'x-btn-text-icon',
470           icon : baseURL + '/Pman/templates/images/search.gif',
471           text : _this._strings['d9ec74f5aa29ceef6bf7b45f7fec5d0f'],
472           xns : Roo.Toolbar,
473           xtype : 'Button',
474           listeners : {
475            click : function()
476             {
477                 
478                 // if we do not have a selected type... - what should we show..?
479                 
480                 
481                 var s =     _this.egrid.getSelectionModel().getSelectedCell();
482                 
483             
484                 if (!s) {
485                     Roo.MessageBox.alert("Error", "Select a pulldown");
486                 }
487                 
488                 var d = _this.egrid.dataSource.getAt(s[0]);
489              
490             
491                 var ds = _this.grid.getDataSource();
492             
493                 var add = ds.reader.newRow({    
494                          id: 0, 
495                          display_name : '', 
496                          name : '', 
497                          etype: d.data.name, 
498                          active: 1, 
499                          seqid: 0
500                   });
501             
502                 ds.insert(0  , add);  
503                 
504                 _this.grid.startEditing(0, _this.grid.colModel.getIndexByDataIndex('name')); // name... 
505             }
506           }
507          },
508          {
509           '|xns' : 'Roo.Toolbar',
510           cls : 'x-btn-text-icon',
511           icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
512           text : _this._strings['b9c49611cfda3259a2b837b39489e650'],
513           xns : Roo.Toolbar,
514           xtype : 'Button',
515           listeners : {
516            click : function()
517             {
518                 
519                 // if we do not have a selected type... - what should we show..?
520                 var et = _this.etypeCombo.getValue();
521                 
522                 if (!et) {
523                     Roo.MessageBox.alert("Error", "Select a pulldown");
524                     return;
525                 }
526                 var sc = _this.grid.getSelectionModel().getSelectedCell();
527                 Roo.log(sc);
528                 var ds = _this.grid.ds.getAt(sc[0]);
529                 if (!ds) {
530                     Roo.MessageBox.alert("Error", "Select enum");
531                     return;
532                 }
533                 
534                 Roo.log(ds);
535                 Pman.Dialog.AdminEnumImages.show({onid:ds.data.id}, function(){
536                     _this.grid.footer.onClick('first');
537                 });
538                 
539             }
540           }
541          },
542          {
543           '|xns' : 'Roo.form',
544           fieldLabel : 'Search',
545           name : 'search',
546           xns : Roo.form,
547           xtype : 'TextField',
548           listeners : {
549            render : function (_self)
550             {
551                 _this.searchBox = this;
552             }
553           }
554          },
555          {
556           '|xns' : 'Roo.Toolbar',
557           cls : 'x-btn-icon',
558           icon : rootURL + '/Pman/templates/images/search.gif',
559           xns : Roo.Toolbar,
560           xtype : 'Button',
561           listeners : {
562            click : function (_self, e)
563             {
564                 _this.grid.footer.onClick('first');
565             }
566           }
567          },
568          {
569           '|xns' : 'Roo.Toolbar',
570           cls : 'x-btn-icon',
571           icon : rootURL + '/Pman/templates/images/edit-clear.gif',
572           xns : Roo.Toolbar,
573           xtype : 'Button',
574           listeners : {
575            click : function (_self, e)
576             {
577                  _this.searchBox.setValue('');
578                  _this.grid.footer.onClick('first');
579             }
580           }
581          },
582          {
583           '|xns' : 'Roo.Toolbar',
584           xns : Roo.Toolbar,
585           xtype : 'Fill'
586          },
587          {
588           '|xns' : 'Roo.Toolbar',
589           cls : 'x-btn-text-icon',
590           icon : rootURL + '/Pman/templates/images/trash.gif',
591           text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'],
592           xns : Roo.Toolbar,
593           xtype : 'Button',
594           listeners : {
595            click : function()
596             {
597                 var ids = [];
598                 _this.grid.dataSource.each(function(rr) {
599                     if (rr.selected) {
600                         ids.push(rr.data.id);
601                     }
602                 });   
603                 if (!ids.length) {
604                     Roo.MessageBox.alert("Error", "Select rows by clicking on the Internal# column");
605                     return;
606                 }
607                 
608                 Roo.MessageBox.confirm(
609                     "Confirm", 
610                     "Confirm Deletion of selected rows (some rows can not be deleted if they are referenced elsewhere", 
611                     function(res) {
612                         if(res != 'yes') {
613                             return;
614                         }
615                         new Pman.Request({
616                             method : 'POST',
617                             url : baseURL + '/Roo/Core_enum',
618                             params : {
619                                 _delete  : ids.join(',')
620                             },
621                             success : function() {
622                                 _this.grid.footer.onClick('refresh');
623                             }
624                         });
625                     }
626                 );
627                 
628                 
629             }
630           }
631          },
632          {
633           '|xns' : 'Roo.Toolbar',
634           xns : Roo.Toolbar,
635           xtype : 'Separator'
636          },
637          {
638           '|xns' : 'Roo.Toolbar',
639           cls : 'x-btn-text-icon',
640           icon : Roo.rootURL + 'images/default/tree/leaf.gif',
641           text : _this._strings['1a87a3d29199e3435b8fb314624c008f'],
642           xns : Roo.Toolbar,
643           xtype : 'Button',
644           listeners : {
645            click : function()
646             {
647                 var s = _this.grid.getSelectionModel().getSelectedCell();
648                 
649                 if (!s.length)  {
650                     Roo.MessageBox.alert("Error", "Select a Row");
651                     return;
652                 }
653                 
654                 
655                 //_this.dialog.show(s[0].data, function() {
656                 //    _this.grid.footer.onClick('first');
657                 //}); 
658                 
659             }
660           }
661          }
662         ]
663
664        },
665        '|xns' : 'Roo.grid',
666        autoExpandColumn : 'display_name',
667        clicksToEdit : 1,
668        loadMask : true,
669        xns : Roo.grid,
670        xtype : 'EditorGrid',
671        colModel : [
672          {
673           '|xns' : 'Roo.grid',
674           dataIndex : 'id',
675           header : _this._strings['7af54708cf5a4286cf0cfa58ff5148a8'],
676           renderer : function(v,x,r) { 
677               var fmt = '{0}';
678               if (r.selected) {
679                   fmt = '<span style="color:orange;font-weight:bold;">{0}</span>';
680               }
681               return String.format(fmt, v); },
682           sortable : true,
683           width : 75,
684           xns : Roo.grid,
685           xtype : 'ColumnModel'
686          },
687 {
688           '|xns' : 'Roo.grid',
689           dataIndex : 'images_id_id',
690           header : _this._strings['be53a0541a6d36f6ecb879fa2c584b08'],
691           renderer : function(v,x,r) { return String.format('<img src="{0}/Images/Thumb/25/{1}/{2}" width="25" height="25">', baseURL, v, r.data.images_id_filename); },
692           width : 75,
693           xns : Roo.grid,
694           xtype : 'ColumnModel'
695          },
696 {
697           editor : {
698            field : {
699             '|xns' : 'Roo.form',
700             xns : Roo.form,
701             xtype : 'TextField'
702            },
703            '|xns' : 'Roo.grid',
704            xns : Roo.grid,
705            xtype : 'GridEditor',
706            items : [
707
708            ]
709
710           },
711           '|xns' : 'Roo.grid',
712           dataIndex : 'name',
713           header : _this._strings['49ee3087348e8d44e1feda1917443987'],
714           renderer : function(v) { return String.format('{0}', v); },
715           sortable : true,
716           width : 200,
717           xns : Roo.grid,
718           xtype : 'ColumnModel',
719           items : [
720
721           ]
722
723          },
724 {
725           editor : {
726            field : {
727             '|xns' : 'Roo.form',
728             xns : Roo.form,
729             xtype : 'TextField'
730            },
731            '|xns' : 'Roo.grid',
732            xns : Roo.grid,
733            xtype : 'GridEditor',
734            items : [
735
736            ]
737
738           },
739           '|xns' : 'Roo.grid',
740           dataIndex : 'display_name',
741           header : _this._strings['b48968e1c912da07df5e8d6d246291ec'],
742           renderer : function(v) { return String.format('{0}', v); },
743           sortable : true,
744           width : 200,
745           xns : Roo.grid,
746           xtype : 'ColumnModel',
747           items : [
748
749           ]
750
751          },
752 {
753           '|xns' : 'Roo.grid',
754           dataIndex : 'active',
755           header : _this._strings['4d3d769b812b6faa6b76e1a8abaece2d'],
756           renderer : function(v) {  
757               var state = v> 0 ?  '-checked' : '';
758           
759               return '<img class="x-grid-check-icon' + state + '" src="' + Roo.BLANK_IMAGE_URL + '"/>';
760                           
761            },
762           sortable : true,
763           width : 75,
764           xns : Roo.grid,
765           xtype : 'ColumnModel'
766          },
767 {
768           editor : {
769            field : {
770             '|xns' : 'Roo.form',
771             allowDecimals : false,
772             allowNegative : true,
773             decimalPrecision : 0,
774             xns : Roo.form,
775             xtype : 'NumberField'
776            },
777            '|xns' : 'Roo.grid',
778            xns : Roo.grid,
779            xtype : 'GridEditor',
780            items : [
781
782            ]
783
784           },
785           '|xns' : 'Roo.grid',
786           dataIndex : 'seqid',
787           header : _this._strings['d1228f5476d15142b1358ae4b5fa2454'],
788           renderer : function(v) { return String.format('{0}', v); },
789           sortable : true,
790           sortable : true,
791           width : 75,
792           xns : Roo.grid,
793           xtype : 'ColumnModel',
794           items : [
795
796           ]
797
798          }
799        ],
800        listeners : {
801         afteredit : function (e)
802          {
803             e.record.commit();     
804          },
805         beforeedit : function (e)
806          {
807              if(e.field == 'name' && e.record.data.is_system_enum*1 == 1){
808                  return false;
809              }
810          },
811         cellclick : function (_self, rowIndex, columnIndex, e)
812          {
813          
814                  var di = this.colModel.getDataIndex(columnIndex);
815                  var rec = _this.grid.ds.getAt(rowIndex);
816                      
817                  if (di == 'active') {
818                      
819                      rec.set('active', rec.data.active ? 0 : 1);
820                      rec.commit();
821                      return;
822                  }
823                  if (di == 'id' ) {
824                      
825                      if (!e.ctrlKey && !e.shiftKey) { // shift or control not pressed -clear selection.
826                      
827                          this.dataSource.each(function(rr) {
828                              rr.selected = 0;
829                              rr.set('sel', 0);
830                          });
831                      }
832                      
833                      if (this.last_selected && e.shiftKey) {
834                          // the highlight all the lines between the one last selected, and this one.
835                          var s = this.dataSource.indexOf(this.last_selected);
836                          var e = this.dataSource.indexOf(rec);
837                          var ss = Math.min(s,e);
838                          var ee = Math.max(s,e) +1;
839                          for(var i = ss; i < ee; i++) {
840                              var rr = this.dataSource.getAt(i);
841                              rr.selected = 1;
842                              rr.set('sel', 1);
843                          }
844                          this.last_selected = rec;
845                          return;
846          
847                      }
848                      
849                      rec.selected = rec.selected ? 0 : 1;
850                      this.last_selected = rec.selected ? rec : false;
851                      rec.set('sel', rec.data.sel ? 0 : 1);
852                  }
853                   
854          
855                   
856                  
857          },
858         keypress : function (e)
859          {
860              if(e.keyCode == 13){
861                  _this.grid.footer.onClick('first');
862              }
863          },
864         render : function() 
865          {
866              _this.grid = this; 
867              //_this.dialog = Pman.Dialog.FILL_IN
868              if (_this.panel.active) {
869                 this.footer.onClick('first');
870              }
871          }
872        },
873        items : [
874
875        ]
876
877       },
878       '|xns' : 'Roo',
879       background : false,
880       fitToframe : true,
881       region : 'center',
882       tableName : 'core_enum',
883       title : _this._strings['2df80d5febcde0c10a66818488622b7c'],
884       xns : Roo,
885       xtype : 'GridPanel',
886       listeners : {
887        activate : function() {
888             _this.panel = this;
889             if (_this.grid) {
890                 _this.grid.footer.onClick('first');
891             }
892         }
893       },
894       items : [
895
896       ]
897
898      }
899     ]
900
901    },
902    '|xns' : 'Roo',
903    region : 'center',
904    title : _this._strings['2df80d5febcde0c10a66818488622b7c'],
905    xns : Roo,
906    xtype : 'NestedLayoutPanel',
907    items : [
908
909    ]
910
911   };  }
912 });