From 501a2cce42b2d21bd3ea70755a34e64392db9f8a Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Thu, 7 May 2020 19:29:12 +0200 Subject: [PATCH] Replace bootstrap3-datetimepicker with a BS4 equivalent --- Gemfile | 3 ++- Gemfile.lock | 11 ++++++++--- app/assets/javascripts/moderation.js.erb.coffee | 4 +++- app/assets/stylesheets/application.scss | 3 ++- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 2a61b709..470ffa08 100644 --- a/Gemfile +++ b/Gemfile @@ -34,7 +34,8 @@ gem 'fog-core' gem 'fog-aws' gem 'fog-local' gem 'momentjs-rails', '>= 2.9.0' -gem 'bootstrap3-datetimepicker-rails', '~> 4.7.14' +gem 'moment-timezone-rails', '~> 1.0' +gem 'bootstrap4-datetime-picker-rails' gem 'tiny-color-rails' gem 'jquery-minicolors-rails' gem 'colorize' diff --git a/Gemfile.lock b/Gemfile.lock index 781aa040..fb1728a5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -80,8 +80,10 @@ GEM autoprefixer-rails (>= 9.1.0) popper_js (>= 1.14.3, < 2) sassc-rails (>= 2.0.0) - bootstrap3-datetimepicker-rails (4.7.14) - momentjs-rails (>= 2.8.1) + bootstrap4-datetime-picker-rails (0.3.1) + jquery-rails (~> 4.2, >= 4.2.0) + moment-timezone-rails (~> 1.0) + momentjs-rails (>= 2.10.5, <= 3.0.0) bootstrap_form (4.4.0) actionpack (>= 5.0) activemodel (>= 5.0) @@ -268,6 +270,8 @@ GEM mini_mime (1.0.2) mini_portile2 (2.4.0) minitest (5.14.0) + moment-timezone-rails (1.0.0) + momentjs-rails (>= 2.10.5, <= 3.0.0) momentjs-rails (2.20.1) railties (>= 3.1) multi_json (1.14.1) @@ -512,7 +516,7 @@ DEPENDENCIES bcrypt (~> 3.1.7) better_errors bootstrap (~> 4.4, >= 4.4.1) - bootstrap3-datetimepicker-rails (~> 4.7.14) + bootstrap4-datetime-picker-rails bootstrap_form brakeman byebug @@ -542,6 +546,7 @@ DEPENDENCIES jquery-rails jquery-turbolinks letter_opener + moment-timezone-rails (~> 1.0) momentjs-rails (>= 2.9.0) newrelic_rpm nprogress-rails diff --git a/app/assets/javascripts/moderation.js.erb.coffee b/app/assets/javascripts/moderation.js.erb.coffee index 60eefeaf..0eb4ec03 100644 --- a/app/assets/javascripts/moderation.js.erb.coffee +++ b/app/assets/javascripts/moderation.js.erb.coffee @@ -1,3 +1,5 @@ #= require moment -#= require bootstrap-datetimepicker +#= require tempusdominus-bootstrap-4 #= require_tree ./moderation + +$('.datetimepicker-input').datetimepicker(); \ No newline at end of file diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 7ff8124a..768706ef 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -26,7 +26,7 @@ @import "bootstrap", -"bootstrap-datetimepicker", +"tempusdominus-bootstrap-4", "font-awesome", "nprogress", "nprogress-bootstrap"; @@ -76,6 +76,7 @@ */ @import +"components/announcements", "components/answerbox", "components/avatars", "components/buttons",