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. function selectCategory(catname){
  2.   var url;
  3.  
  4.   if (catname == 'All' ) {
  5.     url="$url.home"
  6.   } else {
  7.     url="${url.home}category/"+catname
  8.   }
  9.   window.location.replace ( url );
  10. }

HTML Dojo Component

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

Richard Sharples Dojo Fisheye

Posted by Dion Almaer at 7:04 am
6 Comments

+++--
3.9 rating from 55 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.