| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/> |
| 5 | <meta name="apple-mobile-web-app-capable" content="yes" /> |
| 6 | <title>View</title> |
| 7 | <link href="../../../themes/iphone/iphone.css" rel="stylesheet"/> |
| 8 | <style> |
| 9 | html,body{ |
| 10 | height: 100%; |
| 11 | overflow: hidden; |
| 12 | } |
| 13 | .list1 li{ |
| 14 | border-style: solid; |
| 15 | border-width: 1px 0px 1px 0px; |
| 16 | border-top-color: #BABABC; |
| 17 | border-bottom-color: #89898C; |
| 18 | background-color: #ACACAF; |
| 19 | line-height: 0px; |
| 20 | } |
| 21 | .list1 li table{ |
| 22 | line-height: normal; |
| 23 | } |
| 24 | .list1 li:nth-child(even){ |
| 25 | background-color: #97979B; |
| 26 | } |
| 27 | #list2 li:nth-child(even){ |
| 28 | background-color: #eeeeee; |
| 29 | } |
| 30 | #categ1 { |
| 31 | font-size: 18px; |
| 32 | } |
| 33 | #categ1 li{ |
| 34 | line-height: 70px; |
| 35 | } |
| 36 | .lnk { |
| 37 | font-size: 14px; |
| 38 | color: #0B5199; |
| 39 | text-decoration: none; |
| 40 | } |
| 41 | .content { |
| 42 | padding:0px 10px; |
| 43 | background-color: white; |
| 44 | } |
| 45 | p { |
| 46 | font-family: Helvetica; |
| 47 | font-size: 12px; |
| 48 | } |
| 49 | .title { |
| 50 | color: blue; |
| 51 | margin-bottom: 4px; |
| 52 | } |
| 53 | .subtitle { |
| 54 | font-style: italic; |
| 55 | color: gray; |
| 56 | margin: 0px; |
| 57 | margin-bottom: 4px; |
| 58 | } |
| 59 | .subsubtitle { |
| 60 | margin: 16px 0px 0px 0px; |
| 61 | } |
| 62 | .lst { |
| 63 | margin: 0px; |
| 64 | padding: 0px 14px; |
| 65 | } |
| 66 | .lst li { |
| 67 | font-family: Helvetica; |
| 68 | font-size: 12px; |
| 69 | margin: 0px; |
| 70 | list-style-type: square; |
| 71 | } |
| 72 | </style> |
| 73 | <script type="text/javascript" src="../../../../../dojo/dojo.js" data-dojo-config="parseOnLoad: true, mblAlwaysHideAddressBar: true"></script> |
| 74 | |
| 75 | <script language="JavaScript" type="text/javascript"> |
| 76 | //dojo.require("dojo.parser"); // Use the lightweight parser. |
| 77 | dojo.require("dojox.mobile.parser"); |
| 78 | dojo.require("dojox.mobile"); |
| 79 | dojo.require("dojox.mobile.SwapView"); |
| 80 | dojo.require("dojox.mobile.IconContainer"); |
| 81 | dojo.requireIf(!dojo.isWebKit, "dojox.mobile.compat"); |
| 82 | dojo.requireIf(!dojo.isWebKit, "dojo.fx"); |
| 83 | dojo.requireIf(!dojo.isWebKit, "dojo.fx.easing"); |
| 84 | |
| 85 | dojo.require("doh.runner"); |
| 86 | dojo.addOnLoad(function(){ |
| 87 | |
| 88 | var view = new dojox.mobile.SwapView({id:"foo", selected:"true"}); |
| 89 | dojo.doc.body.appendChild(view.domNode); |
| 90 | var demoWidget = new dojox.mobile.RoundRectCategory({label:"Page flipping demo"}); |
| 91 | // view.addChild(demoWidget); |
| 92 | demoWidget.placeAt(view.containerNode); |
| 93 | |
| 94 | demoWidget = new dojox.mobile.RoundRect({innerHTML:"Swipe the screen left or right to flip between the views. There are 4 views in this demo. Vertical scrolling and page indicator are not supported."}); |
| 95 | // view.addChild(demoWidget); |
| 96 | demoWidget.placeAt(view.containerNode); |
| 97 | view.startup(); |
| 98 | |
| 99 | view = new dojox.mobile.SwapView({id:"bar"}); |
| 100 | dojo.doc.body.appendChild(view.domNode); |
| 101 | view.startup(); |
| 102 | var list = new dojox.mobile.RoundRectList(); |
| 103 | demoWidget = new dojox.mobile.ListItem({className:"mblVariableHeight"}); |
| 104 | // demoWidget.domNode.style = {font-size:"10px"}; |
| 105 | // view.addChild(list); |
| 106 | list.placeAt(view.containerNode); |
| 107 | demoWidget.domNode.innerHTML ='1. <a href="#" class="lnk">Dojo: Traditional Karate-do Spirit</a><br> Sarah Connor Hardcover<br> Eligible for FREE Super Saver Shipping<br> <font color="red">$14.50 (50%)</font> In Stock<br> # (531)'; |
| 108 | list.addChild(demoWidget); |
| 109 | // view.startup(); |
| 110 | |
| 111 | |
| 112 | |
| 113 | view = new dojox.mobile.SwapView({id:"icon1"}); |
| 114 | demoWidget = new dojox.mobile.Heading({label:"Icon Container 1"}); |
| 115 | dojo.doc.body.appendChild(view.domNode); |
| 116 | // view.addChild(demoWidget); |
| 117 | demoWidget.placeAt(view.containerNode); |
| 118 | // container = new dojox.mobile.IconContainer(); |
| 119 | |
| 120 | |
| 121 | view.startup(); |
| 122 | doh.register("dojox.mobile.test.doh.View", [ |
| 123 | { |
| 124 | name: "test View Verification", |
| 125 | timeout: 4000, |
| 126 | runTest: function(){ |
| 127 | var d = new doh.Deferred(); |
| 128 | setTimeout(d.getTestCallback(function(){ |
| 129 | demoWidget = dijit.byId("foo"); |
| 130 | doh.assertEqual('f', demoWidget.get("scrollDir")); |
| 131 | doh.assertEqual('mblView mblSwapView', demoWidget.domNode.className); |
| 132 | doh.assertEqual('', demoWidget.domNode.style.display); |
| 133 | })); |
| 134 | return d; |
| 135 | } |
| 136 | } |
| 137 | ]); |
| 138 | doh.run(); |
| 139 | }); |
| 140 | </script> |
| 141 | </head> |
| 142 | <body> |
| 143 | </body> |
| 144 | </html> |