aboutsummaryrefslogtreecommitdiff
path: root/includes/js/dojox/widget/tests/demo_FisheyeLite.html
blob: e937698b712bb1a8ef47adc81824fd14c26f80b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
	<title>A responsive Fisheye-like FisheyeLite widget | The Dojo Toolkit</title>
	<style type="text/css">
		@import "../../../dijit/themes/tundra/tundra.css";
		@import "../../../dojox/layout/resources/RadioGroup.css";
	    body, html { margin:0; padding:0; width:100%;
			font-family:Arial,sans-serif;
		}
		
		#content {
			height:300px;
			border-left:1px solid #333;
			border-right:1px solid #333;
		}
		
		#container {
			top:150px;
			width:720px;
			margin:0 auto;
		}
		#header {
			position:relative;
			height:90px;
			border-bottom:1px solid #dedede;
		}
		#dojoLink, #dijitLink, #dojoxLink {
			background:#dedede;
			position:absolute;
			bottom:0;
			width:200px;
			padding:0;
			cursor:pointer;
		}
		#dojoLink {
			left:20px;
		}
		#dojoxLink {
			left:460px;
		}
		#dijitLink {
			left:240px;
		}
		.fisheyeTarget {
			position:relative;
			bottom:0;
			left:0;
			height:1px;
			width:1px;
			cursor:pointer;
		}
		.inner {
			cursor:pointer;
			position:absolute;
			bottom:5px;
			margin-left:10px;
		}
		.subtext {
			visibility:hidden;
			position:absolute;
			bottom:27px;
			left:10px;
			font:8pt Arial,sans-serif;
			color:#666;
		}
		.cpContent {
			padding:15px;
		}
		.cp {
			background:#bebebe;
			color:#666;
		}
	</style>
	<script type="text/javascript">
		var djConfig = { isDebug:true, parseOnLoad:true };
	</script>
	<script type="text/javascript" src="../../../dojo/dojo.js"></script>
	<script type="text/javascript" src="../FisheyeLite.js"></script>
	<script type="text/javascript">
		dojo.require("dojo.parser");
		dojo.require("dijit.layout.ContentPane");
		dojo.require("dojox.layout.RadioGroup");
		dojo.require("dojox.widget.FisheyeLite");
		dojo.require("dojox.fx.easing");
		dojo.addOnLoad(function(){
			dojo.query(".headLink").forEach(function(n){

				var linkto = dojo.attr(n,"id") + "Pane";
				
				var widget = new dojox.widget.FisheyeLite({
					properties: {
						height:45
					},
					easeOut:dojox.fx.easing.bounceOut,
					durationOut:700
				},n);
				
				var myTarget = dojo.query(".subtext",n)[0];
				if(myTarget){
					
					dojo.style(myTarget,{ opacity:"0", visibility:"visible" });
					
					var _anim = null;
					dojo.connect(widget,"show",function(e){
						_anim && _anim.status && _anim.stop();
						_anim = dojo.fadeIn({ node: myTarget, duration:250 });
						_anim.play();
					});
					dojo.connect(widget,"hide",function(e){
						_anim && _anim.status && _anim.stop();
						_anim = dojo.fadeOut({ node: myTarget, duration:250 });
						_anim.play();
					});
				}
				
				dojo.connect(n,"onclick",function(e){	
					dijit.byId("content").selectChild(dijit.byId(linkto));
				});
			
			});
			
			dojo.query(".cp").instantiate(dijit.layout.ContentPane);			
			dojo.query("#content").forEach(function(n){
				new dojox.layout.RadioGroupSlide({
					hasButtons:false
				},n).startup();
			});
		});			
	</script>
    </head>
    <body class="tundra">
		
		<div id="container">
			<div>
			<h2>The Dojo Toolkit:</h2>	
			</div>
			<div id="header">
				<div class="headLink" id="dojoLink">
					<div class="fisheyeTarget"></div>
					<div class="inner">Dojo Base</div>
					<span class="subtext">the JavaScript Toolkit</span>
				</div>
				<div class="headLink" id="dijitLink">
					<div class="fisheyeTarget"></div>
					<div class="inner">Dijit</div>
					<span class="subtext">Themeable, extensible widget system</span>
				</div>
				<div class="headLink" id="dojoxLink">
					<div class="fisheyeTarget"></div>
					<div class="inner">DojoX</div>
					<span class="subtext">Extensions, experiments, and extras</span>
				</div>
			</div>
			<div id="content">
				<div class="cp" id="dojoLinkPane">
					<div class="cpContent">
					Dojo Pane
					</div>
				</div>
				<div class="cp" id="dijitLinkPane">
					<div class="cpContent">
					Dijit Pane
					</div>
				</div>
				<div class="cp" id="dojoxLinkPane">
					<div class="cpContent">
					DojoX Pane
					</div>
				</div>
			</div>
		</div>
		
    </body>
</html>