Remove best_in_place

It was only used in one place, so it's best to remove it and use the
patterns we use everywhere else.
This commit is contained in:
Javi Martín
2019-04-26 12:21:46 +02:00
committed by voodoorai2000
parent f284d5c09e
commit 8094417828
5 changed files with 6 additions and 20 deletions

View File

@@ -7,7 +7,6 @@ gem "acts_as_votable", "~> 0.11.1"
gem "ahoy_matey", "~> 1.6.0"
gem "ancestry", "~> 3.0.2"
gem "autoprefixer-rails", "~> 8.2.0"
gem "best_in_place", "~> 3.0.1"
gem "browser", "~> 2.5.3"
gem "cancancan", "~> 2.3.0"
gem "ckeditor", "~> 4.2.3"

View File

@@ -79,9 +79,6 @@ GEM
babel-source (>= 4.0, < 6)
execjs (~> 2.0)
bcrypt (3.1.12)
best_in_place (3.0.3)
actionpack (>= 3.2)
railties (>= 3.2)
better_html (1.0.13)
actionview (>= 4.0)
activesupport (>= 4.0)
@@ -533,7 +530,6 @@ DEPENDENCIES
ahoy_matey (~> 1.6.0)
ancestry (~> 3.0.2)
autoprefixer-rails (~> 8.2.0)
best_in_place (~> 3.0.1)
browser (~> 2.5.3)
bullet (~> 5.7.0)
byebug (~> 10.0.0)

View File

@@ -17,7 +17,6 @@
//= require jquery-ui/widgets/autocomplete
//= require jquery-ui/widgets/sortable
//= require jquery-fileupload/basic
//= require best_in_place
//= require foundation
//= require turbolinks
//= require ckeditor/loader
@@ -83,7 +82,6 @@
//= require send_newsletter_alert
//= require managers
//= require globalize
//= require best_in_place_initialize
//= require send_admin_notification_alert
//= require settings
@@ -133,7 +131,6 @@ var initialize_modules = function() {
App.SendNewsletterAlert.initialize();
App.Managers.initialize();
App.Globalize.initialize();
App.BestInPlace.initialize();
App.SendAdminNotificationAlert.initialize();
App.Settings.initialize();
};

View File

@@ -1,3 +0,0 @@
App.BestInPlace =
initialize: ->
$(".best_in_place").best_in_place()

View File

@@ -24,15 +24,12 @@
<% end %>
</div>
<%= best_in_place poll,
:results_enabled,
as: :checkbox,
url: proposal_dashboard_poll_url(proposal, poll),
collection: {
false: raw('<input type="checkbox">'),
true: raw('<input type="checkbox" checked>')
} %>
<strong><%= t("dashboard.polls.poll.show_results") %></strong>
<%= form_for poll, remote: true, data: { type: :json },
url: proposal_dashboard_poll_path(proposal, poll) do |f| %>
<%= f.check_box :results_enabled,
label: t("dashboard.polls.poll.show_results"),
class: "js-submit-on-change" %>
<% end %>
<p class="help-text"><%= t("dashboard.polls.poll.show_results_help") %></p>
</div>
</div>