Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Ajax via jQuery

  • Loading branch information...
commit 058604b8c3cca0d6978937246b4bd005c6388202 1 parent aea4664
Manuel Gottstein authored May 26, 2011
2  app/views/layouts/_header.html.erb
@@ -13,7 +13,7 @@
13 13
       
14 14
       </div>
15 15
       <div id="calendar_pull">
16  
-        <%= link_to(image_tag("calendar_pull.png"), ajax_calendar_path, :remote => true) if user_signed_in? %>
  16
+      	<img src="/images/calendar_pull.png" />
17 17
       </div>
18 18
   </div>
19 19
 
16  bin/convert_to_should_syntax
... ...
@@ -0,0 +1,16 @@
  1
+#!/usr/bin/env ruby
  2
+#
  3
+# This file was generated by Bundler.
  4
+#
  5
+# The application 'convert_to_should_syntax' is installed as part of a gem, and
  6
+# this file is here to facilitate running it.
  7
+#
  8
+
  9
+require 'pathname'
  10
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
  11
+  Pathname.new(__FILE__).realpath)
  12
+
  13
+require 'rubygems'
  14
+require 'bundler/setup'
  15
+
  16
+load Gem.bin_path('shoulda', 'convert_to_should_syntax')
16  bin/erubis
... ...
@@ -0,0 +1,16 @@
  1
+#!/usr/bin/env ruby
  2
+#
  3
+# This file was generated by Bundler.
  4
+#
  5
+# The application 'erubis' is installed as part of a gem, and
  6
+# this file is here to facilitate running it.
  7
+#
  8
+
  9
+require 'pathname'
  10
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
  11
+  Pathname.new(__FILE__).realpath)
  12
+
  13
+require 'rubygems'
  14
+require 'bundler/setup'
  15
+
  16
+load Gem.bin_path('erubis', 'erubis')
16  bin/launchy
... ...
@@ -0,0 +1,16 @@
  1
+#!/usr/bin/env ruby
  2
+#
  3
+# This file was generated by Bundler.
  4
+#
  5
+# The application 'launchy' is installed as part of a gem, and
  6
+# this file is here to facilitate running it.
  7
+#
  8
+
  9
+require 'pathname'
  10
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
  11
+  Pathname.new(__FILE__).realpath)
  12
+
  13
+require 'rubygems'
  14
+require 'bundler/setup'
  15
+
  16
+load Gem.bin_path('launchy', 'launchy')
16  bin/nokogiri
... ...
@@ -0,0 +1,16 @@
  1
+#!/usr/bin/env ruby
  2
+#
  3
+# This file was generated by Bundler.
  4
+#
  5
+# The application 'nokogiri' is installed as part of a gem, and
  6
+# this file is here to facilitate running it.
  7
+#
  8
+
  9
+require 'pathname'
  10
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
  11
+  Pathname.new(__FILE__).realpath)
  12
+
  13
+require 'rubygems'
  14
+require 'bundler/setup'
  15
+
  16
+load Gem.bin_path('nokogiri', 'nokogiri')
16  bin/oauth
... ...
@@ -0,0 +1,16 @@
  1
+#!/usr/bin/env ruby
  2
+#
  3
+# This file was generated by Bundler.
  4
+#
  5
+# The application 'oauth' is installed as part of a gem, and
  6
+# this file is here to facilitate running it.
  7
+#
  8
+
  9
+require 'pathname'
  10
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
  11
+  Pathname.new(__FILE__).realpath)
  12
+
  13
+require 'rubygems'
  14
+require 'bundler/setup'
  15
+
  16
+load Gem.bin_path('oauth', 'oauth')
16  bin/rackup
... ...
@@ -0,0 +1,16 @@
  1
+#!/usr/bin/env ruby
  2
+#
  3
+# This file was generated by Bundler.
  4
+#
  5
+# The application 'rackup' is installed as part of a gem, and
  6
+# this file is here to facilitate running it.
  7
+#
  8
+
  9
+require 'pathname'
  10
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
  11
+  Pathname.new(__FILE__).realpath)
  12
+
  13
+require 'rubygems'
  14
+require 'bundler/setup'
  15
+
  16
