UNPKG

dojox

Version:

Dojo eXtensions, a rollup of many useful sub-projects and varying states of maturity – from very stable and robust, to alpha and experimental. See individual projects contain README files for details.

146 lines (138 loc) 3.93 kB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/> <meta name="apple-mobile-web-app-capable" content="yes" /> <title>View</title> <link href="../../../themes/iphone/iphone.css" rel="stylesheet"/> <style> html,body{ height: 100%; overflow: hidden; } .list1 li{ border-style: solid; border-width: 1px 0px 1px 0px; border-top-color: #BABABC; border-bottom-color: #89898C; background-color: #ACACAF; line-height: 0px; } .list1 li table{ line-height: normal; } .list1 li:nth-child(even){ background-color: #97979B; } #list2 li:nth-child(even){ background-color: #eeeeee; } #categ1 { font-size: 18px; } #categ1 li{ line-height: 70px; } .lnk { font-size: 14px; color: #0B5199; text-decoration: none; } .content { padding:0px 10px; background-color: white; } p { font-family: Helvetica; font-size: 12px; } .title { color: blue; margin-bottom: 4px; } .subtitle { font-style: italic; color: gray; margin: 0px; margin-bottom: 4px; } .subsubtitle { margin: 16px 0px 0px 0px; } .lst { margin: 0px; padding: 0px 14px; } .lst li { font-family: Helvetica; font-size: 12px; margin: 0px; list-style-type: square; } </style> <script type="text/javascript" src="../../../../../dojo/dojo.js" data-dojo-config="parseOnLoad: true, mblAlwaysHideAddressBar: true"></script> <script language="JavaScript" type="text/javascript"> //dojo.require("dojo.parser"); // Use the lightweight parser. dojo.require("dojox.mobile.parser"); dojo.require("dojox.mobile"); dojo.require("dojox.mobile.ScrollableView"); dojo.require("dojox.mobile.TabBar"); dojo.requireIf(!dojo.isWebKit, "dojox.mobile.compat"); dojo.requireIf(!dojo.isWebKit, "dojo.fx"); dojo.requireIf(!dojo.isWebKit, "dojo.fx.easing"); dojo.require("doh.runner"); dojo.addOnLoad(function(){ var view = new dojox.mobile.View({id:"group1", selected:"true", innerHTML:"aaa"}); dojo.doc.body.appendChild(view.domNode); var roundRectList = new dojox.mobile.RoundRectList(); // view.addChild(roundRectList); roundRectList.placeAt(view.containerNode); roundRectList.startup(); var demoWidget = new dojox.mobile.ListItem({moveTo:"dojox_mobile_ScrollableView_0"}); roundRectList.addChild(demoWidget); view.startup(); view = new dojox.mobile.ScrollableView(); demoWidget = new dojox.mobile.Heading({fixed:"top", label:"Categories", back:"Back To", moveTo:"group1"}); dojo.doc.body.appendChild(view.domNode); // view.addChild(demoWidget); demoWidget.placeAt(view.containerNode); demoWidget.startup(); view.domNode.appendChild(dojo.doc.createTextNode("bbbb")); roundRectList = new dojox.mobile.EdgeToEdgeList(); // view.addChild(roundRectList); demoWidget.placeAt(view.containerNode); demoWidget.startup(); for(var i = 0;i<20;i++){ demoWidget = new dojox.mobile.ListItem({label:"Test" + i}); roundRectList.addChild(demoWidget) } view.startup(); doh.register("dojox.mobile.test.doh.View", [ { name: "test View Verification", timeout: 4000, runTest: function(){ var d = new doh.Deferred(); var t = 500; if(dojo.isIE){ t = 2000; } setTimeout(d.getTestCallback(function(){ var demoWidget = dijit.byId("group1"); doh.assertEqual('mblView', demoWidget.domNode.className); doh.assertEqual('', demoWidget.domNode.style.visibility); demoWidget = dijit.byId("dojox_mobile_ScrollableView_0"); doh.assertEqual('mblView mblScrollableView', demoWidget.domNode.className); doh.assertEqual('none', demoWidget.domNode.style.display); }),t); return d; } } ]); doh.run(); }); </script> </head> <body> </body> </html>