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. navbar-static-top {
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 : 'Content',
166                     xns: Roo.bootstrap.panel,
167                     title : "Title west 2",
168                     fitToFrame:true,
169                     closable:false,
170                     region : 'west',
171                     html : 'some body west 2'
172                     
173                 },
174                 {
175                     xtype : 'Content',
176                     xns: Roo.bootstrap.panel,
177                     title : "Title Center",
178                     fitToFrame:true,
179                     closable:false,
180                     region : 'center',
181                     html : 'some body center'
182                     
183                 },
184                 
185                 {
186                     xtype : 'Nest',
187                     title : "Title Nest Center",
188                     
189                     xns: Roo.bootstrap.panel,
190                     region : 'center',
191                     
192                     layout : {
193                         xtype : 'Border',
194                         xns: Roo.bootstrap.layout,
195                         south: {
196                             xtype : 'Region',
197                             xns: Roo.bootstrap.layout,
198                                 split:true,
199                                 initialSize: 200,
200                                 minSize: 100,
201                                 maxSize: 400,
202                                 autoScroll:true,
203                                 collapsible:true,
204                                 titlebar: true
205                             },
206                             center: {
207                             xtype : 'Region',
208                             xns: Roo.bootstrap.layout,
209                                 autoScroll:true,
210                             },
211                         items : [
212                             {
213                                 xtype : 'Content',
214                                 xns: Roo.bootstrap.panel,
215                                 title : "More Info",
216                                 region : 'south',
217                                 html : 'some body south'
218                             },
219                             {
220                                 xtype : 'Content',
221                                 xns: Roo.bootstrap.panel,
222                                 title : "the body",
223                                 region : 'center',
224                                 html : 'some body center'
225                             },
226                         ]
227                     }
228                 
229                     
230                 }
231                  
232             ]   
233             
234         }
235     }
236 });
237   
238    Roo.onReady(function() {
239         Roo.XComponent.is_alt = true;
240           Roo.XComponent.build();
241           //dRoo.bootstrap.Tooltip.init();
242       });
243   
244         </script>
245 </head>
246 <body class="xtheme-gray">
247
248  </body>
249 </html>