Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
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
	<title>FisheyeList Widget Dojo Tests</title>
6
	<style type="text/css">
7
		@import "../../../dojo/resources/dojo.css";
8
		@import "../../../dijit/themes/tundra/tundra.css";
9
		@import "../../../dijit/themes/dijit.css";
10
		@import "../../../dijit/tests/css/dijitTests.css";
11
		@import "../FisheyeList/FisheyeList.css";
12
	</style>
13
 
14
	<script type="text/javascript" src="../../../dojo/dojo.js" djConfig="isDebug:true, parseOnLoad: true"></script>
15
	<script type="text/javascript" src="../FisheyeList.js"></script>
16
	<script type="text/javascript">
17
		//dojo.require("dojox.widget.FisheyeList");
18
		dojo.require("dojo.parser");	// scan page for widgets and instantiate them
19
 
20
		dojo.addOnLoad(function(){
21
			fish1 = dijit.byId("fisheye1");
22
			fish2 = dijit.byId("fisheye2");
23
		});
24
		var counter = 1;
25
		function addToFirstList(){
26
			var item = new dojox.widget.FisheyeListItem();
27
			item.label = "Dynamically Added "+counter;
28
			item.iconSrc = "images/fisheye_"+counter+".png"
29
			item.postCreate();
30
			counter++;
31
			if(counter>4){counter=1;}
32
			fish1.addChild(item);
33
			fish1.startup();
34
			item.startup();
35
		}
36
	</script>
37
</head>
38
<body class="tundra">
39
	<h1>dojox.widget.FisheyeList test</h1>
40
<p>HTML before</p>
41
<button onclick="addToFirstList();">Add a new item to the first list</button>
42
<p>HTML before</p>
43
<p>HTML before</p>
44
<p>Liberal trigger: move the mouse anywhere near the menu and it will start to expand:</p>
45
<div dojoType="dojox.widget.FisheyeList"
46
	itemWidth="40" itemHeight="40"
47
	itemMaxWidth="150" itemMaxHeight="150"
48
	orientation="horizontal"
49
	effectUnits="2"
50
	itemPadding="10"
51
	attachEdge="center"
52
	labelEdge="bottom"
53
	id="fisheye1"
54
>
55
 
56
	<div dojoType="dojox.widget.FisheyeListItem"
57
		id="item1"
58
		onclick="alert('click on ' + this.label + '(from widget id ' + this.widgetId + ')!');"
59
		label="Item 1"
60
		iconSrc="images/fisheye_1.png">
61
	</div>
62
 
63
	<div dojoType="dojox.widget.FisheyeListItem"
64
		label="Item 2"
65
		iconSrc="images/fisheye_2.png">
66
	</div>
67
 
68
	<div dojoType="dojox.widget.FisheyeListItem"
69
		label="Item 3"
70
		iconSrc="images/fisheye_3.png">
71
	</div>
72
 
73
	<div dojoType="dojox.widget.FisheyeListItem"
74
		iconSrc="images/fisheye_4.png">
75
	</div>
76
 
77
	<div dojoType="dojox.widget.FisheyeListItem"
78
		label="Really Long Item Label"
79
		iconSrc="images/fisheye_3.png">
80
	</div>
81
 
82
	<div dojoType="dojox.widget.FisheyeListItem"
83
		iconSrc="images/fisheye_2.png">
84
	</div>
85
 
86
	<div dojoType="dojox.widget.FisheyeListItem"
87
		iconSrc="images/fisheye_1.png">
88
	</div>
89
</div>
90
 
91
<p>HTML after</p>
92
<p>HTML after</p>
93
<p>HTML after</p>
94
<p>This one has strict triggering, so you actually have to mouse over the menu to make it start moving:</p>
95
<div dojoType="dojox.widget.FisheyeList"
96
	itemWidth="40" itemHeight="40"
97
	itemMaxWidth="150" itemMaxHeight="150"
98
	orientation="horizontal"
99
	effectUnits="2"
100
	itemPadding="10"
101
	attachEdge="center"
102
	labelEdge="bottom"
103
	conservativeTrigger="true"
104
	id="fisheye2"
105
>
106
 
107
	<div dojoType="dojox.widget.FisheyeListItem"
108
		id="item1b"
109
		onclick="alert('click on ' + this.label + '(from widget id ' + this.widgetId + ')!');"
110
		label="Item 1"
111
		iconSrc="images/fisheye_1.png">
112
	</div>
113
 
114
	<div dojoType="dojox.widget.FisheyeListItem"
115
		label="Item 2"
116
		iconSrc="images/fisheye_2.png">
117
	</div>
118
 
119
	<div dojoType="dojox.widget.FisheyeListItem"
120
		label="Item 3"
121
		iconSrc="images/fisheye_3.png">
122
	</div>
123
 
124
	<div dojoType="dojox.widget.FisheyeListItem"
125
		iconSrc="images/fisheye_4.png">
126
	</div>
127
 
128
	<div dojoType="dojox.widget.FisheyeListItem"
129
		label="Really Long Item Label"
130
		iconSrc="images/fisheye_3.png">
131
	</div>
132
 
133
	<div dojoType="dojox.widget.FisheyeListItem"
134
		iconSrc="images/fisheye_2.png">
135
	</div>
136
 
137
	<div dojoType="dojox.widget.FisheyeListItem"
138
		iconSrc="images/fisheye_1.png">
139
	</div>
140
</div>
141
 
142
 
143
</body>
144
</html>