sync
[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             
651                 var s = _this.grid.getSelectionModel().getSelectedCell();
652             
653                 if (!s.length)  {
654                     Roo.MessageBox.alert("Error", "Select a Row");
655                     return;
656                 }
657                 
658                 var d = _this.grid.ds.getAt(s[0]);
659                 console.log(Pman.Dialog);
660                 Pman.Dialog.AdminEnumMerge.show(d.data, function() {
661                     _this.grid.footer.onClick('refresh');
662                 }); 
663                 
664             }
665           },
666           xns : Roo.Toolbar,
667           '|xns' : 'Roo.Toolbar'
668          }
669         ]
670        },
671        dataSource : {
672         xtype : 'Store',
673         remoteSort : true,
674         sortInfo : { field : 'etype', direction: 'ASC' },
675         listeners : {
676          beforeload : function (_self, options)
677           {
678           
679               var s =     _this.egrid.getSelectionModel().getSelectedCell();
680               
681           
682               if (!s) {
683                   return false;
684               }
685               var d = _this.egrid.dataSource.getAt(s[0]);
686               
687               options.params.etype = d.data.name;
688               options.params['query[search]'] = _this.searchBox.getValue();
689               if (!options.params.etype.length) {
690                   return false;
691               }
692           },
693          update : function (_self, record, operation)
694           {
695               if (operation != Roo.data.Record.COMMIT) {
696                   return;
697               }
698               // got commit..
699               new Pman.Request({
700                   url : baseURL + '/Roo/Core_enum.php',
701                   method : 'POST',
702                   params : {
703                       id : record.data.id,
704                       etype : _this.grid.ds.getById(record.id).data.etype,
705                       name : record.data.name,
706                       active : record.data.active,
707                       seqid : record.data.seqid,
708                       display_name : record.data.display_name
709                   }, 
710                   success : function(res) {
711                       //Roo.log(data);
712                       // update the ID if it's not set..
713                       if (record.data.id * 1 < 1) {
714                           record.set('id', res.data.id);
715                       }
716                   }
717               });
718               
719           }
720         },
721         xns : Roo.data,
722         '|xns' : 'Roo.data',
723         proxy : {
724          xtype : 'HttpProxy',
725          method : 'GET',
726          url : baseURL + '/Roo/core_enum.php',
727          xns : Roo.data,
728          '|xns' : 'Roo.data'
729         },
730         reader : {
731          xtype : 'JsonReader',
732          fields : [
733              {
734                  'name': 'id',
735                  'type': 'int'
736              },
737              {
738                  'name': 'etype',
739                  'type': 'string'
740              },
741              {
742                  'name': 'name',
743                  'type': 'string'
744              },
745              {
746                  'name': 'active',
747                  'type': 'int'
748              },
749              {
750                  'name': 'seqid',
751                  'type': 'int'
752              }
753          ],
754          id : 'id',
755          root : 'data',
756          totalProperty : 'total',
757          xns : Roo.data,
758          '|xns' : 'Roo.data'
759         }
760        },
761        colModel : [
762         {
763          xtype : 'ColumnModel',
764          dataIndex : 'id',
765          header : _this._strings['7af54708cf5a4286cf0cfa58ff5148a8'] /* Internal # */,
766          renderer : function(v,x,r) { 
767              var fmt = '{0}';
768              if (r.selected) {
769                  fmt = '<span style="color:orange;font-weight:bold;">{0}</span>';
770              }
771              return String.format(fmt, v); },
772          sortable : true,
773          width : 75,
774          xns : Roo.grid,
775          '|xns' : 'Roo.grid'
776         },
777         {
778          xtype : 'ColumnModel',
779          dataIndex : 'images_id_id',
780          header : _this._strings['be53a0541a6d36f6ecb879fa2c584b08'] /* Image */,
781          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); },
782          width : 75,
783          xns : Roo.grid,
784          '|xns' : 'Roo.grid'
785         },
786         {
787          xtype : 'ColumnModel',
788          dataIndex : 'name',
789          header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
790          renderer : function(v) { return String.format('{0}', v); },
791          sortable : true,
792          width : 200,
793          xns : Roo.grid,
794          '|xns' : 'Roo.grid',
795          editor : {
796           xtype : 'GridEditor',
797           xns : Roo.grid,
798           '|xns' : 'Roo.grid',
799           field : {
800            xtype : 'TextField',
801            xns : Roo.form,
802            '|xns' : 'Roo.form'
803           }
804          }
805         },
806         {
807          xtype : 'ColumnModel',
808          dataIndex : 'display_name',
809          header : _this._strings['b48968e1c912da07df5e8d6d246291ec'] /* Display Name */,
810          renderer : function(v) { return String.format('{0}', v); },
811          sortable : true,
812          width : 200,
813          xns : Roo.grid,
814          '|xns' : 'Roo.grid',
815          editor : {
816           xtype : 'GridEditor',
817           xns : Roo.grid,
818           '|xns' : 'Roo.grid',
819           field : {
820            xtype : 'TextField',
821            xns : Roo.form,
822            '|xns' : 'Roo.form'
823           }
824          }
825         },
826         {
827          xtype : 'ColumnModel',
828          dataIndex : 'active',
829          header : _this._strings['4d3d769b812b6faa6b76e1a8abaece2d'] /* Active */,
830          renderer : function(v) {  
831              var state = v> 0 ?  '-checked' : '';
832          
833              return '<img class="x-grid-check-icon' + state + '" src="' + Roo.BLANK_IMAGE_URL + '"/>';
834                          
835           },
836          sortable : true,
837          width : 75,
838          xns : Roo.grid,
839          '|xns' : 'Roo.grid'
840         },
841         {
842          xtype : 'ColumnModel',
843          dataIndex : 'seqid',
844          header : _this._strings['d1228f5476d15142b1358ae4b5fa2454'] /* Order # */,
845          renderer : function(v) { return String.format('{0}', v); },
846          sortable : true,
847          width : 75,
848          xns : Roo.grid,
849          '|xns' : 'Roo.grid',
850          editor : {
851           xtype : 'GridEditor',
852           xns : Roo.grid,
853           '|xns' : 'Roo.grid',
854           field : {
855            xtype : 'NumberField',
856            allowDecimals : false,
857            allowNegative : true,
858            decimalPrecision : 0,
859            xns : Roo.form,
860            '|xns' : 'Roo.form'
861           }
862          }
863         }
864        ]
865       }
866      }
867     ]
868    }
869   };  }
870 });