Changeset 13684 for dojox/trunk/widget/tests/test_FisheyeLite.html
- Timestamp:
- 05/10/08 20:29:28 (8 weeks ago)
- Files:
-
- 1 modified
-
dojox/trunk/widget/tests/test_FisheyeLite.html (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dojox/trunk/widget/tests/test_FisheyeLite.html
r13421 r13684 67 67 dojo.require("dojo.parser"); 68 68 dojo.require("dojox.widget.FisheyeLite"); 69 dojo.addOnLoad(function(){ 69 70 var beenDestroyed = false; 71 var hasInit = false; 72 var init = function(e){ 73 74 if(e && !beenDestroyed){ return; } 75 e && e.preventDefault(); 70 76 71 77 // turn li's in this page into fisheye items, presumtiously: 72 78 dojo.query("li.bounce").instantiate(dojox.widget.FisheyeLite,{}); 73 79 74 dojo.query("span.line")80 var l = dojo.query("span.line") 75 81 .instantiate(dojox.widget.FisheyeLite,{ 76 82 // make a widget from each of the lines in the lineHeightTest … … 80 86 easeOut: dojox.fx.easing.backInOut, 81 87 durationOut: 500 82 }) 83 .connect("onclick",function(e){ 88 }); 89 90 if(!hasInit){ 91 l.connect("onclick",function(e){ 84 92 // you can still access the onclick of the real node 85 93 alert(e.target.innerHTML); 86 }) 87 ;88 89 dojo.query("a").instantiate(dojox.widget.FisheyeLite,{94 }); 95 } 96 97 var lm = dojo.query("a").instantiate(dojox.widget.FisheyeLite,{ 90 98 properties:{ 91 99 fontSize:1.15, 92 100 letterSpacing:2.85 93 101 } 94 }) 102 }); 103 if(!hasInit){ 95 104 // stop anchors from doing _anything_ 96 .connect("onclick",dojo,"stopEvent"); 105 lm.connect("onclick",dojo,"stopEvent"); 106 } 97 107 98 108 dojo.query(".imgBounce").instantiate(dojox.widget.FisheyeLite,{ … … 114 124 // a few in markup, mostly from the query()'ies: 115 125 console.log("fisheyes on this page: ", vv); 116 117 }); 126 127 beenDestroyed = false; 128 hasInit = true; 129 }; 130 dojo.addOnLoad(init); 131 132 dojo.addOnLoad(function(){ 133 dojo.query("#restore").connect("onclick",init); 134 dojo.query("#destroy").connect("onclick",destroyAll); 135 }); 136 137 var destroyAll = function(e){ 138 e && e.preventDefault(); 139 if(confirm("really?")){ 140 dijit.registry.filter(function(w){ 141 return w && w.declaredClass == "dojox.widget.FisheyeLite"; 142 }).forEach(function(w){ 143 w.destroy(true); 144 }); 145 beenDestroyed = true; 146 } 147 }; 148 118 149 </script> 119 150 </head> … … 163 194 </div> 164 195 196 <div> 197 <div dojoType="dojox.widget.FisheyeLite" properties="{ fontSize:1.25 }" style="padding:3px" 198 ><a id='destroy' href="#" class="fisheyeTarget">test destroy()</a></div> 199 200 <div dojoType="dojox.widget.FisheyeLite" properties="{ fontSize:1.25 }" style="padding:3px" 201 ><a id='restore' href="#" class="fisheyeTarget">restore</a></div> 202 </div> 203 165 204 <p> 166 205 Lorem ipsum dolor sit amet, <a href="#">consectetuer</a> adipiscing elit. Aenean … … 194 233 semper iaculis. Sed molestie tortor at ipsum. 195 234 </p> 235 196 236 <h3>another list: (no target, or ilk)</h3> 197 237 <div style="height:125px; position:relative;"> … … 248 288 249 289 <p>the end</p> 250 290 251 291 </div> 252 292 </body>