diff --git a/Gemfile b/Gemfile index e7fc752be..6f21bc9a6 100644 --- a/Gemfile +++ b/Gemfile @@ -10,8 +10,6 @@ gem 'bootsnap' gem 'puma', '3.12.6' gem 'webpacker', '~> 5.x' -# Use jquery as the JavaScript library -gem 'jquery-rails' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.5' gem 'jbuilder_cache_multi' diff --git a/Gemfile.lock b/Gemfile.lock index df35b479f..74e6b9bff 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -170,10 +170,6 @@ GEM activesupport (>= 5.0.0) jbuilder_cache_multi (0.1.0) jbuilder (>= 1.5.0, < 3) - jquery-rails (4.3.5) - rails-dom-testing (>= 1, < 3) - railties (>= 4.2.0) - thor (>= 0.14, < 2.0) json (2.3.1) jwt (2.2.1) kaminari (1.2.1) @@ -447,7 +443,6 @@ DEPENDENCIES icalendar jbuilder (~> 2.5) jbuilder_cache_multi - jquery-rails json (>= 2.3.0) kaminari listen (~> 3.0.5) diff --git a/app/frontend/packs/application.js b/app/frontend/packs/application.js index 39f43e015..51140cb08 100644 --- a/app/frontend/packs/application.js +++ b/app/frontend/packs/application.js @@ -2,51 +2,49 @@ import 'core-js/stable'; import 'regenerator-runtime/runtime'; import 'jquery'; -import 'jquery_ujs'; +import {} from 'jquery-ujs'; import 'bootstrap-sass'; -import 'polyfill'; +import '../src/javascript/lib/polyfill'; import 'angular'; import 'angular-cookies'; import 'angular-resource'; import 'angular-sanitize'; import 'angular-touch'; -import '@uirouter/angularjs/release/angular-ui-router'; -import 'angular-ui-bootstrap/dist/ui-bootstrap-tpls'; -import 'ui-select/dist/select'; -import 'moment/moment'; -import 'moment-timezone/builds/moment-timezone-with-data-2012-2022'; -import 'angular-ui-calendar/src/calendar'; -import 'fullcalendar/dist/fullcalendar'; -import 'angular-moment/angular-moment'; -import 'ngUpload/ng-upload'; +import '@uirouter/angularjs'; +import 'angular-ui-bootstrap'; +import 'ui-select'; +import 'moment'; +import 'moment-timezone'; +import 'angular-ui-calendar'; +import 'fullcalendar'; +import 'angular-moment'; +import 'ngUpload'; import 'jasny-bootstrap/js/fileinput'; -import 'holderjs/holder'; -import 'AngularDevise/lib/devise'; -import 'devise-modal'; -import 'angular-growl-v2/build/angular-growl'; -import 'angular-xeditable/dist/js/xeditable'; +import 'holderjs'; +import 'AngularDevise'; +import '../src/javascript/lib/devise-modal'; +import 'angular-growl-v2'; +import 'angular-xeditable'; import 'checklist-model/checklist-model'; import 'angular-unsavedchanges/lib/unsavedChanges'; import 'angular-loading-bar/src/loading-bar'; import 'angular-scroll/angular-scroll'; import 'angular-google-analytics/dist/angular-google-analytics'; -import 'dirDisqus'; -import 'humanize'; +import '../src/javascript/lib/dirDisqus'; +import '../src/javascript/lib/humanize'; import 'underscore/underscore'; import 'elasticsearch-browser/elasticsearch.angular'; import 'd3/d3'; import 'nvd3/build/nv.d3.js'; import 'twitter-fetcher'; -import 'app'; -import 'router'; import 'medium-editor/dist/js/medium-editor'; import 'angular-medium-editor/dist/angular-medium-editor'; import 'bootstrap-switch/dist/js/bootstrap-switch.min'; import 'angular-bootstrap-switch/dist/angular-bootstrap-switch.min'; import 'angular-base64-upload/dist/angular-base64-upload.min'; -import 'summernote/src/js/summernote'; +import 'summernote'; import 'angular-summernote/dist/angular-summernote'; -import 'summernote-ext-nugget'; +import '../src/javascript/lib/summernote-ext-nugget'; import 'jquery-minicolors/jquery.minicolors.js'; import 'angular-minicolors/angular-minicolors.js'; import 'angular-translate/dist/angular-translate'; @@ -66,7 +64,7 @@ import 'angular-hotkeys/build/hotkeys'; import 'hone/dist/hone'; import 'tether/dist/js/tether'; import 'angular-bind-html-compile/angular-bind-html-compile'; -import 'angular-ui-tour/dist/angular-ui-tour'; +import 'angular-ui-tour/app/angular-ui-tour'; import '../src/javascript/app.js'; import '../src/javascript/router.js.erb'; diff --git a/app/frontend/packs/application.scss b/app/frontend/packs/application.scss index 23738d3fc..2b21c586a 100644 --- a/app/frontend/packs/application.scss +++ b/app/frontend/packs/application.scss @@ -1,4 +1,3 @@ - @import '~ui-select/dist/select'; @import '~fullcalendar/dist/fullcalendar'; @import '~jasny-bootstrap/dist/css/jasny-bootstrap'; diff --git a/vendor/assets/javascripts/devise-modal.js b/app/frontend/src/javascript/lib/devise-modal.js similarity index 100% rename from vendor/assets/javascripts/devise-modal.js rename to app/frontend/src/javascript/lib/devise-modal.js diff --git a/vendor/assets/javascripts/dirDisqus.js b/app/frontend/src/javascript/lib/dirDisqus.js similarity index 100% rename from vendor/assets/javascripts/dirDisqus.js rename to app/frontend/src/javascript/lib/dirDisqus.js diff --git a/vendor/assets/javascripts/humanize.js b/app/frontend/src/javascript/lib/humanize.js similarity index 100% rename from vendor/assets/javascripts/humanize.js rename to app/frontend/src/javascript/lib/humanize.js diff --git a/lib/assets/javascripts/polyfill.js b/app/frontend/src/javascript/lib/polyfill.js similarity index 83% rename from lib/assets/javascripts/polyfill.js rename to app/frontend/src/javascript/lib/polyfill.js index 259a3ae15..5425e5460 100644 --- a/lib/assets/javascripts/polyfill.js +++ b/app/frontend/src/javascript/lib/polyfill.js @@ -1,7 +1,7 @@ if (typeof Object.assign !== 'function') { // Must be writable: true, enumerable: false, configurable: true - Object.defineProperty(Object, "assign", { - value: function assign(target, varArgs) { // .length of function is 2 + Object.defineProperty(Object, 'assign', { + value: function assign (target, varArgs) { // .length of function is 2 'use strict'; if (target == null) { // TypeError if undefined or null throw new TypeError('Cannot convert undefined or null to object'); @@ -28,8 +28,8 @@ if (typeof Object.assign !== 'function') { }); } -Number.isInteger = Number.isInteger || function(value) { +Number.isInteger = Number.isInteger || function (value) { return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; -}; \ No newline at end of file +}; diff --git a/vendor/assets/javascripts/summernote-ext-nugget.js b/app/frontend/src/javascript/lib/summernote-ext-nugget.js similarity index 100% rename from vendor/assets/javascripts/summernote-ext-nugget.js rename to app/frontend/src/javascript/lib/summernote-ext-nugget.js diff --git a/app/frontend/src/stylesheets/application.scss.erb b/app/frontend/src/stylesheets/application.scss.erb index cbe642b2a..2ff84d3d2 100644 --- a/app/frontend/src/stylesheets/application.scss.erb +++ b/app/frontend/src/stylesheets/application.scss.erb @@ -11,7 +11,16 @@ @import "app.buttons"; @import "app.components"; @import "app.plugins"; -@import "modules/*"; + +@import "modules/abuses"; +@import "modules/cookies"; +@import "modules/icalendar"; +@import "modules/invoice"; +@import "modules/members"; +@import "modules/settings"; +@import "modules/signup"; +@import "modules/stripe"; +@import "modules/tour"; @import "app.responsive"; diff --git a/app/frontend/templates/profile/complete.html b/app/frontend/templates/profile/complete.html index 30765affb..344e5418c 100644 --- a/app/frontend/templates/profile/complete.html +++ b/app/frontend/templates/profile/complete.html @@ -36,11 +36,11 @@
+ clear