Updated
This commit is contained in:
70
master/examples/RoundRect_Programmatic.html
Normal file
70
master/examples/RoundRect_Programmatic.html
Normal file
@@ -0,0 +1,70 @@
|
||||
<!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>Round Rect</title>
|
||||
<link href="../../themes/iphone/iphone.css" rel="stylesheet">
|
||||
|
||||
<script type="text/javascript" src="../../../../dojo/dojo.js" djConfig="parseOnLoad: 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.requireIf(!dojo.isWebKit, "dojox.mobile.compat");
|
||||
|
||||
dojo.require("doh.runner");
|
||||
dojo.addOnLoad(function(){
|
||||
var view = dijit.byId("foo");
|
||||
var demoWidget = new dojox.mobile.RoundRect({shadow:"true"});
|
||||
demoWidget.domNode.appendChild(dojo.doc.createTextNode("This module provides some widgets that can be used to build web-based applications for mobile devices such as iPhone or Android."));
|
||||
view.addChild(demoWidget);
|
||||
|
||||
demoWidget = new dojox.mobile.RoundRect();
|
||||
demoWidget.domNode.appendChild(dojo.doc.createTextNode("This module provides some widgets that can be used to build web-based applications for mobile devices such as iPhone or Android."));
|
||||
view.addChild(demoWidget);
|
||||
|
||||
doh.register("dojox.mobile.test.doh.RoundRect", [
|
||||
{
|
||||
name: "RoundRect Verification",
|
||||
timeout: 4000,
|
||||
runTest: function(){
|
||||
var d = new doh.Deferred();
|
||||
setTimeout(d.getTestCallback(function(){
|
||||
var demoWidget = dijit.byId("dojox_mobile_RoundRect_0");
|
||||
if(dojo.isIE){
|
||||
doh.assertEqual('mblRoundRect', demoWidget.domNode.className);
|
||||
}else{
|
||||
doh.assertEqual('mblRoundRect mblShadow', demoWidget.domNode.className);
|
||||
}
|
||||
|
||||
demoWidget = dijit.byId("dojox_mobile_RoundRect_1");
|
||||
doh.assertEqual('mblRoundRect', demoWidget.domNode.className);
|
||||
}));
|
||||
return d;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "Set",
|
||||
timeout: 4000,
|
||||
runTest: function(){
|
||||
var demoWidget = dijit.byId("dojox_mobile_RoundRect_0");
|
||||
demoWidget.set({shadow :false});
|
||||
|
||||
demoWidget.set({shadow :false});
|
||||
// doh.assertFalse(demoWidget.get("shadow"));
|
||||
// doh.assertEqual('mblRoundRect', demoWidget.domNode.className);
|
||||
}
|
||||
}
|
||||
]);
|
||||
doh.run();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="foo" dojoType="dojox.mobile.View" selected="true">
|
||||
<h2 dojoType="dojox.mobile.RoundRectCategory">Round Rectangle</h2>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user