summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-06-30 04:58:37 +0200
committererdgeist <erdgeist@erdgeist.org>2026-06-30 17:29:12 +0200
commitb97466cdfbcb5b02d4eaf38661c051d1a095838e (patch)
treeb83481f5add25d0b317c23b3a2a1a5baf2091384 /app
parent86ec5535445ef7c3e4d40a403f9469379ec37dde (diff)
Unify jQuery: serve public site jQuery via asset pipeline
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.
Diffstat (limited to 'app')
-rw-r--r--app/assets/config/manifest.js1
-rw-r--r--app/assets/javascripts/public_bundle.js2
-rw-r--r--app/views/layouts/application.html.erb2
3 files changed, 4 insertions, 1 deletions
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 @@
1//= link admin_bundle.js 1//= link admin_bundle.js
2//= 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 @@
1//= require jquery
2//= 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 @@
11 11
12 <title><%= page_title %></title> 12 <title><%= page_title %></title>
13 <link rel="stylesheet" href="/stylesheets/ccc.css"> 13 <link rel="stylesheet" href="/stylesheets/ccc.css">
14 <script src="/javascripts/jquery-1.3.2.min.js"></script> 14 <%= javascript_include_tag 'public_bundle' %>
15 <script src="/javascripts/shadowbox/shadowbox.js"></script> 15 <script src="/javascripts/shadowbox/shadowbox.js"></script>
16 <link rel="stylesheet" href="/stylesheets/shadowbox.css"> 16 <link rel="stylesheet" href="/stylesheets/shadowbox.css">
17 <script src="/javascripts/public.js"></script> 17 <script src="/javascripts/public.js"></script>