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