Assembla home | Assembla project page
 

Changeset 10 for trunk/rails/app

Show
Ignore:
Timestamp:
06/15/08 16:22:05 (7 months ago)
Author:
battlehorse
Message:

Fixes #18 : tags browsing

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/rails/app/views/home/index.html.erb

    r9 r10  
    1616  </table> 
    1717   
    18   <p style="margin: 0;padding: 0; margin-top: 100px">Username or e-mail address: </p> 
     18  <p style="margin: 0;padding: 0; margin-top: 100px">Browse photos: </p> 
    1919  <p style="color: red"><%= flash[:notice] %></p> 
    2020  <% form_for :flickr_user , :url => { :controller => "flickr_users" , :action => "create" } do |f| %> 
     
    2323  <% end %> 
    2424  <script>$("flickr_user_username").focus()</script> 
    25   <p style="font-size: 80%" id="coverFlowParagraphId">You can also click on a photo in the Cover Flow</p> 
     25  <p style="font-size: 80%" id="coverFlowParagraphId"> 
     26    Type in a Flickr username or mail address. <br /> 
     27    You can also click on a photo in the Cover Flow 
     28  </p> 
     29  <p><sup style="color:red">new!</sup><%= link_to "Browse Flickr Tags" , :controller => 'tags' %> with RailTrackr!</p> 
    2630</div> 
    2731 
     
    4246        } 
    4347         
    44         function open_user(imgnum) { 
    45           $("coverFlowParagraphId").innerHTML = "Loading photosets from the requested user..." 
    46           location.href = "<%= flickr_users_url %>/" + imgs[imgnum].owner; 
    47         } 
    48          
    49         function show(obj) { 
    50           var imgEl = new Element('img', {src: imgs[curimg].src, id: "coverFlowImageId" }); 
    51           var a = new Element('a', { onclick: "open_user(" + curimg + ")" , style: "cursor:pointer"}) 
    52           a.appendChild(imgEl); 
    53           $('coverFlowId').update(a); 
    54           cvi_reflex.add(document.getElementById("coverFlowImageId"), { tilt: "right", distance: 5, border: 10, transparency: 80,color: "#ffffff" }); 
    55           Effect.Appear($('coverFlowId'), {duration: 0.5}); 
    56           setTimeout(load_next_image,5000);        
    57         } 
    58          
    59         function fade_and_show() { 
    60           Effect.Fade($('coverFlowId'), { duration: 0.5, afterFinish: show}); 
    61         } 
    62          
    63         function load_next_image() { 
    64           curimg = Math.floor(Math.random()*imgs.length); 
    65           var img = new Image ; 
    66           img.onload = fade_and_show 
    67           img.src = imgs[curimg].src; 
    68         } 
    69          
    7048        Event.observe(window,'load', 
    7149          function() { 
     
    7351              show_no_images_warning(); 
    7452            } else { 
    75               load_next_image(); 
     53              new Slideshow($('coverFlowId'), $("coverFlowParagraphId"), "<%= flickr_users_url %>/", imgs, true).start(); 
    7654            } 
    77           }); 
    78          
     55    }); 
    7956</script> 
    8057<%= footer %> 
  • trunk/rails/app/views/layouts/home.html.erb

    r4 r10  
    1010  <%= javascript_include_tag 'effects' %> 
    1111  <%= javascript_include_tag 'cvi_reflex_lib' %> 
     12  <%= javascript_include_tag 'application' %> 
    1213</head> 
    1314<body>