| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
| 2 |
<html style="overflow:hidden;"> |
| 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>Action Sheet Sample</title> |
| 7 |
|
| 8 |
<script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="parseOnLoad: true, async:true"></script> |
| 9 |
<script language="JavaScript" type="text/javascript"> |
| 10 |
require([ |
| 11 |
"dojo/_base/html", // dojo.byId |
| 12 |
"dijit/_base/manager", // dijit.byId |
| 13 |
"dojox/mobile", // This is a mobile app. |
| 14 |
"dojox/mobile/compat", // This mobile app supports running on desktop browsers |
| 15 |
"dojox/mobile/parser", // This mobile app uses declarative programming with fast mobile parser |
| 16 |
"dojox/mobile/deviceTheme", // This mobile app automatically changes it's theme to match devices |
| 17 |
"dojox/mobile/Button", |
| 18 |
"dojox/mobile/Opener" |
| 19 |
]); |
| 20 |
|
| 21 |
function clicked(id){ |
| 22 |
dijit.byId("actionSheet").hide(); |
| 23 |
var span = dojo.byId("msgArea"); |
| 24 |
span.innerHTML += """ + dojo.byId(id).innerHTML + "" button was clicked."; |
| 25 |
setTimeout(function(){ |
| 26 |
span.innerHTML = ""; |
| 27 |
}, 2000); |
| 28 |
} |
| 29 |
|
| 30 |
</script> |
| 31 |
</head> |
| 32 |
<body style="visibility:hidden;"> |
| 33 |
<center> |
| 34 |
<button dojoType="dojox.mobile.Button" class="mblBlueButton" style="margin-top:20px;width:200px;" |
| 35 |
onclick="dijit.byId('actionSheet').show(this.domNode, ['above-centered','below-centered','after','before'])">Open Action Sheet</button> |
| 36 |
<div id="msgArea" style="margin-top:5px;"></div> |
| 37 |
</center> |
| 38 |
|
| 39 |
|
| 40 |
<div id="actionSheet" data-dojo-type="dojox.mobile.Opener"> |
| 41 |
<button id="Bookmark" dojoType="dojox.mobile.Button" onclick="clicked(this.id)">Add Bookmark</button><br> |
| 42 |
<button id="HomeScreen" dojoType="dojox.mobile.Button" onclick="clicked(this.id)">Add to Home Screen</button><br> |
| 43 |
<button id="MailLink" dojoType="dojox.mobile.Button" onclick="clicked(this.id)">Mail Link to this Page</button><br> |
| 44 |
<button id="cancel" dojoType="dojox.mobile.Button" onclick="clicked(this.id)">Cancel</button> |
| 45 |
</div> |
| 46 |
|
| 47 |
</body> |
| 48 |
</html> |