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.
123 lines (117 loc) • 4.74 kB
HTML
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
<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>test Tooltip</title>
<script type="text/javascript" src="../deviceTheme.js" data-dojo-config="mblThemeFiles: ['base','SpinWheel','Tooltip']"></script>
<script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="async: true, parseOnLoad: true"></script>
<script type="text/javascript">
require([
"dojo/dom",
"dojo/ready",
"dijit/_base/manager", // dijit.byId in markup
"dojox/mobile/parser",
"dojox/mobile",
"dojox/mobile/compat",
"dojox/mobile/SpinWheel",
"dojox/mobile/Tooltip"
], function(dom, ready){
ready(function(){
dom.byId('bot').scrollIntoView(false);
});
});
</script>
<style>
.dj_phone BUTTON {
display:none;
}
INPUT {
font-family: monospace;
border-radius: 0px;
}
#spin1 {
width: 304px;
}
#pt {
width: 20px;
background-color: #C4C9DB;
opacity: 0.2;
}
#txt {
width: 10px;
margin-left: -15px;
padding-top: 85px;
font-size: 24px;
font-weight: bold;
border: none;
}
HTML {
min-height: 100%; /* workaround for android 3.x position:fixed bug */
}
</style>
</head>
<body style="visibility:hidden;">
<center style="width:100%;">
<button type="button" onclick="dijit.byId('customPicker').show(this, ['above','below-centered','before','after'])">below</button>
<input readonly onclick="dijit.byId('textTooltip').show(this, ['above-centered','below-centered','after','before'])" value="below" size="5">
<br><br><b>Click boundary nodes to see tooltips</b>
</center>
<center id="bot" class="bottom" style="position:fixed;bottom:0;width:100%;">
<input readonly tabindex="0" onclick="dijit.byId('textTooltip').show(this, ['above-centered','below-centered','before','after'])" value="above" size="5">
<button type="button" tabindex="0" onclick="dijit.byId('customPicker').show(this, ['below','above-centered','after','before'])">above</button>
</center>
<center style="position:fixed;top:33%;width:100%;">
<button type="button" onclick="dijit.byId('customPicker').hide()">click to hide spin wheels</button>
</center>
<center style="position:fixed;bottom:33%;width:100%;">
<input readonly onclick="dijit.byId('textTooltip').hide()" value="click to hide text tooltip" size="26">
</center>
<div style="position:fixed;top:50%;left:1px;direction:ltr;">
<input readonly onclick="dijit.byId('textTooltip').show(this, ['before','after','below-centered','above-centered'])" value="right" size="5">
<br>
<br>
<button type="button" onclick="dijit.byId('customPicker').show(this, ['before','after','below-centered','above-centered'])">right</button>
</div>
<div style="position:fixed;bottom:50%;right:1px;direction:rtl;">
<button type="button" onclick="dijit.byId('customPicker').show(this, ['after','before','above','below'])">left</button>
<br>
<br>
<input readonly onclick="dijit.byId('textTooltip').show(this, ['after','before','below','above'])" value="left" size="4">
</div>
<div id="textTooltip" data-dojo-type="dojox.mobile.Tooltip" class="mblTooltipBubble">Enter a value.<br><center>Please!</center></div>
<div id="customPicker" data-dojo-type="dojox.mobile.Tooltip">
<div id="spin1" data-dojo-type="dojox.mobile.SpinWheel">
<div data-dojo-type="dojox.mobile.SpinWheelSlot"
data-dojo-props="labels:['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']"
style="text-align:center;width:40px;"></div>
<div data-dojo-type="dojox.mobile.SpinWheelSlot"
data-dojo-props='labelFrom:3000, labelTo:3100'
style="width:70px;"></div>
<div id="pt" class="mblSpinWheelSlot"></div>
<div id="txt" class="mblSpinWheelSlot">.</div>
<div data-dojo-type="dojox.mobile.SpinWheelSlot"
data-dojo-props='labelFrom:0, labelTo:9'
style="width:30px;"></div>
<div data-dojo-type="dojox.mobile.SpinWheelSlot"
data-dojo-props="labels:['pt','px','cm']"
style="width:50px;"></div>
<div data-dojo-type="dojox.mobile.SpinWheelSlot"
data-dojo-props="labels:[
'<img src=images/i-icon-1.png>',
'<img src=images/i-icon-2.png>',
'<img src=images/i-icon-3.png>',
'<img src=images/i-icon-4.png>',
'<img src=images/i-icon-5.png>',
'<img src=images/i-icon-6.png>',
'<img src=images/i-icon-7.png>',
'<img src=images/i-icon-8.png>',
'<img src=images/i-icon-9.png>',
'<img src=images/i-icon-10.png>'
]"
style="width:70px;text-align: center;"></div>
</div>
</div>
</body>
</html>