2150 |
mathias |
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
|
|
2 |
"http://www.w3.org/TR/html4/strict.dtd">
|
|
|
3 |
<html>
|
|
|
4 |
<head>
|
|
|
5 |
|
|
|
6 |
<title>Dojo Tooltip Widget Test</title>
|
|
|
7 |
|
|
|
8 |
|
|
|
9 |
<script type="text/javascript" src="../../dojo/dojo.js"
|
|
|
10 |
djConfig="parseOnLoad: true, isDebug: true"></script>
|
|
|
11 |
<script type="text/javascript" src="_testCommon.js"></script>
|
|
|
12 |
|
|
|
13 |
<script type="text/javascript">
|
|
|
14 |
dojo.require("dijit.Tooltip");
|
|
|
15 |
dojo.require("dojo.parser"); // find widgets
|
|
|
16 |
dojo.addOnLoad(function(){
|
|
|
17 |
console.log("on load func");
|
|
|
18 |
var tt = new dijit.Tooltip({label:"programmatically created tooltip", connectId:["programmaticTest"]});
|
|
|
19 |
console.log("created", tt, tt.id);
|
|
|
20 |
});
|
|
|
21 |
</script>
|
|
|
22 |
<style type="text/css">
|
|
|
23 |
@import "../../dojo/resources/dojo.css";
|
|
|
24 |
@import "css/dijitTests.css";
|
|
|
25 |
</style>
|
|
|
26 |
</head>
|
|
|
27 |
<body>
|
|
|
28 |
<h1 class="testTitle">Tooltip test</h1>
|
|
|
29 |
<p>Mouse-over or focus the items below to test tooltips. <button onclick="dijit.byId('btnTt').destroy()">Remove</button> tooltip from button.</p>
|
|
|
30 |
<p></p>
|
|
|
31 |
<div><span id="one" class="tt" tabindex="0"> focusable text </span>
|
|
|
32 |
<span dojoType="dijit.Tooltip" connectId="one">
|
|
|
33 |
<b>
|
|
|
34 |
<span style="color: blue;">rich formatting</span>
|
|
|
35 |
<span style="color: red; font-size: x-large;"><i>!</i></span>
|
|
|
36 |
</b>
|
|
|
37 |
</span>
|
|
|
38 |
</div>
|
|
|
39 |
<span id="oneA" class="tt"> plain text (not focusable) </span>
|
|
|
40 |
<span dojoType="dijit.Tooltip" connectId="oneA">
|
|
|
41 |
<span> keyboard users can not access this tooltip</span>
|
|
|
42 |
</span>
|
|
|
43 |
<a id="three" href="#bogus">anchor</a>
|
|
|
44 |
<span dojoType="dijit.Tooltip" connectId="three">tooltip on a link </span>
|
|
|
45 |
<p></p>
|
|
|
46 |
|
|
|
47 |
<span id="programmaticTest">this text has a programmatically created tooltip</span>
|
|
|
48 |
<br>
|
|
|
49 |
|
|
|
50 |
<button id="four">button</button>
|
|
|
51 |
<span id="btnTt" dojoType="dijit.Tooltip" connectId="four">tooltip on a button</span>
|
|
|
52 |
|
|
|
53 |
<span style="float: right">
|
|
|
54 |
Test tooltip on right aligned element. Tooltip should flow to the left -->
|
|
|
55 |
<select id="seven">
|
|
|
56 |
<option value="alpha">Alpha</option>
|
|
|
57 |
<option value="beta">Beta</option>
|
|
|
58 |
<option value="gamma">Gamma</option>
|
|
|
59 |
<option value="delta">Delta</option>
|
|
|
60 |
</select>
|
|
|
61 |
|
|
|
62 |
<span dojoType="dijit.Tooltip" connectId="seven">
|
|
|
63 |
tooltip on a select<br>
|
|
|
64 |
two line tooltip.
|
|
|
65 |
</span>
|
|
|
66 |
</span>
|
|
|
67 |
|
|
|
68 |
<p></p>
|
|
|
69 |
|
|
|
70 |
<form>
|
|
|
71 |
<input type="input" id="id1" value="#1"><br>
|
|
|
72 |
<input type="input" id="id2" value="#2"><br>
|
|
|
73 |
<input type="input" id="id3" value="#3"><br>
|
|
|
74 |
<input type="input" id="id4" value="#4"><br>
|
|
|
75 |
<input type="input" id="id5" value="#5"><br>
|
|
|
76 |
<input type="input" id="id6" value="#6"><br>
|
|
|
77 |
</form>
|
|
|
78 |
<br>
|
|
|
79 |
|
|
|
80 |
<div style="overflow: auto; height: 100px; position: relative; border: solid blue 3px;">
|
|
|
81 |
<span id="s1">s1 text</span><br><br><br>
|
|
|
82 |
<span id="s2">s2 text</span><br><br><br>
|
|
|
83 |
<span id="s3">s3 text</span><br><br><br>
|
|
|
84 |
<span id="s4">s4 text</span><br><br><br>
|
|
|
85 |
<span id="s5">s5 text</span><br><br><br>
|
|
|
86 |
</div>
|
|
|
87 |
|
|
|
88 |
<span dojoType="dijit.Tooltip" connectId="id1">
|
|
|
89 |
|
|
|
90 |
tooltip for #1<br>
|
|
|
91 |
long long long long long long long long long long long text<br>
|
|
|
92 |
make sure that this works properly with a really narrow window
|
|
|
93 |
</span>
|
|
|
94 |
|
|
|
95 |
<span dojoType="dijit.Tooltip" connectId="id2">tooltip for #2</span>
|
|
|
96 |
<span dojoType="dijit.Tooltip" connectId="id3">tooltip for #3</span>
|
|
|
97 |
<span dojoType="dijit.Tooltip" connectId="id4">tooltip for #4</span>
|
|
|
98 |
<span dojoType="dijit.Tooltip" connectId="id5">tooltip for #5</span>
|
|
|
99 |
<span dojoType="dijit.Tooltip" connectId="id6">tooltip for #6</span>
|
|
|
100 |
|
|
|
101 |
<span dojoType="dijit.Tooltip" connectId="s1">s1 tooltip</span>
|
|
|
102 |
<span dojoType="dijit.Tooltip" connectId="s2">s2 tooltip</span>
|
|
|
103 |
<span dojoType="dijit.Tooltip" connectId="s3">s3 tooltip</span>
|
|
|
104 |
<span dojoType="dijit.Tooltip" connectId="s4">s4 tooltip</span>
|
|
|
105 |
<span dojoType="dijit.Tooltip" connectId="s5">s5 tooltip</span>
|
|
|
106 |
|
|
|
107 |
<h3>One Tooltip for multiple connect nodes</h3>
|
|
|
108 |
<span dojoType="dijit.Tooltip" connectId="multi1,multi2" style="display:none;">multi tooltip</span>
|
|
|
109 |
<a id="multi1" href="#bogus">multi1</a><br><a id="multi2" href="#bogus">multi2</a>
|
|
|
110 |
|
|
|
111 |
</body>
|
|
|
112 |
</html>
|
|
|
113 |
|