+load Gem.bin_path('rack', 'rackup')
16  bin/rails
... ...
@@ -0,0 +1,16 @@
  1
+#!/usr/bin/env ruby
  2
+#
  3
+# This file was generated by Bundler.
  4
+#
  5
+# The application 'rails' is installed as part of a gem, and
  6
+# this file is here to facilitate running it.
  7
+#
  8
+
  9
+require 'pathname'
  10
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
  11
+  Pathname.new(__FILE__).realpath)
  12
+
  13
+require 'rubygems'
  14
+require 'bundler/setup'
  15
+
  16
+load Gem.bin_path('rails', 'rails')
16  bin/rake
... ...
@@ -0,0 +1,16 @@
  1
+#!/usr/bin/env ruby
  2
+#
  3
+# This file was generated by Bundler.
  4
+#
  5
+# The application 'rake' is installed as part of a gem, and
  6
+# this file is here to facilitate running it.
  7
+#
  8
+
  9
+require 'pathname'
  10
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
  11
+  Pathname.new(__FILE__).realpath)
  12
+
  13
+require 'rubygems'
  14
+require 'bundler/setup'
  15
+
  16
+load Gem.bin_path('rake', 'rake')
16  bin/rake2thor
... ...
@@ -0,0 +1,16 @@
  1
+#!/usr/bin/env ruby
  2
+#
  3
+# This file was generated by Bundler.
  4
+#
  5
+# The application 'rake2thor' is installed as part of a gem, and
  6
+# this file is here to facilitate running it.
  7
+#
  8
+
  9
+require 'pathname'
  10
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
  11
+  Pathname.new(__FILE__).realpath)
  12
+
  13
+require 'rubygems'
  14
+require 'bundler/setup'
  15
+
  16
+load Gem.bin_path('thor', 'rake2thor')
16  bin/thor
... ...
@@ -0,0 +1,16 @@
  1
+#!/usr/bin/env ruby
  2
+#
  3
+# This file was generated by Bundler.
  4
+#
  5
+# The application 'thor' is installed as part of a gem, and
  6
+# this file is here to facilitate running it.
  7
+#
  8
+
  9
+require 'pathname'
  10
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
  11
+  Pathname.new(__FILE__).realpath)
  12
+
  13
+require 'rubygems'
  14
+require 'bundler/setup'
  15
+
  16
+load Gem.bin_path('thor', 'thor')
16  bin/tt
... ...
@@ -0,0 +1,16 @@
  1
+#!/usr/bin/env ruby
  2
+#
  3
+# This file was generated by Bundler.
  4
+#
  5
+# The application 'tt' is installed as part of a gem, and
  6
+# this file is here to facilitate running it.
  7
+#
  8
+
  9
+require 'pathname'
  10
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
  11
+  Pathname.new(__FILE__).realpath)
  12
+
  13
+require 'rubygems'
  14
+require 'bundler/setup'
  15
+
  16
+load Gem.bin_path('treetop', 'tt')
17  public/javascripts/foodcorp.js
... ...
@@ -1,4 +1,21 @@
1 1
 $(document).ready(function() {
  2
+	
  3
+		$('#calendar').hoverIntent(
  4
+			function(){
  5
+			    $.ajax({
  6
+					  url: "/ajax/calendar",
  7
+					  context: document.body,
  8
+					  success: function(data){
  9
+							$('#calendar_container').css({'height': 0});
  10
+					    $('#calendar_container').html(data);
  11
+					  }
  12
+					});
  13
+					
  14
+				$('#calendar_container').animate({'height': 'auto'})
  15
+			  }, function(){
  16
+			    $('#calendar_container').animate({ 'height': 0});
  17
+			  }
  18
+			);
2 19
 
3 20
     // TOPNAV HANDLING
4 21
     current = document.location.pathname;
1  public/stylesheets/style.css
@@ -162,6 +162,7 @@ img {
162 162
 
163 163
 #calendar_container {
164 164
     width: 255px;
  165
+		display:hidden;
165 166
     border-left: 2px solid #aaa;
166 167
     border-right: 2px solid #aaa;
167 168
 }

0 notes on commit 058604b

Please sign in to comment.
Something went wrong with that request. Please try again.