examples/bootstrap/nested.html
[roojs1] / examples / bootstrap / nested.html
1 <!--
2
3 porting tst for layout classes from original roo library into bootstrap one.
4
5
6 -->
7 <html>
8 <head>
9   <title>Nested Layout</title>
10   
11    <!-- Bootstrap -->
12     <link rel="stylesheet" href="../../css-bootstrap/bootstrap.min.css">
13        
14     <link href="../../css-bootstrap/font-awesome.css" rel="stylesheet" type="text/css" />
15    
16     <link href="../../css-bootstrap/roojs-bootstrap-debug.css" rel="stylesheet" type="text/css" />
17     
18     <link href="../../../bootswatch/material-kit/css/material-kit.css" rel="stylesheet">
19
20     
21         
22     <script type="text/javascript" src="../../roojs-core-debug.js"></script>
23     <!-- bootstrap js.. needs to compile it later.. -->
24     <script type="text/javascript" src="../../roojs-bootstrap-debug.js"></script>
25
26   
27
28         <script type="text/javascript">
29
30 Roo.namespace("Dashboard");
31     </script>
32      
33          <script type="text/javascript" src="Dashboard.Header1.js"></script>
34
35      
36      
37      
38     <style type="text/css">
39 .navbar {
40     padding: 0;
41 }
42         </style>
43         <script type="text/javascript">
44
45 Roo.namespace("Example");
46
47 Example.Nested = new Roo.XComponent({
48     part     :  ["example", "nested" ],
49     order    : '001-Example-Nested',
50     region   : 'center',
51     parent   : false,
52     name     : "unnamed module",
53     disabled : false, 
54     permname : '', 
55     _tree : function()
56     {
57         var _this = this;
58         var MODULE = this;
59         return {
60             is_root : true,
61             xtype : 'Border',
62             xns : Roo.bootstrap.layout,
63             el : document.body, // border layout can be applied to the outer one...
64             west: {
65                 xtype : 'Region',
66                 xns: Roo.bootstrap.layout,
67                 split:true,
68                 tabPosition: 'top',
69                 initialSize: 400,
70                 titlebar: true,
71                // collapsible: true,
72                 minSize: 100,
73                 maxSize: 400
74             },
75             north: {
76                 xtype : 'Region',
77                 xns: Roo.bootstrap.layout,
78                 overflow : 'visible',
79                 
80                 initialSize: 50,
81                 titlebar: false
82                
83             },
84             center: {
85                 xtype : 'Region',
86                 xns: Roo.bootstrap.layout,
87                 autoScroll: false,
88                 tabPosition:'top',
89                  titlebar: true
90             },
91             items : [
92                 {
93                     xtype : 'Content',
94                     xns: Roo.bootstrap.panel,
95                     title : "Title west" ,
96                     fitToFrame:true,
97                     closable:false,
98                     region : 'north',
99                     items : [
100                         {
101                             bar : true,
102                             position : 'static-top',
103                             xtype : 'NavHeaderbar',
104                             tag : 'nav',
105                             xns : Roo.bootstrap,
106                             items : [
107                                 {
108                                     cls : 'navbar-btn sidebar-toggle',
109                                     xtype : 'Link',
110                                     xns : Roo.bootstrap,
111                                     html : '<span class=\"icon-bar\"></span><span class=\"icon-bar\"></span><span class=\"icon-bar\"></span>'
112                                 },
113                                 {
114                                     xtype : 'NavGroup',
115                                     align : 'right',
116                                     xns : Roo.bootstrap,
117                                     items : [
118                                         {
119                                             menu : {
120                                                 xtype : 'Menu',
121                                                 xns : Roo.bootstrap,
122                                                 items : [
123                                                     {
124                                                         xtype : 'MenuItem',
125                                                         xns : Roo.bootstrap,
126                                                         html : 'test'
127                                                     }
128                                                 ]
129         
130                                             },
131                                             xtype : 'NavItem',
132                                             xns : Roo.bootstrap,
133                                             html : 'test',
134                                             items : [
135         
136                                             ]
137         
138                                         },
139                                         {
140                                             xtype : 'NavItem',
141                                             xns : Roo.bootstrap,
142                                             html : 'test'
143                                         }
144                                     ]
145         
146                                 }
147                             ]
148         
149                         }
150                     ]
151                     
152                 },
153              
154                 {
155                     xtype : 'Content',
156                     xns: Roo.bootstrap.panel,
157                     title : "Title west" ,
158                     fitToFrame:true,
159                     closable:false,
160                     region : 'west',
161                     html : 'some body west'
162                     
163                 },
164                 {
165                     xtype : 'Grid',
166                     xns: Roo.bootstrap.panel,
167                     title : "Test Grid",
168                     fitToFrame:true,
169                     closable:false,
170                     region : 'west',
171                     
172                     grid : 
173                     
174                     
175                     
176                 },
177                 {
178                     xtype : 'Content',
179                     xns: Roo.bootstrap.panel,
180                     title : "Title Center",
181                     fitToFrame:true,
182                     closable:false,
183                     region : 'center',
184                     html : 'some body center'
185                     
186                 },
187                 
188                 {
189                     xtype : 'Nest',
190                     title : "Title Nest Center",
191                     
192                     xns: Roo.bootstrap.panel,
193                     region : 'center',
194                     
195                     layout : {
196                         xtype : 'Border',
197                         xns: Roo.bootstrap.layout,
198                         south: {
199                             xtype : 'Region',
200                             xns: Roo.bootstrap.layout,
201                                 split:true,
202                                 initialSize: 200,
203                                 minSize: 100,
204                                 maxSize: 400,
205                                 autoScroll:true,
206                                 collapsible:true,
207                                 titlebar: true
208                             },
209                             center: {
210                             xtype : 'Region',
211                             xns: Roo.bootstrap.layout,
212                                 autoScroll:true,
213                             },
214                         items : [
215                             {
216                                 xtype : 'Content',
217                                 xns: Roo.bootstrap.panel,
218                                 title : "More Info",
219                                 region : 'south',
220                                 html : 'some body south'
221                             },
222                             {
223                                 xtype : 'Content',
224                                 xns: Roo.bootstrap.panel,
225                                 title : "the body",
226                                 region : 'center',
227                                 html : 'some body center'
228                             },
229                         ]
230                     }
231                 
232                     
233                 }
234                  
235             ]   
236             
237         }
238     }
239 });
240   
241    Roo.onReady(function() {
242         Roo.XComponent.is_alt = true;
243           Roo.XComponent.build();
244           //dRoo.bootstrap.Tooltip.init();
245       });
246   
247         </script>
248 </head>
249 <body class="xtheme-gray">
250
251  </body>
252 </html>