ce12f2cf041bb0f6e1c71f0cee9b64ada1034ffb
[roojs1] / examples / bootstrap / dashboard3.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 dashboard3 = new Roo.XComponent({
6
7  _strings : {
8   '1f9ff97aa2f49a79388004e1e57f2320' :"New Orders ",
9   'fc0d5184491559c092364744b2247373' :"first tab",
10   '30bd2ce65d1e43e9c498b7d5d49f3b78' :"Dashboard <small>  Example Control panel </small>",
11   'b73ce398c39f506af761d2277d853a92' :"160",
12   '7ef605fc8dba5425d6965fbd4c8fbe1f' :"150",
13   '70ce2e7a27cab2a670ca954f8362e19f' :"tab 2 content",
14   'f3ff0ceca73743a13990e970c318fc36' :"<span class=\"glyphicon glyphicon-chevron-left\"></span>",
15   '34ae6773410925b4574e656be194f0ad' :"income",
16   'e864378363f435160e7c2209cc2949b7' :"<span class=\"glyphicon glyphicon-chevron-right\"></span>",
17   '1d17cb9923b99f823da9f5a16dc460e5' :"Department",
18   '222a267cc5778206b253be35ee3ddab5' :"Current",
19   'c4f5a294a273c3a1c97642a76f15c5c7' :"tab 1",
20   '2d0175894e0fe09186d38fe7a7160294' :"second tab",
21   '1b9b097340a24b31632ed601a9107832' :"This is a random string ",
22   '9fc10133312e352754f8ca264a3e272d' :"New Orders",
23   '9a7b64c98b066602b21f869ae7cd673a' :"test 1",
24   '58a00f6a3da23fc3821f24115493b750' :"tab 2",
25   '3c8d74bd7be3168fe440d9c85da42be8' :"<b> Alert </b> test alert",
26   'd80590035c13589acfbdd2b2dcb60773' :"Aspire"
27  },
28
29   part     :  ["bootstrap", "dashboard3" ],
30   order    : '001-dashboard-',
31   region   : 'center',
32   parent   : false,
33   name     : "unnamed module",
34   disabled : false, 
35   permname : '', 
36   _tree : function()
37   {
38    var _this = this;
39    var MODULE = this;
40    return {
41    '|xns' : 'Roo.bootstrap',
42    cls : 'skin-blue',
43    xns : Roo.bootstrap,
44    xtype : 'Body',
45    items : [
46     Roo.apply(Dashboard.Header1._tree(), {
47      '|xns' : 'Roo.bootstrap',
48      cls : 'header',
49      tag : 'header',
50      xns : Roo.bootstrap,
51      xtype : 'Container'
52     }),
53     {
54      '|xns' : 'Roo.bootstrap',
55      cls : 'wrapper row-offcanvas row-offcanvas-left',
56      'flexy:include' : 'Sidebar.html',
57      xns : Roo.bootstrap,
58      xtype : 'Container',
59      items : [
60       Roo.apply(Dashboard.Sidebar2._tree(), {
61        '|xns' : 'Roo.bootstrap',
62        cls : 'left-side sidebar-offcanvas',
63        tag : 'aside',
64        xns : Roo.bootstrap,
65        xtype : 'Container'
66       }),
67       {
68        '|xns' : 'Roo.bootstrap',
69        cls : 'right-side',
70        tag : 'aside',
71        xns : Roo.bootstrap,
72        xtype : 'Container',
73        items : [
74         {
75          '|xns' : 'Roo.bootstrap',
76          cls : 'content-header',
77          tag : 'section',
78          xns : Roo.bootstrap,
79          xtype : 'Container',
80          items : [
81           {
82            '|xns' : 'Roo.bootstrap',
83            html : _this._strings['30bd2ce65d1e43e9c498b7d5d49f3b78'],
84            xns : Roo.bootstrap,
85            xtype : 'Header'
86           }
87          ]
88
89         },
90         {
91          '|xns' : 'Roo.bootstrap',
92          cls : 'content',
93          tag : 'section',
94          xns : Roo.bootstrap,
95          xtype : 'Container',
96          items : [
97           {
98            '|xns' : 'Roo.bootstrap',
99            xns : Roo.bootstrap,
100            xtype : 'Container',
101            items : [
102             {
103              '|xns' : 'Roo.bootstrap',
104              lg : 3,
105              md : 3,
106              xns : Roo.bootstrap,
107              xtype : 'Column',
108              items : [
109               {
110                '|xns' : 'Roo.bootstrap.dash',
111                _aformat : _this._strings['1b9b097340a24b31632ed601a9107832'],
112                bgcolor : '',
113                cls : '',
114                headline : 160,
115                height : 150,
116                style : 'col-md-3',
117                title : _this._strings['1f9ff97aa2f49a79388004e1e57f2320'],
118                width : 'col-md-5',
119                xns : Roo.bootstrap.dash,
120                xtype : 'NumberBox'
121               }
122              ]
123
124             },
125             {
126              '|xns' : 'Roo.bootstrap',
127              lg : 3,
128              md : 3,
129              xns : Roo.bootstrap,
130              xtype : 'Column',
131              items : [
132               {
133                '|xns' : 'Roo.bootstrap.dash',
134                bgcolor : 'green',
135                cls : '',
136                headline : 150,
137                height : 150,
138                style : 'col-lg-3',
139                title : _this._strings['9fc10133312e352754f8ca264a3e272d'],
140                width : 'col-md-5',
141                xns : Roo.bootstrap.dash,
142                xtype : 'NumberBox'
143               }
144              ]
145
146             },
147             {
148              '|xns' : 'Roo.bootstrap',
149              lg : 3,
150              md : 3,
151              xns : Roo.bootstrap,
152              xtype : 'Column',
153              items : [
154               {
155                '|xns' : 'Roo.bootstrap.dash',
156                bgcolor : 'yellow',
157                headline : 150,
158                height : 150,
159                style : 'col-lg-3',
160                title : _this._strings['9fc10133312e352754f8ca264a3e272d'],
161                width : 'col-md-5',
162                xns : Roo.bootstrap.dash,
163                xtype : 'NumberBox'
164               }
165              ]
166
167             },
168             {
169              '|xns' : 'Roo.bootstrap',
170              lg : 3,
171              md : 3,
172              xns : Roo.bootstrap,
173              xtype : 'Column',
174              items : [
175               {
176                '|xns' : 'Roo.bootstrap.dash',
177                bgcolor : 'red',
178                headline : 150,
179                height : 150,
180                style : 'col-lg-3',
181                title : _this._strings['9fc10133312e352754f8ca264a3e272d'],
182                width : '',
183                xns : Roo.bootstrap.dash,
184                xtype : 'NumberBox'
185               }
186              ]
187
188             }
189            ]
190
191           },
192           {
193            '|xns' : 'Roo.bootstrap',
194            xns : Roo.bootstrap,
195            xtype : 'Row',
196            items : [
197             {
198              '|xns' : 'Roo.bootstrap',
199              alert : 'danger',
200              fa : 'ban',
201              html : _this._strings['3c8d74bd7be3168fe440d9c85da42be8'],
202              xns : Roo.bootstrap,
203              xtype : 'Container'
204             }
205            ]
206
207           },
208           {
209            '|xns' : 'Roo.bootstrap',
210            xns : Roo.bootstrap,
211            xtype : 'Row',
212            items : [
213             {
214              '|xns' : 'Roo.bootstrap',
215              lg : 6,
216              md : 6,
217              sm : 12,
218              style : '',
219              xns : Roo.bootstrap,
220              xtype : 'Column',
221              items : [
222               {
223                '|xns' : 'Roo.bootstrap.dash',
224                title : _this._strings['9a7b64c98b066602b21f869ae7cd673a'],
225                xns : Roo.bootstrap.dash,
226                xtype : 'TabBox',
227                listeners : {
228                 render : function (_self)
229                  {
230                      _this.testbox = _self;
231                  }
232                },
233                items : [
234                 {
235                  '|xns' : 'Roo.bootstrap.dash',
236                  title : _this._strings['c4f5a294a273c3a1c97642a76f15c5c7'],
237                  xns : Roo.bootstrap.dash,
238                  xtype : 'TabPane',
239                  items : [
240                   {
241                    '|xns' : 'Roo.bootstrap',
242                    xns : Roo.bootstrap,
243                    xtype : 'Column',
244                    items : [
245                     {
246                      store : {
247                       '|xns' : 'Roo.data',
248                       data : [
249                         [ 'A TEST', '1', '0' ],
250                         
251                           [ 'B test', '1', '0' ],
252                             [ 'C test', '1', '0' ],
253                           [ 'D test', '1', '0' ]
254                       ],
255                       fields : [ 'display_name', 'current', 'aspire' ],
256                       isLocal : true,
257                       xns : Roo.data,
258                       xtype : 'SimpleStore'
259                      },
260                      '|xns' : 'Roo.bootstrap',
261                      CellSelection : true,
262                      RowSelection : true,
263                      xns : Roo.bootstrap,
264                      xtype : 'Table',
265                      cm : [
266                        {
267                         '|xns' : 'Roo.grid',
268                         dataIndex : 'display_name',
269                         header : _this._strings['1d17cb9923b99f823da9f5a16dc460e5'],
270                         xns : Roo.grid,
271                         xtype : 'ColumnModel'
272                        },
273 {
274                         '|xns' : 'Roo.grid',
275                         dataIndex : 'current',
276                         header : _this._strings['222a267cc5778206b253be35ee3ddab5'],
277                         renderer : function(v) {  
278                         
279                             var state = v> 0 ?  '-checked' : '';
280                         
281                             return v*1  > 0 ? 'X' : '-';             
282                                         
283                          },
284                         xns : Roo.grid,
285                         xtype : 'ColumnModel'
286                        },
287 {
288                         '|xns' : 'Roo.grid',
289                         dataIndex : 'aspire',
290                         header : _this._strings['d80590035c13589acfbdd2b2dcb60773'],
291                         renderer : function(v) {  
292                             var state = v> 0 ?  '-checked' : '';
293                             return v*1  > 0 ? 'X' : '-';             
294                          },
295                         xns : Roo.grid,
296                         xtype : 'ColumnModel'
297                        }
298                      ],
299                      listeners : {
300                       cellclick : function (_self, el, rowIndex, columnIndex, e)
301                        {
302                            
303                        
304                            var cm = this.colModel.getColumnById(this.colModel.getColumnId(columnIndex));
305                            if (cm.dataIndex == 'current') {
306                                var rec = _this.listTable.ds.getAt(rowIndex);
307                                
308                                rec.set('current', rec.data.current * 1 ? '0' : '1');
309                        
310                                //_this.listTable.ds.fireEvent("datachanged", this);
311                                rec.commit();
312                                return;
313                            }
314                              if (cm.dataIndex == 'aspire') {
315                                var rec = _this.listTable.ds.getAt(rowIndex);
316                                
317                                rec.set('aspire', rec.data.aspire * 1 ? '0' : '1');
318                        
319                                //_this.listTable.ds.fireEvent("datachanged", this);
320                                rec.commit();
321                                return;
322                            }
323                        
324                             
325                        },
326                       render : function (_self)
327                        {
328                             _this.listTable = _self;
329                            (function() { _self.store.load({}); }).defer(100)
330                        }
331                      },
332                      items : [
333
334                      ]
335
336                     }
337                    ]
338
339                   }
340                  ]
341
342                 },
343                 {
344                  '|xns' : 'Roo.bootstrap.dash',
345                  title : _this._strings['58a00f6a3da23fc3821f24115493b750'],
346                  xns : Roo.bootstrap.dash,
347                  xtype : 'TabPane',
348                  items : [
349                   {
350                    '|xns' : 'Roo.bootstrap',
351                    html : _this._strings['70ce2e7a27cab2a670ca954f8362e19f'],
352                    xns : Roo.bootstrap,
353                    xtype : 'Column'
354                   }
355                  ]
356
357                 }
358                ]
359
360               }
361              ]
362
363             },
364             {
365              '|xns' : 'Roo.bootstrap',
366              lg : 6,
367              md : 6,
368              sm : 12,
369              style : '',
370              xns : Roo.bootstrap,
371              xtype : 'Column',
372              items : [
373               {
374                '|xns' : 'Roo.bootstrap',
375                cls : 'nav-tabs-custom',
376                xns : Roo.bootstrap,
377                xtype : 'Container',
378                items : [
379                 {
380                  '|xns' : 'Roo.bootstrap',
381                  html : _this._strings['34ae6773410925b4574e656be194f0ad'],
382                  style : 'margin: 10,10,0,0',
383                  xns : Roo.bootstrap,
384                  xtype : 'Header'
385                 }
386                ]
387
388               }
389              ]
390
391             }
392            ]
393
394           },
395           {
396            '|xns' : 'Roo.bootstrap',
397            xns : Roo.bootstrap,
398            xtype : 'Row',
399            items : [
400             {
401              '|xns' : 'Roo.bootstrap',
402              lg : 6,
403              md : 6,
404              sm : 12,
405              style : '',
406              xns : Roo.bootstrap,
407              xtype : 'Column',
408              items : [
409               {
410                '|xns' : 'Roo.bootstrap.dash',
411                title : _this._strings['9a7b64c98b066602b21f869ae7cd673a'],
412                xns : Roo.bootstrap.dash,
413                xtype : 'TabBox',
414                listeners : {
415                 render : function (_self)
416                  {
417                      _this.testbox = _self;
418                  }
419                },
420                items : [
421                 {
422                  '|xns' : 'Roo.bootstrap.dash',
423                  title : _this._strings['c4f5a294a273c3a1c97642a76f15c5c7'],
424                  xns : Roo.bootstrap.dash,
425                  xtype : 'TabPane',
426                  items : [
427                   {
428                    '|xns' : 'Roo.bootstrap',
429                    xns : Roo.bootstrap,
430                    xtype : 'Column'
431                   }
432                  ]
433
434                 },
435                 {
436                  '|xns' : 'Roo.bootstrap.dash',
437                  title : _this._strings['58a00f6a3da23fc3821f24115493b750'],
438                  xns : Roo.bootstrap.dash,
439                  xtype : 'TabPane',
440                  items : [
441                   {
442                    '|xns' : 'Roo.bootstrap',
443                    html : _this._strings['70ce2e7a27cab2a670ca954f8362e19f'],
444                    xns : Roo.bootstrap,
445                    xtype : 'Column'
446                   }
447                  ]
448
449                 }
450                ]
451
452               }
453              ]
454
455             },
456             {
457              '|xns' : 'Roo.bootstrap',
458              lg : 6,
459              md : 6,
460              sm : 12,
461              style : '',
462              xns : Roo.bootstrap,
463              xtype : 'Column',
464              items : [
465               {
466                '|xns' : 'Roo.bootstrap',
467                cls : 'nav-tabs-custom',
468                xns : Roo.bootstrap,
469                xtype : 'Container',
470                items : [
471                 {
472                  '|xns' : 'Roo.bootstrap',
473                  html : _this._strings['34ae6773410925b4574e656be194f0ad'],
474                  style : 'margin: 10,10,0,0',
475                  xns : Roo.bootstrap,
476                  xtype : 'Header'
477                 }
478                ]
479
480               }
481              ]
482
483             }
484            ]
485
486           },
487           {
488            '|xns' : 'Roo.bootstrap',
489            xns : Roo.bootstrap,
490            xtype : 'Row',
491            items : [
492             {
493              '|xns' : 'Roo.bootstrap',
494              carousel : true,
495              lg : 12,
496              navId : '#sample1',
497              xns : Roo.bootstrap,
498              xtype : 'TabGroup',
499              listeners : {
500               render : function (_self)
501                {
502                    _this.tabgroup = _self;
503                }
504              },
505              items : [
506               {
507                '|xns' : 'Roo.bootstrap',
508                active : true,
509                cls : 'item',
510                navId : '#sample1',
511                tabId : '#second',
512                xns : Roo.bootstrap,
513                xtype : 'TabPanel',
514                listeners : {
515                 render : function (_self)
516                  {
517                  _this.tab_second = _self;
518                  }
519                },
520                items : [
521                 {
522                  '|xns' : 'Roo.bootstrap',
523                  html : _this._strings['fc0d5184491559c092364744b2247373'],
524                  level : 3,
525                  xns : Roo.bootstrap,
526                  xtype : 'Header'
527                 },
528                 {
529                  '|xns' : 'Roo.bootstrap',
530                  style : 'padding-left:50px;padding-right:50px;',
531                  well : 'md',
532                  xns : Roo.bootstrap,
533                  xtype : 'Container',
534                  items : [
535                   {
536                    '|xns' : 'Roo.bootstrap',
537                    xns : Roo.bootstrap,
538                    xtype : 'Row',
539                    items : [
540                     {
541                      '|xns' : 'Roo.bootstrap',
542                      md : 6,
543                      xns : Roo.bootstrap,
544                      xtype : 'Column',
545                      items : [
546                       {
547                        '|xns' : 'Roo.bootstrap',
548                        allowBlank : true,
549                        fieldLabel : 'Some input',
550                        labelAlign : 'top',
551                        name : 'chosen_title',
552                        xns : Roo.bootstrap,
553                        xtype : 'Input'
554                       }
555                      ]
556
557                     }
558                    ]
559
560                   }
561                  ]
562
563                 }
564                ]
565
566               },
567               {
568                '|xns' : 'Roo.bootstrap',
569                active : false,
570                cls : 'item',
571                navId : '#sample1',
572                tabId : '#first',
573                xns : Roo.bootstrap,
574                xtype : 'TabPanel',
575                listeners : {
576                 render : function (_self)
577                  {
578                  _this.tab_first = _self;
579                  }
580                },
581                items : [
582                 {
583                  '|xns' : 'Roo.bootstrap',
584                  html : _this._strings['2d0175894e0fe09186d38fe7a7160294'],
585                  level : 3,
586                  xns : Roo.bootstrap,
587                  xtype : 'Header'
588                 },
589                 {
590                  '|xns' : 'Roo.bootstrap',
591                  style : 'padding-left:50px;padding-right:50px;',
592                  well : 'md',
593                  xns : Roo.bootstrap,
594                  xtype : 'Container',
595                  items : [
596                   {
597                    '|xns' : 'Roo.bootstrap',
598                    xns : Roo.bootstrap,
599                    xtype : 'Row',
600                    items : [
601                     {
602                      '|xns' : 'Roo.bootstrap',
603                      md : 6,
604                      xns : Roo.bootstrap,
605                      xtype : 'Column',
606                      items : [
607                       {
608                        '|xns' : 'Roo.bootstrap',
609                        allowBlank : true,
610                        fieldLabel : 'This is a label',
611                        labelAlign : 'top',
612                        name : 'chosen_title',
613                        xns : Roo.bootstrap,
614                        xtype : 'Input'
615                       }
616                      ]
617
618                     }
619                    ]
620
621                   }
622                  ]
623
624                 }
625                ]
626
627               },
628               {
629                '|xns' : 'Roo.bootstrap',
630                cls : 'carousel-control left',
631                html : _this._strings['f3ff0ceca73743a13990e970c318fc36'],
632                preventDefault : true,
633                xns : Roo.bootstrap,
634                xtype : 'Link',
635                listeners : {
636                 click : function (e)
637                  {
638                      _this.tabgroup.showPanelPrev();
639                  }
640                }
641               },
642               {
643                '|xns' : 'Roo.bootstrap',
644                cls : 'carousel-control right',
645                html : _this._strings['e864378363f435160e7c2209cc2949b7'],
646                preventDefault : true,
647                xns : Roo.bootstrap,
648                xtype : 'Link',
649                listeners : {
650                 click : function (e)
651                  {
652                        _this.tabgroup.showPanelNext();
653                  }
654                }
655               }
656              ]
657
658             }
659            ]
660
661           }
662          ]
663
664         }
665        ]
666
667       }
668      ]
669
670     }
671    ]
672
673   };  }
674 });