3662fcc894a1ebe2913bc0bc08558526565329a2
[roojs1] / examples / grid / viewpanel.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5
6
7 Roo.onReady(function(){
8     var viewpanel = new Roo.XComponent({
9         part     :  ["Hebe","Members"],
10         order    : '001-Pman.Tab.Members',
11         region   : 'center',
12         parent   : '#view',
13         name     : "unnamed module",
14         disabled : false, 
15         permname : '', 
16         _tree : function()
17         {
18             var _this = this;
19             var MODULE = this;
20             return {
21                 xtype: 'NestedLayoutPanel',
22                 xns: Roo,
23                 layout : {
24                     xtype: 'BorderLayout',
25                     xns: Roo,
26                     items : [
27                         {
28                             xtype: 'GridPanel',
29                             xns: Roo,
30                             listeners : {
31                                 activate : function() {
32                                     _this.panel = this;
33                                     if (_this.grid) {
34                                         _this.grid.footer.onClick('first');
35                                     }
36                                 }
37                             },
38                             background : false,
39                             fitContainer : true,
40                             fitToframe : true,
41                             region : 'center',
42                             tableName : 'members',
43                             title : "Members",
44                             grid : {
45                                 xtype: 'Grid',
46                                 xns: Roo.grid,
47                                 listeners : {
48                                     render : function() 
49                                     {
50                                         _this.grid = this; 
51                                         //_this.dialog = Pman.Dialog.FILL_IN
52                                         if (_this.panel.active) {
53                                         this.footer.onClick('first');
54                                         }
55                                     },
56                                     rowdblclick : function (_self, rowIndex, e)
57                                     {
58
59                                         Roo.log(this.getDataSource().getAt(rowIndex).json.code);
60                                         _this.selectedCode = this.getDataSource().getAt(rowIndex).json.id;
61                                         _this.member_cp.region.showPanel(1);
62
63                                         /*if (!_this.dialog) return;
64
65                                         _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
66                                             _this.grid.footer.onClick('first');
67                                         }); */
68                                     },
69                                     rowclick : function (_self, rowIndex, e)
70                                     {
71                                         _this.selectedCode = this.getDataSource().getAt(rowIndex).json.id;
72                                     }
73                                 },
74                                 loadMask : true,
75                                 dataSource : {
76                                     xtype: 'Store',
77                                     xns: Roo.data,
78                                     listeners : {
79                                         beforeload : function (_self, options)
80                                         {
81                                             options.params = options.params || {};
82                                             //options.params._search = _this.searchBox.getValue();
83
84                                             options.params['find[code]'] = _this.searchBox.getValue();
85                                             for(var k in _this.pages) {
86                                                 if (!_this.pages[k].pressed) {
87                                                     continue;
88                                                 }
89                                                 switch(k) {
90                                                     case 'members':
91                                                         //options.params['find[code]'] = _this.searchBox.getValue();
92                                                         break;
93                                                     case 'contractors':
94                                                         options.params['find[type]'] = 'CN';
95                                                         break;
96                                                     case 'staff':
97                                                         options.params['find[type]'] = 'X';
98                                                         break;
99                                                 }
100
101                                             }
102
103                                         }
104                                     },
105                                     remoteSort : true,
106                                     sortInfo : { field : 'code', direction: 'ASC' },
107                                     proxy : {
108                                         xtype: 'HttpProxy',
109                                         xns: Roo.data,
110                                         method : 'GET',
111                                         url : baseURL + '/Roo/members.php'
112                                     },
113                                     reader : {
114                                         xtype: 'JsonReader',
115                                         xns: Roo.data,
116                                         totalProperty : 'total',
117                                         root : 'data',
118                                         id : 'id',
119                                         fields : [
120                                             {
121                                                 'name': 'id',
122                                                 'type': 'int'
123                                             },
124                                             {
125                                                 'name': 'code',
126                                                 'type': 'string'
127                                             },
128                                             {
129                                                 'name': 'member_type',
130                                                 'type': 'int'
131                                             },
132                                             {
133                                                 'name': 'status',
134                                                 'type': 'int'
135                                             },
136                                             {
137                                                 'name': 'card_no',
138                                                 'type': 'string'
139                                             },
140                                             {
141                                                 'name': 'card_issued',
142                                                 'type': 'date',
143                                                 'dateFormat': 'Y-m-d'
144                                             },
145                                             {
146                                                 'name': 'title',
147                                                 'type': 'string'
148                                             },
149                                             {
150                                                 'name': 'name',
151                                                 'type': 'string'
152                                             },
153                                             {
154                                                 'name': 'name_zh',
155                                                 'type': 'string'
156                                             },
157                                             {
158                                                 'name': 'sex',
159                                                 'type': 'string'
160                                             },
161                                             {
162                                                 'name': 'birth_date',
163                                                 'type': 'date',
164                                                 'dateFormat': 'Y-m-d'
165                                             },
166                                             {
167                                                 'name': 'hkid',
168                                                 'type': 'string'
169                                             },
170                                             {
171                                                 'name': 'passport',
172                                                 'type': 'string'
173                                             },
174                                             {
175                                                 'name': 'nationality',
176                                                 'type': 'string'
177                                             },
178                                             {
179                                                 'name': 'children',
180                                                 'type': 'int'
181                                             },
182                                             {
183                                                 'name': 'correspond',
184                                                 'type': 'int'
185                                             },
186                                             {
187                                                 'name': 'married',
188                                                 'type': 'string'
189                                             },
190                                             {
191                                                 'name': 'email_bills',
192                                                 'type': 'string'
193                                             },
194                                             {
195                                                 'name': 'email_promo',
196                                                 'type': 'string'
197                                             },
198                                             {
199                                                 'name': 'image',
200                                                 'type': 'string'
201                                             },
202                                             {
203                                                 'name': 'proposer',
204                                                 'type': 'int'
205                                             },
206                                             {
207                                                 'name': 'seconder',
208                                                 'type': 'int'
209                                             },
210                                             {
211                                                 'name': 'applied',
212                                                 'type': 'date',
213                                                 'dateFormat': 'Y-m-d'
214                                             },
215                                             {
216                                                 'name': 'application_number',
217                                                 'type': 'int'
218                                             },
219                                             {
220                                                 'name': 'remarks',
221                                                 'type': 'string'
222                                             },
223                                             {
224                                                 'name': 'use_autopay',
225                                                 'type': 'string'
226                                             },
227                                             {
228                                                 'name': 'bank',
229                                                 'type': 'string'
230                                             },
231                                             {
232                                                 'name': 'account',
233                                                 'type': 'string'
234                                             },
235                                             {
236                                                 'name': 'limit_amount',
237                                                 'type': 'float'
238                                             },
239                                             {
240                                                 'name': 'account_name',
241                                                 'type': 'string'
242                                             },
243                                             {
244                                                 'name': 'bill_address',
245                                                 'type': 'string'
246                                             },
247                                             {
248                                                 'name': 'outstanding',
249                                                 'type': 'float'
250                                             },
251                                             {
252                                                 'name': 'year_total',
253                                                 'type': 'float'
254                                             },
255                                             {
256                                                 'name': 'month_total',
257                                                 'type': 'float'
258                                             },
259                                             {
260                                                 'name': 'brought_forward',
261                                                 'type': 'float'
262                                             },
263                                             {
264                                                 'name': 'hkarea',
265                                                 'type': 'string'
266                                             },
267                                             {
268                                                 'name': 'last_payment_due',
269                                                 'type': 'date',
270                                                 'dateFormat': 'Y-m-d'
271                                             },
272                                             {
273                                                 'name': 'join_date',
274                                                 'type': 'date',
275                                                 'dateFormat': 'Y-m-d'
276                                             },
277                                             {
278                                                 'name': 'deposit_note',
279                                                 'type': 'string'
280                                             },
281                                             {
282                                                 'name': 'has_wireless',
283                                                 'type': 'int'
284                                             },
285                                             {
286                                                 'name': 'status_id',
287                                                 'type': 'int'
288                                             },
289                                             {
290                                                 'name': 'status_name',
291                                                 'type': 'string'
292                                             },
293                                             {
294                                                 'name': 'status_short_name',
295                                                 'type': 'string'
296                                             },
297                                             {
298                                                 'name': 'member_type_id',
299                                                 'type': 'int'
300                                             },
301                                             {
302                                                 'name': 'member_type_charge_code',
303                                                 'type': 'string'
304                                             },
305                                             {
306                                                 'name': 'member_type_name',
307                                                 'type': 'string'
308                                             }
309                                         ]
310                                     }
311                                 },
312                                 footer : {
313                                     xtype: 'PagingToolbar',
314                                     xns: Roo,
315                                     pageSize : 25,
316                                     displayInfo : true,
317                                     displayMsg : "Displaying members{0} - {1} of {2}",
318                                     emptyMsg : "No members found"
319                                 },
320                                 toolbar : {
321                                     xtype: 'Toolbar',
322                                     xns: Roo,
323                                     items : [
324                                         {
325                                             xtype: 'TextField',
326                                             xns: Roo.form,
327                                             listeners : {
328                                                 render : function (_self)
329                                                 {
330                                                 _this.searchBox=  _self;
331                                                 },
332                                                 specialkey : function (_self, e)
333                                                 {
334                                                 _this.grid.footer.onClick('first');
335                                                 }
336                                             }
337                                         },
338                                         {
339                                             xtype: 'Button',
340                                             xns: Roo.Toolbar,
341                                             listeners : {
342                                                 click : function (_self, e)
343                                                 {
344                                                 _this.grid.footer.onClick('first');
345                                                 }
346                                             },
347                                             cls : 'x-btn-icon',
348                                             icon : rootURL + '/Pman/templates/images/search.gif'
349                                         },
350                                         {
351                                             xtype: 'Button',
352                                             xns: Roo.Toolbar,
353                                             listeners : {
354                                                 click : function (_self, e)
355                                                 {
356                                                     _this.searchBox.setValue('');
357
358                                                     _this.grid.footer.onClick('first');
359                                                 }
360                                             },
361                                             cls : 'x-btn-icon',
362                                             icon : rootURL + '/Pman/templates/images/edit-clear.gif'
363                                         },
364                                         {
365                                             xtype: 'Separator',
366                                             xns: Roo.Toolbar
367                                         },
368                                         {
369                                             xtype: 'Button',
370                                             xns: Roo.Toolbar,
371                                             listeners : {
372                                                 render : function (_self)
373                                                 {
374                                                     _this.pages = _this.pages || {};
375                                                     _this.pages['members'] = _self;
376                                                 },
377                                                 click : function (_self, e)
378                                                 {
379                                                 _this.grid.footer.onClick('first');
380                                                 }
381                                             },
382                                             enableToggle : true,
383                                             pressed : true,
384                                             text : "Members",
385                                             toggleGroup : 'pages'
386                                         },
387                                         {
388                                             xtype: 'Button',
389                                             xns: Roo.Toolbar,
390                                             listeners : {
391                                                 render : function (_self)
392                                                 {
393                                                     _this.pages = _this.pages || {};
394                                                     _this.pages['contractors'] = _self;
395                                                 },
396                                                 click : function (_self, e)
397                                                 {
398                                                 _this.grid.footer.onClick('first');
399                                                 }
400                                             },
401                                             enableToggle : true,
402                                             pressed : false,
403                                             text : "Contractors",
404                                             toggleGroup : 'pages'
405                                         },
406                                         {
407                                             xtype: 'Button',
408                                             xns: Roo.Toolbar,
409                                             listeners : {
410                                                 render : function (_self)
411                                                 {
412                                                     _this.pages = _this.pages || {};
413                                                     _this.pages['staff'] = _self;
414                                                 },
415                                                 click : function (_self, e)
416                                                 {
417                                                 _this.grid.footer.onClick('first');
418                                                 }
419                                             },
420                                             enableToggle : true,
421                                             pressed : false,
422                                             text : "Staff",
423                                             toggleGroup : 'pages'
424                                         },
425                                         {
426                                             xtype: 'Fill',
427                                             xns: Roo.Toolbar
428                                         },
429                                         {
430                                             xtype: 'Button',
431                                             xns: Roo.Toolbar,
432                                             listeners : {
433                                                 click : function()
434                                                 {
435                                                 //    if (!_this.dialog) return;
436
437                                                     for(var k in _this.pages) {
438                                                         if (!_this.pages[k].pressed) {
439                                                             continue;
440                                                         }
441                                                         switch(k) {
442                                                             case 'members':
443                                                                 Pman.Dialog.Member.show( { id : 0 } , function() { _this.grid.footer.onClick('first'); });
444                                                                 break;
445                                                             case 'contractors':
446                                                                 Pman.Dialog.Contractor.show( { id : 0 } , function() { _this.grid.footer.onClick('first'); });
447                                                                 break;
448                                                             case 'staff':
449                                                                 Pman.Dialog.Member.show( { member_code : 'X' } , function() { _this.grid.footer.onClick('first'); });
450                                                                 break;
451                                                         }
452
453                                                     }
454                                                 /*    _this.dialog.show( { id : 0 } , function() {
455                                                         _this.grid.footer.onClick('first');
456                                                 }); */
457                                                 }
458                                             },
459                                             cls : 'x-btn-text-icon',
460                                             text : "Add",
461                                             icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
462                                         }
463                                     ]
464                                 },
465                                 colModel : [
466                                     {
467                                         xtype: 'ColumnModel',
468                                         xns: Roo.grid,
469                                         dataIndex : 'code',
470                                         header : 'Code',
471                                         width : 60,
472                                         renderer : function(v) { return String.format('{0}', v); }
473                                     },
474                                     {
475                                         xtype: 'ColumnModel',
476                                         xns: Roo.grid,
477                                         dataIndex : 'name',
478                                         header : 'Name',
479                                         width : 150,
480                                         renderer : function(v) { return String.format('{0}', v); }
481                                     },
482                                     {
483                                         xtype: 'ColumnModel',
484                                         xns: Roo.grid,
485                                         dataIndex : 'name_zh',
486                                         header : 'Name zh',
487                                         width : 150,
488                                         renderer : function(v) { return String.format('{0}', v); }
489                                     },
490                                     {
491                                         xtype: 'ColumnModel',
492                                         xns: Roo.grid,
493                                         dataIndex : 'status_name',
494                                         header : 'Status',
495                                         width : 100,
496                                         renderer : function(v) { return String.format('{0}', v); }
497                                     },
498                                     {
499                                         xtype: 'ColumnModel',
500                                         xns: Roo.grid,
501                                         dataIndex : 'member_type_name',
502                                         header : 'Member type',
503                                         width : 100,
504                                         renderer : function(v) { return String.format('{0}', v); }
505                                     },
506                                     {
507                                         xtype: 'ColumnModel',
508                                         xns: Roo.grid,
509                                         dataIndex : 'hkarea',
510                                         header : 'HK Area',
511                                         width : 100,
512                                         renderer : function(v) { return String.format('{0}', v); }
513                                     },
514                                     {
515                                         xtype: 'ColumnModel',
516                                         xns: Roo.grid,
517                                         dataIndex : 'correspond_address',
518                                         header : 'Address',
519                                         width : 200,
520                                         renderer : function(v) { return String.format('{0}', v).replace(/\n/g,'<br/>'); }
521                                     }
522                                 ]
523                             }
524                         },
525                         {
526                             xtype: 'ContentPanel',
527                             xns: Roo,
528                             listeners : {
529                                 render : function (_self)
530                                 {
531                                 _this.member_cp = _self; 
532                                 return;
533                                 },
534                                 activate : function (_self)
535                                 {
536                                 /* try {
537                                         var id = _this.form.findField('id').getValue() * 1;
538                                         if (!id) {
539                                             throw "oops";
540                                         }
541                                     } catch(e) {
542                                         _this.cp.region.showPanel(0);
543                                         return;
544                                     }
545                                     if(!_this.cp_form){
546                                         return;
547                                     }
548                                     */
549                                     if(!_this.selectedCode){
550                                         //_this.panel.layout.getRegion('center').showPanel(0);
551                                         return;
552                                     }
553                                     this.load({
554                                         url: baseURL + '/backend/members_view/'+_this.selectedCode+'.html?body_only=1',
555                                         scripts: false,
556                                         method: 'GET'
557                                     });
558
559                                 }
560                             },
561                             autoScroll : true,
562                             fitToFrame : true,
563                             region : 'center',
564                             title : "Details",
565                             items : [
566                                 {
567                                     xtype: 'Form',
568                                     xns: Roo.form,
569                                     listeners : {
570                                         actioncomplete : function(_self,action)
571                                         {
572                                             if (action.type == 'setdata') {
573
574                                                 Roo.log('setdata');
575
576                                             return;
577                                             }
578                                             if (action.type == 'load') {
579                                                 Roo.log('load');
580
581                                                 return;
582                                             }
583                                             if (action.type =='submit') {
584
585                                                 return;
586                                             }
587                                         },
588                                         rendered : function (form)
589                                         {
590                                             _this.cp_form= form;
591
592
593                                         }
594                                     },
595                                     method : 'POST',
596                                     style : 'margin:10px;',
597                                     items : [
598                                         {
599                                             xtype: 'Hidden',
600                                             xns: Roo.form,
601                                             name : 'id'
602                                         }
603                                     ]
604                                 }
605                             ],
606                             toolbar : {
607                                 xtype: 'Toolbar',
608                                 xns: Roo,
609                                 items : [
610                                     {
611                                         xtype: 'Separator',
612                                         xns: Roo.Toolbar
613                                     },
614                                     {
615                                         xtype: 'Button',
616                                         xns: Roo.Toolbar,
617                                         listeners : {
618                                             click : function (_self, e)
619                                             {
620
621                                                 for(var k in _this.pages) {
622                                                     if (!_this.pages[k].pressed) {
623                                                         continue;
624                                                     }
625                                                     switch(k) {
626                                                         case 'contractors':
627                                                             Pman.Dialog.Contractor.show( { id : _this.selectedCode } , function() { _this.grid.footer.onClick('first'); });
628                                                             break;
629                                                         case 'members':
630                                                         case 'staff':
631                                                             Pman.Dialog.Member.show( { id : _this.selectedCode } , function() { _this.grid.footer.onClick('first'); });
632                                                             break;
633                                                     }
634
635                                                 }
636                                             }
637                                         },
638                                         text : "Edit"
639                                     },
640                                     {
641                                         xtype: 'Fill',
642                                         xns: Roo.Toolbar
643                                     }
644                                 ]
645                             }
646                         },
647                         {
648                             xtype: 'ContentPanel',
649                             xns: Roo,
650                             listeners : {
651                                 render : function (_self)
652                                 {
653                                 _this.accounting_cp = _self;
654                                 (function () { _this.member_cp.region.showPanel(0)} ).defer(100);
655                                 return;
656                                 },
657                                 activate : function (_self)
658                                 {
659                                 /* try {
660                                         var id = _this.form.findField('id').getValue() * 1;
661                                         if (!id) {
662                                             throw "oops";
663                                         }
664                                     } catch(e) {
665                                         _this.cp.region.showPanel(0);
666                                         return;
667                                     }
668                                     if(!_this.cp_form){
669                                         return;
670                                     }
671                                     */
672
673                                 /*    if(is_contractor){
674                                         _this.member_cp.region.showPanel(0);
675                                         return;
676                                     }*/
677                                     if(!_this.selectedCode){
678                                         //_this.panel.layout.getRegion('center').showPanel(0);
679                                         return;
680                                     }
681                                     _this.accounting_cp.load({
682                                         url: baseURL + '/edit2/member_accounts/'+_this.selectedCode+'.html?body_only=1',
683                                         scripts: false,
684                                         method: 'GET'
685                                     });
686                                 }
687                             },
688                             autoScroll : true,
689                             fitToFrame : true,
690                             region : 'center',
691                             title : "Accounting",
692                             items : [
693                                 {
694                                     xtype: 'Form',
695                                     xns: Roo.form,
696                                     listeners : {
697                                         actioncomplete : function(_self,action)
698                                         {
699                                             if (action.type == 'setdata') {
700
701                                                 Roo.log('setdata');
702
703                                             return;
704                                             }
705                                             if (action.type == 'load') {
706                                                 Roo.log('load');
707
708                                                 return;
709                                             }
710                                             if (action.type =='submit') {
711
712                                                 return;
713                                             }
714                                         },
715                                         rendered : function (form)
716                                         {
717                                             _this.cp_form= form;
718
719
720                                         }
721                                     },
722                                     method : 'POST',
723                                     style : 'margin:10px;',
724                                     items : [
725                                         {
726                                             xtype: 'Hidden',
727                                             xns: Roo.form,
728                                             name : 'id'
729                                         }
730                                     ]
731                                 }
732                             ],
733                             toolbar : {
734                                 xtype: 'Toolbar',
735                                 xns: Roo,
736                                 items : [
737                                     {
738                                         xtype: 'Button',
739                                         xns: Roo.Toolbar,
740                                         listeners : {
741                                             click : function (_self, e)
742                                             {
743                                                 _this.accounting_cp.load({
744                                                     url: baseURL + '/edit2/member_accounts/'+_this.selectedCode+'.html?body_only=1',
745                                                     scripts: false,
746                                                     method: 'GET'
747                                                 });
748                                             }
749                                         },
750                                         enableToggle : true,
751                                         pressed : true,
752                                         text : "Edit Bank Details",
753                                         toggleGroup : 'pages'
754                                     },
755                                     {
756                                         xtype: 'Button',
757                                         xns: Roo.Toolbar,
758                                         listeners : {
759                                             click : function (_self, e)
760                                             {
761                                                 _this.accounting_cp.load({
762                                                     url: baseURL + '/edit2/account_transaction/'+_this.selectedCode+'.html?body_only=1&isCredit=0',
763                                                     scripts: false,
764                                                     method: 'GET'
765                                                 });
766                                             }
767                                         },
768                                         enableToggle : true,
769                                         pressed : false,
770                                         text : "Add Bill or Charge",
771                                         toggleGroup : 'pages'
772                                     },
773                                     {
774                                         xtype: 'Button',
775                                         xns: Roo.Toolbar,
776                                         listeners : {
777                                             click : function (_self, e)
778                                             {
779                                                 _this.accounting_cp.load({
780                                                     url: baseURL + '/edit2/account_transaction/'+_this.selectedCode+'.html?body_only=1',
781                                                     scripts: false,
782                                                     method: 'GET'
783                                                 });
784                                             }
785                                         },
786                                         enableToggle : true,
787                                         pressed : false,
788                                         text : "Credit Member",
789                                         toggleGroup : 'pages'
790                                     },
791                                     {
792                                         xtype: 'Button',
793                                         xns: Roo.Toolbar,
794                                         listeners : {
795                                             click : function (_self, e)
796                                             {
797                                                 _this.accounting_cp.load({
798                                                     url: baseURL + '/backend/PromoCredits/'+_this.selectedCode+'.html?body_only=1',
799                                                     scripts: false,
800                                                     method: 'GET'
801                                                 });
802                                             }
803                                         },
804                                         enableToggle : true,
805                                         pressed : false,
806                                         text : "Promotional Credits",
807                                         toggleGroup : 'pages'
808                                     },
809                                     {
810                                         xtype: 'Button',
811                                         xns: Roo.Toolbar,
812                                         listeners : {
813                                             click : function (_self, e)
814                                             {
815                                                 _this.accounting_cp.load({
816                                                     url: baseURL + '/Accounts/viewBill/'+_this.selectedCode+'.html?body_only=1&isCredit=0',
817                                                     scripts: false,
818                                                     method: 'GET'
819                                                 });
820                                             }
821                                         },
822                                         enableToggle : true,
823                                         pressed : false,
824                                         text : "Bill",
825                                         toggleGroup : 'pages'
826                                     },
827                                     {
828                                         xtype: 'Button',
829                                         xns: Roo.Toolbar,
830                                         listeners : {
831                                             click : function (_self, e)
832                                             {
833                                                 _this.accounting_cp.load({
834                                                     url: baseURL + '/browse2/account_transaction.html?find[member]='+_this.selectedCode+'&find[payments]=no&body_only=1',
835                                                     scripts: false,
836                                                     method: 'GET'
837                                                 });
838                                             }
839                                         },
840                                         enableToggle : true,
841                                         pressed : false,
842                                         text : "Transactions",
843                                         toggleGroup : 'pages'
844                                     },
845                                     {
846                                         xtype: 'Button',
847                                         xns: Roo.Toolbar,
848                                         listeners : {
849                                             click : function (_self, e)
850                                             {
851                                                 _this.accounting_cp.load({
852                                                     url: baseURL + '/browse2/account_transaction.html?find[member]='+_this.selectedCode+'&find[payments]=yes&body_only=1',
853                                                     scripts: false,
854                                                     method: 'GET'
855                                                 });
856                                             }
857                                         },
858                                         enableToggle : true,
859                                         pressed : false,
860                                         text : "Payments",
861                                         toggleGroup : 'pages'
862                                     }
863                                 ]
864                             }
865                         }
866                     ],
867                     center : {
868                         xtype: 'LayoutRegion',
869                         xns: Roo
870                     }
871                 }
872             };
873         }
874     });
875
876
877     viewpanel.render('view');
878
879 });