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