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   '7dce122004969d56ae2e0245cb754d35' :"Edit",
15   '801ab24683a4a8c433c6eb40c48bcd9d' :"Download",
16   '7af54708cf5a4286cf0cfa58ff5148a8' :"Internal #",
17   'be53a0541a6d36f6ecb879fa2c584b08' :"Image",
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           cls : 'x-btn-text-icon',
635           icon : Roo.rootURL + 'images/default/tree/leaf.gif',
636           text : _this._strings['7dce122004969d56ae2e0245cb754d35'],
637           xns : Roo.Toolbar,
638           xtype : 'Button',
639           listeners : {
640            click : function()
641             {
642                 var s = _this.grid.getSelectionModel().getSelections();
643                 if (!s.length || (s.length > 1))  {
644                     Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
645                     return;
646                 }
647                 if (!_this.dialog) return;
648                 _this.dialog.show(s[0].data, function() {
649                     _this.grid.footer.onClick('first');
650                 }); 
651                 
652             }
653           }
654          }
655         ]
656
657        },
658        '|xns' : 'Roo.grid',
659        autoExpandColumn : 'display_name',
660        clicksToEdit : 1,
661        loadMask : true,
662        xns : Roo.grid,
663        xtype : 'EditorGrid',
664        colModel : [
665          {
666           '|xns' : 'Roo.grid',
667           dataIndex : 'id',
668           header : _this._strings['7af54708cf5a4286cf0cfa58ff5148a8'],
669           renderer : function(v,x,r) { 
670               var fmt = '{0}';
671               if (r.selected) {
672                   fmt = '<span style="color:orange;font-weight:bold;">{0}</span>';
673               }
674               return String.format(fmt, v); },
675           sortable : true,
676           width : 75,
677           xns : Roo.grid,
678           xtype : 'ColumnModel'
679          },
680 {
681           '|xns' : 'Roo.grid',
682           dataIndex : 'images_id_id',
683           header : _this._strings['be53a0541a6d36f6ecb879fa2c584b08'],
684           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); },
685           width : 75,
686           xns : Roo.grid,
687           xtype : 'ColumnModel'
688          },
689 {
690           editor : {
691            field : {
692             '|xns' : 'Roo.form',
693             xns : Roo.form,
694             xtype : 'TextField'
695            },
696            '|xns' : 'Roo.grid',
697            xns : Roo.grid,
698            xtype : 'GridEditor',
699            items : [
700
701            ]
702
703           },
704           '|xns' : 'Roo.grid',
705           dataIndex : 'name',
706           header : _this._strings['49ee3087348e8d44e1feda1917443987'],
707           renderer : function(v) { return String.format('{0}', v); },
708           sortable : true,
709           width : 200,
710           xns : Roo.grid,
711           xtype : 'ColumnModel',
712           items : [
713
714           ]
715
716          },
717 {
718           editor : {
719            field : {
720             '|xns' : 'Roo.form',
721             xns : Roo.form,
722             xtype : 'TextField'
723            },
724            '|xns' : 'Roo.grid',
725            xns : Roo.grid,
726            xtype : 'GridEditor',
727            items : [
728
729            ]
730
731           },
732           '|xns' : 'Roo.grid',
733           dataIndex : 'display_name',
734           header : _this._strings['b48968e1c912da07df5e8d6d246291ec'],
735           renderer : function(v) { return String.format('{0}', v); },
736           sortable : true,
737           width : 200,
738           xns : Roo.grid,
739           xtype : 'ColumnModel',
740           items : [
741
742           ]
743
744          },
745 {
746           '|xns' : 'Roo.grid',
747           dataIndex : 'active',
748           header : _this._strings['4d3d769b812b6faa6b76e1a8abaece2d'],
749           renderer : function(v) {  
750               var state = v> 0 ?  '-checked' : '';
751           
752               return '<img class="x-grid-check-icon' + state + '" src="' + Roo.BLANK_IMAGE_URL + '"/>';
753                           
754            },
755           sortable : true,
756           width : 75,
757           xns : Roo.grid,
758           xtype : 'ColumnModel'
759          },
760 {
761           editor : {
762            field : {
763             '|xns' : 'Roo.form',
764             allowDecimals : false,
765             allowNegative : true,
766             decimalPrecision : 0,
767             xns : Roo.form,
768             xtype : 'NumberField'
769            },
770            '|xns' : 'Roo.grid',
771            xns : Roo.grid,
772            xtype : 'GridEditor',
773            items : [
774
775            ]
776
777           },
778           '|xns' : 'Roo.grid',
779           dataIndex : 'seqid',
780           header : _this._strings['d1228f5476d15142b1358ae4b5fa2454'],
781           renderer : function(v) { return String.format('{0}', v); },
782           sortable : true,
783           sortable : true,
784           width : 75,
785           xns : Roo.grid,
786           xtype : 'ColumnModel',
787           items : [
788
789           ]
790
791          }
792        ],
793        listeners : {
794         afteredit : function (e)
795          {
796             e.record.commit();     
797          },
798         beforeedit : function (e)
799          {
800              if(e.field == 'name' && e.record.data.is_system_enum*1 == 1){
801                  return false;
802              }
803          },
804         cellclick : function (_self, rowIndex, columnIndex, e)
805          {
806          
807                  var di = this.colModel.getDataIndex(columnIndex);
808                  var rec = _this.grid.ds.getAt(rowIndex);
809                      
810                  if (di == 'active') {
811                      
812                      rec.set('active', rec.data.active ? 0 : 1);
813                      rec.commit();
814                      return;
815                  }
816                  if (di == 'id' ) {
817                      
818                      if (!e.ctrlKey && !e.shiftKey) { // shift or control not pressed -clear selection.
819                      
820                          this.dataSource.each(function(rr) {
821                              rr.selected = 0;
822                              rr.set('sel', 0);
823                          });
824                      }
825                      
826                      if (this.last_selected && e.shiftKey) {
827                          // the highlight all the lines between the one last selected, and this one.
828                          var s = this.dataSource.indexOf(this.last_selected);
829                          var e = this.dataSource.indexOf(rec);
830                          var ss = Math.min(s,e);
831                          var ee = Math.max(s,e) +1;
832                          for(var i = ss; i < ee; i++) {
833                              var rr = this.dataSource.getAt(i);
834                              rr.selected = 1;
835                              rr.set('sel', 1);
836                          }
837                          this.last_selected = rec;
838                          return;
839          
840                      }
841                      
842                      rec.selected = rec.selected ? 0 : 1;
843                      this.last_selected = rec.selected ? rec : false;
844                      rec.set('sel', rec.data.sel ? 0 : 1);
845                  }
846                   
847          
848                   
849                  
850          },
851         keypress : function (e)
852          {
853              if(e.keyCode == 13){
854                  _this.grid.footer.onClick('first');
855              }
856          },
857         render : function() 
858          {
859              _this.grid = this; 
860              //_this.dialog = Pman.Dialog.FILL_IN
861              if (_this.panel.active) {
862                 this.footer.onClick('first');
863              }
864          }
865        },
866        items : [
867
868        ]
869
870       },
871       '|xns' : 'Roo',
872       background : false,
873       fitToframe : true,
874       region : 'center',
875       tableName : 'core_enum',
876       title : _this._strings['2df80d5febcde0c10a66818488622b7c'],
877       xns : Roo,
878       xtype : 'GridPanel',
879       listeners : {
880        activate : function() {
881             _this.panel = this;
882             if (_this.grid) {
883                 _this.grid.footer.onClick('first');
884             }
885         }
886       },
887       items : [
888
889       ]
890
891      }
892     ]
893
894    },
895    '|xns' : 'Roo',
896    region : 'center',
897    title : _this._strings['2df80d5febcde0c10a66818488622b7c'],
898    xns : Roo,
899    xtype : 'NestedLayoutPanel',
900    items : [
901
902    ]
903
904   };  }
905 });