Skip to content

Instantly share code, notes, and snippets.

@sprite2005
Created July 8, 2009 09:02
Show Gist options
  • Save sprite2005/142703 to your computer and use it in GitHub Desktop.
Save sprite2005/142703 to your computer and use it in GitHub Desktop.
call_from_site_index.rjs
content = page.select('#facebox .content').first()
content.replace '<div class="content"></div>'
page << "facebox.loading();"
page << "facebox.reveal(\"#{escape_javascript render :partial => 'listing_response'}\", null);"
page << "new Effect.Appear(facebox.facebox, {duration: .3});"
# page.replace 'ListingResponse', :partial => 'listing_response'
page.replace_html 'ListingItemsTop', :partial => 'listings/top'
page.replace_html 'ListingItemsTopWeekly', :partial => 'listings/top_weekly'
page.replace_html 'ListingItemsTopMonthly', :partial => 'listings/top_monthly'
page.replace_html 'featured_vendors', :partial => '/base/featured_vendors'
call_from_profile.rjs
content = page.select('#facebox .content').first()
content.replace '<div class="content"></div>'
page << "facebox.loading();"
page << "facebox.reveal(\"#{escape_javascript render :partial => 'listing_response'}\", null);"
page << "new Effect.Appear(facebox.facebox, {duration: .3});"
call_from_listings.rjs
content = page.select('#facebox .content').first()
content.replace '<div class="content"></div>'
page << "facebox.loading();"
page << "facebox.reveal(\"#{escape_javascript render :partial => 'listing_response'}\", null);"
page << "new Effect.Appear(facebox.facebox, {duration: .3});"
page.replace 'ListingsTags', :partial => 'index_listings_tags', :locals => { :tags => @tags, :selected_tags => @selected_tags }
page.replace 'ListingItems', :partial => 'index_listings_items', :locals => { :listings => @listings }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment