| 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <meta http-equiv="Content-type" content="text/html; charset=utf-8"/> |
| 5 | <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/> |
| 6 | <meta name="apple-mobile-web-app-capable" content="yes"/> |
| 7 | <title>FixedSplitter Test</title> |
| 8 | |
| 9 | <link href="../../../dijit/themes/tundra/tundra.css" rel="stylesheet"/> |
| 10 | <link href="../themes/iphone/FixedSplitter.css" rel="stylesheet"/> |
| 11 | |
| 12 | <script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="async: true, parseOnLoad: true"></script> |
| 13 | |
| 14 | <script type="text/javascript"> |
| 15 | require([ |
| 16 | "dojo/_base/connect", |
| 17 | "dojo/_base/window", |
| 18 | "dojo/dom", |
| 19 | "dojo/dom-class", |
| 20 | "dojo/ready", |
| 21 | "dijit/registry", |
| 22 | "dojox/mobile/sniff", |
| 23 | "dojox/mobile/parser", |
| 24 | "dojox/mobile/FixedSplitter", |
| 25 | "dojox/mobile/Container", |
| 26 | "dojox/mobile/Pane", |
| 27 | "dijit/Calendar" |
| 28 | ], function(connect, win, dom, domClass, ready, registry, has){ |
| 29 | var change = function() { |
| 30 | var splitter = registry.byId("splitter1"); |
| 31 | var h = win.global.innerHeight || win.doc.documentElement.clientHeight; |
| 32 | var w = win.global.innerWidth || win.doc.documentElement.clientWidth; |
| 33 | splitter.set("orientation", h > w ? "V" : "H"); |
| 34 | }; |
| 35 | ready(function(){ |
| 36 | connect.connect(null, (win.global.onorientationchange !== undefined && !has('android')) |
| 37 | ? "onorientationchange" : "onresize", null, change); |
| 38 | setTimeout(function(){ |
| 39 | change(); |
| 40 | }, 0); |
| 41 | }); |
| 42 | }); |
| 43 | </script> |
| 44 | |
| 45 | <style type="text/css"> |
| 46 | html, body{ |
| 47 | width: 100%; |
| 48 | height: 100%; |
| 49 | padding: 0px; |
| 50 | margin: 0px; |
| 51 | overflow: hidden; |
| 52 | } |
| 53 | |
| 54 | .mblFixedSplitterH > #pane2 { |
| 55 | width: 240px; |
| 56 | } |
| 57 | .mblFixedSplitterV > #pane2 { |
| 58 | height: 240px; |
| 59 | } |
| 60 | |
| 61 | #cal { |
| 62 | margin: 10px; |
| 63 | } |
| 64 | </style> |
| 65 | </head> |
| 66 | <body class="tundra"> |
| 67 | <div id="splitter1" data-dojo-type="dojox.mobile.FixedSplitter" data-dojo-props='variablePane:0'> |
| 68 | <div id="pane1" data-dojo-type="dojox.mobile.Pane" style="background-color:yellow;"> |
| 69 | pane #1 |
| 70 | </div> |
| 71 | |
| 72 | <div id="pane2" data-dojo-type="dojox.mobile.Container" style="background-color:pink;"> |
| 73 | <div id="cal" dojoType='dijit.Calendar'></div> |
| 74 | </div> |
| 75 | </div> |
| 76 | </body> |
| 77 | </html> |