| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
|---|
| 2 | <html> |
|---|
| 3 | <head> |
|---|
| 4 | <title>dijit.layout.BorderContainer Test</title> |
|---|
| 5 | |
|---|
| 6 | <script type="text/javascript" src="../../../dojo/dojo.js" |
|---|
| 7 | djConfig="isDebug: true, parseOnLoad: true"></script> |
|---|
| 8 | <script type="text/javascript" src="../_testCommon.js"></script> |
|---|
| 9 | |
|---|
| 10 | <script type="text/javascript"> |
|---|
| 11 | dojo.require("dijit.layout.BorderContainer"); |
|---|
| 12 | dojo.require("dijit.layout.ContentPane"); |
|---|
| 13 | dojo.require("dijit.form.FilteringSelect"); |
|---|
| 14 | </script> |
|---|
| 15 | <script> |
|---|
| 16 | function togglePanel(button, id){ |
|---|
| 17 | var leftPanel = dijit.byId(id); |
|---|
| 18 | if(leftPanel){ |
|---|
| 19 | dijit.byId('border1').removeChild(leftPanel); |
|---|
| 20 | leftPanel.destroy(); |
|---|
| 21 | button.innerHTML='Add left panel'; |
|---|
| 22 | }else{ |
|---|
| 23 | var container = dijit.byId('border1'); |
|---|
| 24 | var div = dojo.doc.createElement('div'); |
|---|
| 25 | div.innerHTML='left'; |
|---|
| 26 | container.domNode.appendChild(div); |
|---|
| 27 | leftPanel = new dijit.layout.ContentPane({id: id, region:'left', style:'background-color: #acb386; width:100px', splitter:true, minSize:50, maxSize:150}, div); |
|---|
| 28 | dijit.byId('border1').addChild(leftPanel); |
|---|
| 29 | button.innerHTML='Remove left panel'; |
|---|
| 30 | } |
|---|
| 31 | } |
|---|
| 32 | </script> |
|---|
| 33 | <style type="text/css"> |
|---|
| 34 | @import "../css/dijitTests.css"; |
|---|
| 35 | </style> |
|---|
| 36 | </head> |
|---|
| 37 | <body> |
|---|
| 38 | <div dojoType="dijit.layout.BorderContainer" design="sidebar" liveSplitters="false" persist="true" |
|---|
| 39 | style="border: 20px solid black; width: 90%; height: 300px;"> |
|---|
| 40 | <div dojoType="dijit.layout.ContentPane" region="leading" style="background-color: #acb386; width: 100px;"> |
|---|
| 41 | leading |
|---|
| 42 | </div> |
|---|
| 43 | <div dojoType="dijit.layout.ContentPane" region="top" style="background-color: #b39b86; height: 100px;"> |
|---|
| 44 | top bar |
|---|
| 45 | </div> |
|---|
| 46 | <div dojoType="dijit.layout.ContentPane" region="center" style="background-color: #f5ffbf; padding: 10px;"> |
|---|
| 47 | main panel with <a href="http://www.dojotoolkit.org/">a link</a>.<br /> |
|---|
| 48 | (to check we're copying children around properly).<br /> |
|---|
| 49 | <select dojoType="dijit.form.FilteringSelect"> |
|---|
| 50 | <option value="1">foo</option> |
|---|
| 51 | <option value="2">bar</option> |
|---|
| 52 | <option value="3">baz</option> |
|---|
| 53 | </select> |
|---|
| 54 | Here's some text that comes AFTER the combo box. |
|---|
| 55 | </div> |
|---|
| 56 | <div dojoType="dijit.layout.ContentPane" region="bottom" style="background-color: #b39b86; height: 100px;" splitter="true"> |
|---|
| 57 | bottom bar |
|---|
| 58 | </div> |
|---|
| 59 | </div> |
|---|
| 60 | </body> |
|---|
| 61 | </html> |
|---|