From b97466cdfbcb5b02d4eaf38661c051d1a095838e Mon Sep 17 00:00:00 2001 From: erdgeist Date: Tue, 30 Jun 2026 04:58:37 +0200 Subject: Unify jQuery: serve public site jQuery via asset pipeline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove vendored jquery-1.3.2.min.js, jquery-ui-1.7.2.custom.min.js, and the unreferenced duplicate jquery.hotkeys.js from public/javascripts/. Public layout now loads jQuery via a small public_bundle.js manifest through the asset pipeline, same mechanism already used for the admin interface (admin_bundle.js). This brings the public site from jQuery 1.3.2 (2009) to the current jquery-rails-provided version (3.7.x). Shadowbox's jQuery adapter (shadowbox-jquery.js) only uses stable APIs (.css, .remove, .bind, .unbind, .append, .extend) unchanged across this version span. Verified by manual click-test: gallery image opens, displays, and dismisses correctly. public.js required no changes — all jQuery APIs used (.ready, .bind, .trigger, .length) are stable across versions. --- app/assets/config/manifest.js | 1 + app/assets/javascripts/public_bundle.js | 2 ++ app/views/layouts/application.html.erb | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 app/assets/javascripts/public_bundle.js (limited to 'app') diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index 56d7f6d..5c3b551 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -1 +1,2 @@ //= link admin_bundle.js +//= link public_bundle.js diff --git a/app/assets/javascripts/public_bundle.js b/app/assets/javascripts/public_bundle.js new file mode 100644 index 0000000..b66b4a3 --- /dev/null +++ b/app/assets/javascripts/public_bundle.js @@ -0,0 +1,2 @@ +//= require jquery +//= require_self diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 48e0a5b..5edb614 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -11,7 +11,7 @@ <%= page_title %> - + <%= javascript_include_tag 'public_bundle' %> -- cgit v1.3