Activate your free membership today | Log-in

Monday, December 4th, 2006

Dojo Fisheye Example

Category: Dojo, Showcase

Richard Sharples has written up his experience mixing Dojo with Roller.

It consists of setting up the Dojo library and then:

Category Changing JS

JAVASCRIPT:
  1.  
  2. function selectCategory(catname){
  3.   var url;
  4.  
  5.   if (catname == 'All' ) {
  6.     url="$url.home"
  7.   } else {
  8.     url="${url.home}category/"+catname
  9.   }
  10.   window.location.replace ( url );
  11. }
  12.  

HTML Dojo Component

HTML:
  1.  
  2. <div class="chooser">
  3.     <div class="dojo-FisheyeList"
  4.         dojo:itemWidth="110" dojo:itemHeight="40"
  5.         dojo:itemMaxWidth="250" dojo:itemMaxHeight="90"
  6.         dojo:orientation="horizontal"
  7.         dojo:effectUnits="1"
  8.         dojo:itemPadding="0"
  9.         dojo:attachEdge="top"
  10.         dojo:labelEdge="bottom"
  11.         dojo:enableCrappySvgSupport="false">
  12.  
  13.         <div class="dojo-FisheyeListItem" onClick="selectCategory('All');"
  14.             dojo:iconsrc="$IMAGES/cat-All.png"
  15.         </div>
  16.  
  17.         <div class="dojo-FisheyeListItem" onClick="selectCategory('About Me');"
  18.             dojo:iconsrc="$IMAGES/cat-AboutMe.png">
  19.         </div>
  20.  
  21.         <div class="dojo-FisheyeListItem" onClick="selectCategory('Books');"
  22.             dojo:iconsrc="$IMAGES/cat-Books.png">
  23.         </div>
  24.  
  25.         <div class="dojo-FisheyeListItem" onClick="selectCategory('Roller');"
  26.             dojo:iconsrc="$IMAGES/cat-Hacking.png">
  27.         </div>
  28.  
  29.         <div class="dojo-FisheyeListItem" onClick="selectCategory('General');"
  30.             dojo:iconsrc="$IMAGES/cat-General.png">
  31.         </div>
  32.  
  33.         <div class="dojo-FisheyeListItem" onClick="selectCategory('Java');"
  34.             dojo:iconsrc="$IMAGES/cat-Java.png">
  35.         </div>
  36.  
  37.         <div class="dojo-FisheyeListItem" onClick="selectCategory('Home Life');"
  38.             dojo:iconsrc="$IMAGES/cat-HomeLife.png">
  39.         </div>
  40.  
  41.         <div class="dojo-FisheyeListItem" onClick="selectCategory('Gadgets');"
  42.             dojo:iconsrc="$IMAGES/cat-Gadgets.png">
  43.         </div>
  44.  
  45.         <div class="dojo-FisheyeListItem" onClick="selectCategory('W3');"
  46.             dojo:iconsrc="$IMAGES/cat-W3.png">
  47.         </div>
  48.     </div>
  49. </div></div>
  50.  

Richard Sharples Dojo Fisheye

Posted by Dion Almaer at 7:04 am

+++--
3.9 rating from 43 votes

6 Comments »

Comments feed TrackBack URI

Why is crap like this being published on Ajaxian?

Comment by Victor — December 4, 2006

Real men don’t use Dojo.

Comment by Roger Svensson — December 4, 2006

Shut up Roger ….Ask your Mom who is your real daddy …

Comment by Your Dad — January 12, 2007

This is sick Man!

Comment by vishin — June 20, 2007

This is not a crap and dojo is a nice toolkit…

Comment by wappy — August 13, 2007

dsfg

Comment by aaaaaaa — September 13, 2007

Leave a comment

You must be logged in to post a comment.