Skip to content

Commit

Permalink
Ajax via jQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
gotschi committed May 26, 2011
1 parent aea4664 commit 058604b
Show file tree
Hide file tree
Showing 14 changed files with 195 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/layouts/_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

</div>
<div id="calendar_pull">
<%= link_to(image_tag("calendar_pull.png"), ajax_calendar_path, :remote => true) if user_signed_in? %>
<img src="/images/calendar_pull.png" />
</div>
</div>

Expand Down
16 changes: 16 additions & 0 deletions bin/convert_to_should_syntax
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'convert_to_should_syntax' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('shoulda', 'convert_to_should_syntax')
16 changes: 16 additions & 0 deletions bin/erubis
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'erubis' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('erubis', 'erubis')
16 changes: 16 additions & 0 deletions bin/launchy
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'launchy' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('launchy', 'launchy')
16 changes: 16 additions & 0 deletions bin/nokogiri
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'nokogiri' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('nokogiri', 'nokogiri')
16 changes: 16 additions & 0 deletions bin/oauth
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'oauth' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('oauth', 'oauth')
16 changes: 16 additions & 0 deletions bin/rackup
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'rackup' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('rack', 'rackup')
16 changes: 16 additions & 0 deletions bin/rails
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'rails' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('rails', 'rails')
16 changes: 16 additions & 0 deletions bin/rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'rake' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('rake', 'rake')
16 changes: 16 additions & 0 deletions bin/rake2thor
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'rake2thor' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('thor', 'rake2thor')
16 changes: 16 additions & 0 deletions bin/thor
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'thor' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('thor', 'thor')
16 changes: 16 additions & 0 deletions bin/tt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'tt' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('treetop', 'tt')
17 changes: 17 additions & 0 deletions public/javascripts/foodcorp.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
$(document).ready(function() {

$('#calendar').hoverIntent(
function(){
$.ajax({
url: "/ajax/calendar",
context: document.body,
success: function(data){
$('#calendar_container').css({'height': 0});
$('#calendar_container').html(data);
}
});

$('#calendar_container').animate({'height': 'auto'})
}, function(){
$('#calendar_container').animate({ 'height': 0});
}
);

// TOPNAV HANDLING
current = document.location.pathname;
Expand Down
1 change: 1 addition & 0 deletions public/stylesheets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ img {

#calendar_container {
width: 255px;
display:hidden;
border-left: 2px solid #aaa;
border-right: 2px solid #aaa;
}
Expand Down

0 comments on commit 058604b

Please sign in to comment.