diff --git a/Gemfile b/Gemfile index 2f2e1d3b9..99e0a723c 100644 --- a/Gemfile +++ b/Gemfile @@ -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" diff --git a/Gemfile.lock b/Gemfile.lock index 4c8321b6c..164c451de 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 61eb7a869..f8903dd30 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -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(); }; diff --git a/app/assets/javascripts/best_in_place_initialize.js.coffee b/app/assets/javascripts/best_in_place_initialize.js.coffee deleted file mode 100644 index 0b833b921..000000000 --- a/app/assets/javascripts/best_in_place_initialize.js.coffee +++ /dev/null @@ -1,3 +0,0 @@ -App.BestInPlace = - initialize: -> - $(".best_in_place").best_in_place() diff --git a/app/views/dashboard/polls/_poll.html.erb b/app/views/dashboard/polls/_poll.html.erb index 99da065f6..d41fa54e1 100644 --- a/app/views/dashboard/polls/_poll.html.erb +++ b/app/views/dashboard/polls/_poll.html.erb @@ -24,15 +24,12 @@ <% end %> - <%= best_in_place poll, - :results_enabled, - as: :checkbox, - url: proposal_dashboard_poll_url(proposal, poll), - collection: { - false: raw(''), - true: raw('') - } %> - <%= t("dashboard.polls.poll.show_results") %> + <%= 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 %>
<%= t("dashboard.polls.poll.show_results_help") %>