Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use rails_autosize_jquery #577

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions best_in_place.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ DESC
s.require_paths = ["lib"]

s.add_runtime_dependency 'actionpack', '>= 3.2'
s.add_runtime_dependency 'rails_autosize_jquery', '3.0.15'
s.add_runtime_dependency 'railties', '>= 3.2'

end
2 changes: 1 addition & 1 deletion lib/assets/javascripts/best_in_place.js
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ BestInPlaceEditor.forms = {

// set width and height of textarea
jQuery(this.element.find("textarea")[0]).css({'min-width': width, 'min-height': height});
jQuery(this.element.find("textarea")[0]).autosize();
autosize(this.element.find("textarea")[0]);

this.element.find("textarea")[0].focus();
this.element.find("form").bind('submit', {editor: this}, BestInPlaceEditor.forms.textarea.submitHandler);
Expand Down
1 change: 1 addition & 0 deletions lib/best_in_place/engine.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module BestInPlace
class Engine < Rails::Engine
require 'rails_autosize_jquery'
initializer 'best_in_place' do
ActionView::Base.send(:include, BestInPlace::Helper)
ActionController::Base.send(:include, BestInPlace::ControllerExtensions)
Expand Down
272 changes: 0 additions & 272 deletions vendor/assets/javascripts/jquery.autosize.js

This file was deleted.