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