Pman.Dialog.AdminEnumImages.bjs
[Pman.Admin] / Pman.Dialog.AdminEnumImages.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Pman.Dialog.AdminEnumImages = {
6
7     dialog : false,
8     callback:  false,
9
10     show : function(data, cb)
11     {
12         if (!this.dialog) {
13             this.create();
14         }
15
16         this.callback = cb;
17         this.data = data;
18         this.dialog.show(this.data._el);
19         if (this.form) {
20            this.form.reset();
21            this.form.setValues(data);
22            this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
23         }
24
25     },
26
27     create : function()
28     {
29         var _this = this;
30         this.dialog = Roo.factory({
31             xtype: 'LayoutDialog',
32             xns: Roo,
33             items : [
34                 {
35                     xtype: 'GridPanel',
36                     xns: Roo,
37                     listeners : {
38                         activate : function() {
39                             _this.panel = this;
40                             if (_this.grid) {
41                                 _this.grid.footer.onClick('first');
42                             }
43                         }
44                     },
45                     background : true,
46                     fitContainer : true,
47                     fitToframe : true,
48                     region : 'center',
49                     tableName : 'Companies',
50                     title : "Outlets",
51                     grid : {
52                         xtype: 'EditorGrid',
53                         xns: Roo.grid,
54                         listeners : {
55                             render : function() 
56                             {
57                                 _this.grid = this; 
58                                 _this.dialog = Pman.Dialog.PrettybookedOutlet;
59                                 if (_this.panel.active) {
60                                    this.footer.onClick('first');
61                                 }
62                             },
63                             rowdblclick : function (_self, rowIndex, e)
64                             {
65                                 //_this.dialog = Pman.Dialog.PrettybookOutlet;
66                                 _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
67                                     _this.grid.footer.onClick('first');
68                                 }); 
69                             },
70                             cellclick : function (_self, rowIndex, columnIndex, e)
71                             {
72                                 var di = this.colModel.getDataIndex(columnIndex);
73                                 if (di == 'is_active' || di == 'is_allow_booking') {
74                             
75                                     var rec = _this.grid.ds.getAt(rowIndex);
76                                     if(di == 'is_active'){
77                                         rec.set('is_active', rec.data.is_active ? 0 : 1);
78                                     }else{
79                                         rec.set('is_allow_booking', rec.data.is_allow_booking ? 0 : 1);
80                                     }
81                                     rec.commit();
82                                 }else{
83                                     return;
84                                 }
85                                 
86                             },
87                             afteredit : function (e)
88                             {
89                                e.record.commit();     
90                             }
91                         },
92                         clicksToEdit : 1,
93                         loadMask : true,
94                         dataSource : {
95                             xtype: 'Store',
96                             xns: Roo.data,
97                             listeners : {
98                                 beforeload : function (_self, options)
99                                 {
100                                     options.params = options.params || {};
101                                     options.params.comptype='Outlet';
102                                     options.params._search = _this.searchBox.getValue();
103                                     for(var k in _this.pagetype) {
104                                         if (!_this.pagetype[k].pressed) {
105                                             continue;
106                                         }
107                                         switch(k) {
108                                             case 'new':
109                                                 options.params.is_active = 0;
110                                                 break;
111                                             case 'all':
112                                                 options.params.is_active = 1 ;
113                                                 break;
114                                         }
115                                     
116                                     }
117                                 },
118                                 update : function (_self, record, operation)
119                                 {
120                                     if (operation != Roo.data.Record.COMMIT) {
121                                         return;
122                                     }
123                                     // got commit..
124                                     if(record.data.id > 0){
125                                         new Pman.Request({
126                                             url : baseURL + '/Roo/Companies.php',
127                                             method : 'POST',
128                                             params : {
129                                                 id : record.data.id,
130                                                 is_active : record.data.is_active,
131                                                 owner_id_active_by : record.data.is_active ? 2 : 0,
132                                                 is_allow_booking : record.data.is_allow_booking
133                                             }, 
134                                             success : function(res) {
135                                                 //Roo.log(data);
136                                                 // update the ID if it's not set..
137                                                 if (record.data.id * 1 < 1) {
138                                                     record.set('id', res.data.id);
139                                                 }
140                                                 // no need to reload this..
141                                                 //_this.grid.getDataSource().load({});
142                                             }
143                                         });
144                                     }
145                                     
146                                 }
147                             },
148                             remoteSort : true,
149                             sortInfo : { field : 'created_dt', direction: 'DESC' },
150                             proxy : {
151                                 xtype: 'HttpProxy',
152                                 xns: Roo.data,
153                                 method : 'GET',
154                                 url : baseURL + '/Roo/Companies.php'
155                             },
156                             reader : {
157                                 xtype: 'JsonReader',
158                                 xns: Roo.data,
159                                 id : 'id',
160                                 root : 'data',
161                                 totalProperty : 'total',
162                                 fields : [
163                                     {
164                                         'name': 'id',
165                                         'type': 'int'
166                                     },
167                                     {
168                                         'name': 'code',
169                                         'type': 'string'
170                                     },
171                                     {
172                                         'name': 'name',
173                                         'type': 'string'
174                                     },
175                                     {
176                                         'name': 'remarks',
177                                         'type': 'string'
178                                     },
179                                     {
180                                         'name': 'owner_id',
181                                         'type': 'int'
182                                     },
183                                     {
184                                         'name': 'address',
185                                         'type': 'string'
186                                     },
187                                     {
188                                         'name': 'tel',
189                                         'type': 'string'
190                                     },
191                                     {
192                                         'name': 'fax',
193                                         'type': 'string'
194                                     },
195                                     {
196                                         'name': 'email',
197                                         'type': 'string'
198                                     },
199                                     {
200                                         'name': 'isOwner',
201                                         'type': 'int'
202                                     },
203                                     {
204                                         'name': 'logo_id',
205                                         'type': 'int'
206                                     },
207                                     {
208                                         'name': 'background_color',
209                                         'type': 'string'
210                                     },
211                                     {
212                                         'name': 'comptype',
213                                         'type': 'string'
214                                     },
215                                     {
216                                         'name': 'url',
217                                         'type': 'string'
218                                     },
219                                     {
220                                         'name': 'main_office_id',
221                                         'type': 'int'
222                                     },
223                                     {
224                                         'name': 'created_by',
225                                         'type': 'int'
226                                     },
227                                     {
228                                         'name': 'created_dt',
229                                         'type': 'date',
230                                         'dateFormat': 'Y-m-d'
231                                     },
232                                     {
233                                         'name': 'updated_by',
234                                         'type': 'int'
235                                     },
236                                     {
237                                         'name': 'updated_dt',
238                                         'type': 'date',
239                                         'dateFormat': 'Y-m-d'
240                                     },
241                                     {
242                                         'name': 'passwd',
243                                         'type': 'string'
244                                     },
245                                     {
246                                         'name': 'dispatch_port',
247                                         'type': 'string'
248                                     },
249                                     {
250                                         'name': 'province',
251                                         'type': 'string'
252                                     },
253                                     {
254                                         'name': 'country',
255                                         'type': 'string'
256                                     },
257                                     {
258                                         'name': 'description',
259                                         'type': 'string'
260                                     },
261                                     {
262                                         'name': 'district_id',
263                                         'type': 'int'
264                                     },
265                                     {
266                                         'name': 'rating_average',
267                                         'type': 'float'
268                                     },
269                                     {
270                                         'name': 'rating_count',
271                                         'type': 'int'
272                                     },
273                                     {
274                                         'name': 'reviews_count',
275                                         'type': 'int'
276                                     },
277                                     {
278                                         'name': 'tel_other',
279                                         'type': 'string'
280                                     },
281                                     {
282                                         'name': 'is_active',
283                                         'type': 'int'
284                                     },
285                                     {
286                                         'name': 'is_allow_booking',
287                                         'type': 'int'
288                                     },
289                                     {
290                                         'name': 'price_range_min',
291                                         'type': 'float'
292                                     },
293                                     {
294                                         'name': 'price_range_max',
295                                         'type': 'float'
296                                     },
297                                     {
298                                         'name': 'favoured_value',
299                                         'type': 'int'
300                                     },
301                                     {
302                                         'name': 'logo_id_id',
303                                         'type': 'int'
304                                     },
305                                     {
306                                         'name': 'logo_id_filename',
307                                         'type': 'string'
308                                     },
309                                     {
310                                         'name': 'logo_id_ontable',
311                                         'type': 'string'
312                                     },
313                                     {
314                                         'name': 'logo_id_onid',
315                                         'type': 'int'
316                                     },
317                                     {
318                                         'name': 'logo_id_mimetype',
319                                         'type': 'string'
320                                     },
321                                     {
322                                         'name': 'logo_id_width',
323                                         'type': 'int'
324                                     },
325                                     {
326                                         'name': 'logo_id_height',
327                                         'type': 'int'
328                                     },
329                                     {
330                                         'name': 'logo_id_filesize',
331                                         'type': 'int'
332                                     },
333                                     {
334                                         'name': 'logo_id_displayorder',
335                                         'type': 'int'
336                                     },
337                                     {
338                                         'name': 'logo_id_language',
339                                         'type': 'string'
340                                     },
341                                     {
342                                         'name': 'logo_id_parent_image_id',
343                                         'type': 'int'
344                                     },
345                                     {
346                                         'name': 'logo_id_created',
347                                         'type': 'date'
348                                     },
349                                     {
350                                         'name': 'logo_id_imgtype',
351                                         'type': 'string'
352                                     },
353                                     {
354                                         'name': 'logo_id_linkurl',
355                                         'type': 'string'
356                                     },
357                                     {
358                                         'name': 'logo_id_descript',
359                                         'type': 'string'
360                                     },
361                                     {
362                                         'name': 'logo_id_title',
363                                         'type': 'string'
364                                     },
365                                     {
366                                         'name': 'owner_id_id',
367                                         'type': 'int'
368                                     },
369                                     {
370                                         'name': 'owner_id_office_id',
371                                         'type': 'int'
372                                     },
373                                     {
374                                         'name': 'owner_id_name',
375                                         'type': 'string'
376                                     },
377                                     {
378                                         'name': 'owner_id_phone',
379                                         'type': 'string'
380                                     },
381                                     {
382                                         'name': 'owner_id_fax',
383                                         'type': 'string'
384                                     },
385                                     {
386                                         'name': 'owner_id_email',
387                                         'type': 'string'
388                                     },
389                                     {
390                                         'name': 'owner_id_company_id',
391                                         'type': 'int'
392                                     },
393                                     {
394                                         'name': 'owner_id_role',
395                                         'type': 'string'
396                                     },
397                                     {
398                                         'name': 'owner_id_active',
399                                         'type': 'int'
400                                     },
401                                     {
402                                         'name': 'owner_id_remarks',
403                                         'type': 'string'
404                                     },
405                                     {
406                                         'name': 'owner_id_passwd',
407                                         'type': 'string'
408                                     },
409                                     {
410                                         'name': 'owner_id_owner_id',
411                                         'type': 'int'
412                                     },
413                                     {
414                                         'name': 'owner_id_lang',
415                                         'type': 'string'
416                                     },
417                                     {
418                                         'name': 'owner_id_no_reset_sent',
419                                         'type': 'int'
420                                     },
421                                     {
422                                         'name': 'owner_id_action_type',
423                                         'type': 'string'
424                                     },
425                                     {
426                                         'name': 'owner_id_project_id',
427                                         'type': 'int'
428                                     },
429                                     {
430                                         'name': 'owner_id_deleted_by',
431                                         'type': 'int'
432                                     },
433                                     {
434                                         'name': 'owner_id_deleted_dt',
435                                         'type': 'date'
436                                     },
437                                     {
438                                         'name': 'main_office_id_id',
439                                         'type': 'int'
440                                     },
441                                     {
442                                         'name': 'main_office_id_company_id',
443                                         'type': 'int'
444                                     },
445                                     {
446                                         'name': 'main_office_id_name',
447                                         'type': 'string'
448                                     },
449                                     {
450                                         'name': 'main_office_id_address',
451                                         'type': 'string'
452                                     },
453                                     {
454                                         'name': 'main_office_id_phone',
455                                         'type': 'string'
456                                     },
457                                     {
458                                         'name': 'main_office_id_fax',
459                                         'type': 'string'
460                                     },
461                                     {
462                                         'name': 'main_office_id_email',
463                                         'type': 'string'
464                                     },
465                                     {
466                                         'name': 'main_office_id_role',
467                                         'type': 'string'
468                                     },
469                                     {
470                                         'name': 'district_id_id',
471                                         'type': 'int'
472                                     },
473                                     {
474                                         'name': 'district_id_name',
475                                         'type': 'string'
476                                     },
477                                     {
478                                         'name': 'district_id_parent_id',
479                                         'type': 'int'
480                                     },
481                                     {
482                                         'name': 'district_id_priority',
483                                         'type': 'int'
484                                     },
485                                     {
486                                         'name': 'district_id_created_dt',
487                                         'type': 'date'
488                                     },
489                                     {
490                                         'name': 'district_id_updated_dt',
491                                         'type': 'date'
492                                     },
493                                     {
494                                         'name': 'district_id_is_active',
495                                         'type': 'int'
496                                     },
497                                     {
498                                         'name': 'company_id_id',
499                                         'type': 'int'
500                                     },
501                                     {
502                                         'name': 'company_id_name',
503                                         'type': 'string'
504                                     },
505                                     {
506                                         'name': 'company_id_parent_id',
507                                         'type': 'int'
508                                     },
509                                     {
510                                         'name': 'company_id_priority',
511                                         'type': 'int'
512                                     },
513                                     {
514                                         'name': 'company_id_created_dt',
515                                         'type': 'date'
516                                     },
517                                     {
518                                         'name': 'company_id_updated_dt',
519                                         'type': 'date'
520                                     },
521                                     {
522                                         'name': 'company_id_is_active',
523                                         'type': 'int'
524                                     },
525                                     {
526                                         'name': 'company_id_top_id',
527                                         'type': 'int'
528                                     }
529                                 ]
530                             }
531                         },
532                         footer : {
533                             xtype: 'PagingToolbar',
534                             xns: Roo,
535                             pageSize : 25,
536                             displayInfo : true,
537                             displayMsg : "Displaying Companies{0} - {1} of {2}",
538                             emptyMsg : "No Companies found"
539                         },
540                         toolbar : {
541                             xtype: 'Toolbar',
542                             xns: Roo,
543                             items : [
544                                 {
545                                     xtype: 'TextField',
546                                     xns: Roo.form,
547                                     listeners : {
548                                         render : function (_self)
549                                         {
550                                         _this.searchBox=  _self;
551                                         },
552                                         specialkey : function (_self, e)
553                                         {
554                                         _this.grid.footer.onClick('first');
555                                         }
556                                     }
557                                 },
558                                 {
559                                     xtype: 'Button',
560                                     xns: Roo.Toolbar,
561                                     listeners : {
562                                         click : function (_self, e)
563                                         {
564                                         _this.grid.footer.onClick('first');
565                                         }
566                                     },
567                                     cls : 'x-btn-icon',
568                                     icon : rootURL + '/Pman/templates/images/search.gif'
569                                 },
570                                 {
571                                     xtype: 'Button',
572                                     xns: Roo.Toolbar,
573                                     listeners : {
574                                         click : function (_self, e)
575                                         {
576                                             _this.searchBox.setValue('');
577                                             
578                                             _this.grid.footer.onClick('first');
579                                         }
580                                     },
581                                     cls : 'x-btn-icon',
582                                     icon : rootURL + '/Pman/templates/images/edit-clear.gif'
583                                 },
584                                 {
585                                     xtype: 'Separator',
586                                     xns: Roo.Toolbar
587                                 },
588                                 {
589                                     xtype: 'Button',
590                                     xns: Roo.Toolbar,
591                                     listeners : {
592                                         render : function (_self)
593                                         {
594                                             _this.pagetype = _this.pagetype || {};
595                                             _this.pagetype['new'] = _self;
596                                         },
597                                         click : function (_self, e)
598                                         {
599                                           _this.grid.footer.onClick('first');
600                                         }
601                                     },
602                                     enableToggle : true,
603                                     pressed : true,
604                                     text : "New Outlets",
605                                     toggleGroup : 'pagetype'
606                                 },
607                                 {
608                                     xtype: 'Button',
609                                     xns: Roo.Toolbar,
610                                     listeners : {
611                                         render : function (_self)
612                                         {
613                                             _this.pagetype = _this.pagetype || {};
614                                             _this.pagetype['all'] = _self;
615                                         },
616                                         click : function (_self, e)
617                                         {
618                                           _this.grid.footer.onClick('first');
619                                         }
620                                     },
621                                     enableToggle : true,
622                                     pressed : false,
623                                     text : "All Outlets",
624                                     toggleGroup : 'pagetype'
625                                 },
626                                 {
627                                     xtype: 'Fill',
628                                     xns: Roo.Toolbar
629                                 },
630                                 {
631                                     xtype: 'Button',
632                                     xns: Roo.Toolbar,
633                                     listeners : {
634                                         click : function()
635                                         {
636                                         
637                                             var sel = _this.grid.selModel.getSelectedCell();
638                                             if (!sel) { 
639                                                 Roo.MessageBox.alert("Error", "Select an outlet");
640                                                 return;
641                                             }
642                                             var rec = _this.grid.ds.getAt(sel[0]);
643                                             Pman.Dialog.PersonEdit.show( { id : rec.data.owner_id } , function() {
644                                                 _this.grid.footer.onClick('reload');
645                                             }); 
646                                          
647                                            
648                                         }
649                                     },
650                                     text : "Edit Owner password"
651                                 },
652                                 {
653                                     xtype: 'Button',
654                                     xns: Roo.Toolbar,
655                                     listeners : {
656                                         click : function()
657                                         {
658                                             if (!_this.dialog) return;
659                                             _this.dialog.show( { id : 0 } , function() {
660                                                 _this.grid.footer.onClick('first');
661                                            }); 
662                                         }
663                                     },
664                                     cls : 'x-btn-text-icon',
665                                     text : "Add",
666                                     icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
667                                 },
668                                 {
669                                     xtype: 'Button',
670                                     xns: Roo.Toolbar,
671                                     listeners : {
672                                         click : function()
673                                         {
674                                             //Pman.genericDelete(_this, 'Companies'); 
675                                             
676                                             var selection = _this.grid.getSelectionModel().getSelectedCell();
677                                             var sn = _this.grid.ds.getAt(selection[0]);
678                                             if (!sn || isNaN(sn.id *1)) {
679                                                 Roo.MessageBox.alert("Error", "Select a row"); 
680                                                 return;
681                                             }
682                                             Roo.MessageBox.confirm("Confirm", "Are sure you want to delete that?", function (v){
683                                                 if (v != 'yes') {
684                                                     return;
685                                                 }
686                                                 Roo.log(sn);
687                                                 new Pman.Request({
688                                                             url : baseURL + '/Roo/Companies.php',
689                                                             method: 'POST',
690                                                             params : {
691                                                                 _delete : sn.data.id
692                                                             },
693                                                             success : function()
694                                                             {
695                                                                 Roo.log('Got Success!!');
696                                                                 _this.grid.footer.onClick('first');
697                                                             }
698                                                         });
699                                                 /*new Pman.Request({
700                                                     url : baseURL + '/Roo/Person.php',
701                                                     method: 'POST',
702                                                     params : {
703                                                         _delete : sn.data.owner_id
704                                                     },
705                                                     success : function()
706                                                     {
707                                                         Roo.log('Got Success!!');
708                                                         
709                                                         
710                                                     }
711                                                 });
712                                                 */
713                                             });
714                                             
715                                         }
716                                     },
717                                     cls : 'x-btn-text-icon',
718                                     text : "Delete",
719                                     icon : rootURL + '/Pman/templates/images/trash.gif'
720                                 }
721                             ]
722                         },
723                         colModel : [
724                             {
725                                 xtype: 'ColumnModel',
726                                 xns: Roo.grid,
727                                 header : 'Id',
728                                 width : 75,
729                                 dataIndex : 'id',
730                                 renderer : function(v) { return String.format('{0}', v); }
731                             },
732                             {
733                                 xtype: 'ColumnModel',
734                                 xns: Roo.grid,
735                                 header : 'Name',
736                                 width : 200,
737                                 dataIndex : 'name',
738                                 renderer : function(v) { return String.format('{0}', v); }
739                             },
740                             {
741                                 xtype: 'ColumnModel',
742                                 xns: Roo.grid,
743                                 header : 'Address',
744                                 width : 200,
745                                 dataIndex : 'address',
746                                 renderer : function(v) { return String.format('{0}', v); }
747                             },
748                             {
749                                 xtype: 'ColumnModel',
750                                 xns: Roo.grid,
751                                 dataIndex : 'tel',
752                                 header : 'Tel',
753                                 width : 100,
754                                 renderer : function(v) { return String.format('{0}', v); }
755                             },
756                             {
757                                 xtype: 'ColumnModel',
758                                 xns: Roo.grid,
759                                 dataIndex : 'email',
760                                 header : 'Email',
761                                 width : 100,
762                                 renderer : function(v) { return String.format('{0}', v); }
763                             },
764                             {
765                                 xtype: 'ColumnModel',
766                                 xns: Roo.grid,
767                                 dataIndex : 'created_dt',
768                                 header : 'Created dt',
769                                 sortable : true,
770                                 width : 75,
771                                 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
772                             },
773                             {
774                                 xtype: 'ColumnModel',
775                                 xns: Roo.grid,
776                                 dataIndex : 'updated_dt',
777                                 header : 'Updated dt',
778                                 sortable : true,
779                                 width : 75,
780                                 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
781                             },
782                             {
783                                 xtype: 'ColumnModel',
784                                 xns: Roo.grid,
785                                 dataIndex : 'district_id_name',
786                                 header : 'District',
787                                 width : 75,
788                                 renderer : function(v) { return String.format('{0}', v); }
789                             },
790                             {
791                                 xtype: 'ColumnModel',
792                                 xns: Roo.grid,
793                                 dataIndex : 'owner_id_is_pending',
794                                 header : 'Verified',
795                                 width : 75,
796                                 renderer : function(v) {  
797                                      if (v) {
798                                         return '<span style="color:red">PENDING</span>';
799                                     }
800                                     return 'VERIFIED';
801                                  }
802                             },
803                             {
804                                 xtype: 'ColumnModel',
805                                 xns: Roo.grid,
806                                 dataIndex : 'is_active',
807                                 header : 'Is active',
808                                 width : 75,
809                                 renderer : function(v) {  
810                                     var state = v * 1 > 0 ?  '-checked' : '';
811                                 
812                                     return '<img class="x-grid-check-icon' + state + '" src="' + Roo.BLANK_IMAGE_URL + '"/>';
813                                                 
814                                  }
815                             },
816                             {
817                                 xtype: 'ColumnModel',
818                                 xns: Roo.grid,
819                                 header : 'Price range min',
820                                 width : 75,
821                                 dataIndex : 'price_range_min',
822                                 renderer : function(v) { return String.format('{0}', v); }
823                             },
824                             {
825                                 xtype: 'ColumnModel',
826                                 xns: Roo.grid,
827                                 header : 'Price range max',
828                                 width : 75,
829                                 dataIndex : 'price_range_max',
830                                 renderer : function(v) { return String.format('{0}', v); }
831                             },
832                             {
833                                 xtype: 'ColumnModel',
834                                 xns: Roo.grid,
835                                 header : 'Favoured value',
836                                 width : 75,
837                                 dataIndex : 'favoured_value',
838                                 renderer : function(v) { return String.format('{0}', v); }
839                             },
840                             {
841                                 xtype: 'ColumnModel',
842                                 xns: Roo.grid,
843                                 dataIndex : 'owner_id_active_by',
844                                 header : 'Active By',
845                                 width : 75,
846                                 renderer : function(v)
847                                 {
848                                     switch(v){
849                                         case 1:
850                                             v = 'user';
851                                             break;
852                                         case 2:
853                                             v = 'admin';
854                                             break;
855                                         default:
856                                             v = '';
857                                             break;
858                                     }
859                                     return String.format('{0}', v);
860                                 }
861                             },
862                             {
863                                 xtype: 'ColumnModel',
864                                 xns: Roo.grid,
865                                 dataIndex : 'is_allow_booking',
866                                 header : 'Allow Booking?',
867                                 width : 75,
868                                 renderer : function(v) {  
869                                     var state = v * 1 > 0 ?  '-checked' : '';
870                                 
871                                     return '<img class="x-grid-check-icon' + state + '" src="' + Roo.BLANK_IMAGE_URL + '"/>';
872                                                 
873                                  }
874                             },
875                             {
876                                 xtype: 'ColumnModel',
877                                 xns: Roo.grid,
878                                 dataIndex : 'total_value',
879                                 header : 'Total $ value',
880                                 width : 75,
881                                 renderer : function(v) { return String.format('{0}', v); }
882                             }
883                         ]
884                     }
885                 }
886             ],
887             center : {
888                 xtype: 'LayoutRegion',
889                 xns: Roo
890             }
891         });
892     }
893 };