Also apply the __toString fix to UserInfo
[cacert-mgr.git] / external / ZendFramework-1.9.5 / externals / dojo / demos / castle / src.js
1 dojo.require("dijit.layout.AccordionContainer");
2 dojo.require("dojox.layout.ScrollPane");
3 dojo.require("dojox.widget.FisheyeLite");
4 dojo.require("dojo.NodeList-fx");
5 dojo.require("dojo.fx");
6 dojo.require("dojo.fx.easing");
7 dojo.require("dojox.analytics.Urchin");
8
9 ;(function(){
10
11 window.show = function(id){
12 var contents = dojo.byId(id).innerHTML;
13 dojo.query("#content").style("opacity", 0).forEach(function(n){ n.innerHTML = contents; }).anim({ opacity:1 });
14 }
15
16 var init = function(){
17 // turn li's in this page into fisheye items, presumtiously:
18 dojo.query("#hidden ul > li").forEach(function(n){
19 new dojox.widget.FisheyeLite({
20 properties:{
21 fontSize:1.5
22 },
23 easeIn: dojo.fx.easing.linear,
24 durationIn: 100,
25 easeOut: dojo.fx.easing.linear,
26 durationOut: 100
27 }, n);
28 });
29
30 //accordion widget
31 accordion = new dijit.layout.AccordionContainer({}, "accordionPanel");
32
33 // children are scrollpanes, add titles (and id for css styles)
34 var dates = ["25.07.2008", "26.07.2008", "27.07.2008"];
35 dojo.forEach(["day1","day2","day3"], function(id,i){
36 new dojox.layout.ScrollPane({
37 id: "pane" + (i+1),
38 style: "width:450px;height:170px",
39 title: dates[i]
40 }, id).placeAt(accordion);
41 });
42
43 // we do this because despite accordion passing correct sizes, scrollpane uses
44 // it's scrollheight/etc for sizing
45 dojo.subscribe("accordionPanel-selectChild", function(child){
46 setTimeout(dojo.hitch(child, "resize"), accordion.duration + 50);
47 });
48
49 // start the accordion:
50 accordion.startup();
51
52 dojo.query('.dijitAccordionText').style('opacity', 0.01);
53
54 // demo usage tracking:
55 new dojox.analytics.Urchin({
56 acct: "UA-3572741-1",
57 GAonLoad: function(){
58 this.trackPageView("/demos/castle");
59 }
60 });
61
62 }
63
64 dojo.addOnLoad(init);
65
66 })();