Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a95ea45
commit c1dbca3
Showing
33 changed files
with
116 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +0,0 @@ | ||
easel_helpers.gemspec | ||
lib/easel_helpers/helpers/date_helper.rb | ||
lib/easel_helpers/helpers/form_helper.rb | ||
lib/easel_helpers/helpers/grid_helper.rb | ||
lib/easel_helpers/helpers/jquery_helper.rb | ||
lib/easel_helpers/helpers/link_helper.rb | ||
lib/easel_helpers/helpers/message_helper.rb | ||
lib/easel_helpers/helpers/navigation_helper.rb | ||
lib/easel_helpers/helpers/rjs_helper.rb | ||
lib/easel_helpers/helpers/structure_helper.rb | ||
lib/easel_helpers/helpers/table_helper.rb | ||
lib/easel_helpers/helpers.rb | ||
lib/easel_helpers/rails_partial_caching.rb | ||
lib/easel_helpers.rb | ||
Manifest | ||
MIT-LICENSE | ||
rails/init.rb | ||
Rakefile | ||
README.textile | ||
tasks/easel_helpers_tasks.rake | ||
test/date_helper_test.rb | ||
test/form_helper_test.rb | ||
test/grid_helper_test.rb | ||
test/jquery_helper_test.rb | ||
test/link_helper_test.rb | ||
test/message_helper_test.rb | ||
test/navigation_helper_test.rb | ||
test/rjs_helper_test.rb | ||
test/structure_helper_test.rb | ||
test/table_helper_test.rb | ||
test/test_helper.rb | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
h1. Easel Helpers | ||
h1. Viewaide | ||
|
||
Copyright (c) 2009 Josh Clayton, released under the MIT license |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
require "hpricot" | ||
require "viewaide/helpers" | ||
require "viewaide/rails_partial_caching" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
lib/easel_helpers/helpers/date_helper.rb → lib/viewaide/helpers/date_helper.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module EaselHelpers | ||
module Viewaide | ||
module Helpers | ||
module DateHelper | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
lib/easel_helpers/helpers/form_helper.rb → lib/viewaide/helpers/form_helper.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module EaselHelpers | ||
module Viewaide | ||
module Helpers | ||
module FormHelper | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
lib/easel_helpers/helpers/jquery_helper.rb → lib/viewaide/helpers/jquery_helper.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module EaselHelpers | ||
module Viewaide | ||
module Helpers | ||
module JqueryHelper | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
lib/easel_helpers/helpers/link_helper.rb → lib/viewaide/helpers/link_helper.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module EaselHelpers | ||
module Viewaide | ||
module Helpers | ||
module LinkHelper | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
lib/easel_helpers/helpers/message_helper.rb → lib/viewaide/helpers/message_helper.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module EaselHelpers | ||
module Viewaide | ||
module Helpers | ||
module MessageHelper | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...asel_helpers/helpers/navigation_helper.rb → lib/viewaide/helpers/navigation_helper.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
lib/easel_helpers/helpers/rjs_helper.rb → lib/viewaide/helpers/rjs_helper.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module EaselHelpers | ||
module Viewaide | ||
module Helpers | ||
module RjsHelper | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...easel_helpers/helpers/structure_helper.rb → lib/viewaide/helpers/structure_helper.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module EaselHelpers | ||
module Viewaide | ||
module Helpers | ||
module StructureHelper | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
lib/easel_helpers/helpers/table_helper.rb → lib/viewaide/helpers/table_helper.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module EaselHelpers | ||
module Viewaide | ||
module Helpers | ||
module TableHelper | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
module ActionView | ||
module Partials | ||
private | ||
|
||
def render_partial_with_viewaide(*args) | ||
path = args.first[:partial] | ||
locals = args.last || {} | ||
|
||
viewaide_cached_column_counts = session[:viewaide_cached_column_counts] ||= {} | ||
|
||
if viewaide_cached_column_counts.keys.include?(path) | ||
@_viewaide_column_count = locals[:viewaide_width] || viewaide_cached_column_counts[path] | ||
viewaide_cached_column_counts[path] = @_viewaide_column_count | ||
else | ||
if @_viewaide_column_count.is_a?(Fixnum) && path !~ /^layout/ | ||
viewaide_cached_column_counts[path] = @_viewaide_column_count | ||
end | ||
end | ||
|
||
render_partial_without_viewaide(*args) | ||
end | ||
|
||
alias_method_chain :render_partial, :viewaide | ||
end | ||
end | ||
|
||
module Viewaide | ||
module PartialCaching | ||
def self.included(base) | ||
base.send :include, Viewaide::PartialCaching::InstanceMethods | ||
base.before_filter :clear_viewaide_cache | ||
end | ||
|
||
module InstanceMethods | ||
def clear_viewaide_cache | ||
session[:viewaide_cached_column_counts] = nil unless request.xhr? | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
require "easel_helpers" | ||
require "viewaide" | ||
|
||
ActionView::Base.send :include, EaselHelpers::Helpers | ||
ActionController::Base.send :include, EaselHelpers::PartialCaching | ||
ActionView::Base.send :include, Viewaide::Helpers | ||
ActionController::Base.send :include, Viewaide::PartialCaching |
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.