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