You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
2.1 KiB
48 lines
2.1 KiB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
|
<html style="overflow:hidden;"> |
|
<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>Action Sheet Sample</title> |
|
|
|
<script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="parseOnLoad: true, async:true"></script> |
|
<script language="JavaScript" type="text/javascript"> |
|
require([ |
|
"dojo/_base/html", // dojo.byId |
|
"dijit/_base/manager", // dijit.byId |
|
"dojox/mobile", // This is a mobile app. |
|
"dojox/mobile/compat", // This mobile app supports running on desktop browsers |
|
"dojox/mobile/parser", // This mobile app uses declarative programming with fast mobile parser |
|
"dojox/mobile/deviceTheme", // This mobile app automatically changes it's theme to match devices |
|
"dojox/mobile/Button", |
|
"dojox/mobile/Opener" |
|
]); |
|
|
|
function clicked(id){ |
|
dijit.byId("actionSheet").hide(); |
|
var span = dojo.byId("msgArea"); |
|
span.innerHTML += """ + dojo.byId(id).innerHTML + "" button was clicked."; |
|
setTimeout(function(){ |
|
span.innerHTML = ""; |
|
}, 2000); |
|
} |
|
|
|
</script> |
|
</head> |
|
<body style="visibility:hidden;"> |
|
<center> |
|
<button dojoType="dojox.mobile.Button" class="mblBlueButton" style="margin-top:20px;width:200px;" |
|
onclick="dijit.byId('actionSheet').show(this.domNode, ['above-centered','below-centered','after','before'])">Open Action Sheet</button> |
|
<div id="msgArea" style="margin-top:5px;"></div> |
|
</center> |
|
|
|
<!-- Action Sheet --> |
|
<div id="actionSheet" data-dojo-type="dojox.mobile.Opener"> |
|
<button id="Bookmark" dojoType="dojox.mobile.Button" onclick="clicked(this.id)">Add Bookmark</button><br> |
|
<button id="HomeScreen" dojoType="dojox.mobile.Button" onclick="clicked(this.id)">Add to Home Screen</button><br> |
|
<button id="MailLink" dojoType="dojox.mobile.Button" onclick="clicked(this.id)">Mail Link to this Page</button><br> |
|
<button id="cancel" dojoType="dojox.mobile.Button" onclick="clicked(this.id)">Cancel</button> |
|
</div> |
|
<!-- Action Sheet --> |
|
</body> |
|
</html>
|
|
|