From 3e87925a35f73aa2261eb66df3ef4ca11b64eeea Mon Sep 17 00:00:00 2001 From: erdgeist Date: Tue, 30 Jun 2026 17:11:32 +0200 Subject: Replace Shadowbox with GLightbox, drop jQuery from public site Vendors GLightbox 3.3.1 (MIT, dependency-free) as static files in public/javascripts and public/stylesheets, replacing the Shadowbox 2009 vendor tree and its jQuery adapter. Public site no longer loads jQuery at all. - app/views/layouts/application.html.erb: swap Shadowbox script/style includes and the public_bundle (jQuery) include for GLightbox's CSS/JS - app/views/content/_headline_image.html.erb: headline image is now itself a GLightbox trigger; additional images are direct a.glightbox links sharing a per-page data-gallery group, replacing the hidden shadowbox_images div and its click-forwarding trigger - public/javascripts/public.js: replace Shadowbox.init/setup and the click-forwarding handler with a single GLightbox() init call; remove the unused image_handler object - Remove public/javascripts/shadowbox/ (including vendored Sizzle, swfobject, and unused video/Flash players) and public/stylesheets/shadowbox.css - Remove app/assets/javascripts/public_bundle.js (jquery require) --- public/javascripts/shadowbox/players/README | 35 ---------------------- .../javascripts/shadowbox/players/shadowbox-flv.js | 1 - .../shadowbox/players/shadowbox-html.js | 1 - .../shadowbox/players/shadowbox-iframe.js | 1 - .../javascripts/shadowbox/players/shadowbox-img.js | 1 - .../javascripts/shadowbox/players/shadowbox-qt.js | 1 - .../javascripts/shadowbox/players/shadowbox-swf.js | 1 - .../javascripts/shadowbox/players/shadowbox-wmp.js | 1 - 8 files changed, 42 deletions(-) delete mode 100644 public/javascripts/shadowbox/players/README delete mode 100644 public/javascripts/shadowbox/players/shadowbox-flv.js delete mode 100644 public/javascripts/shadowbox/players/shadowbox-html.js delete mode 100644 public/javascripts/shadowbox/players/shadowbox-iframe.js delete mode 100644 public/javascripts/shadowbox/players/shadowbox-img.js delete mode 100644 public/javascripts/shadowbox/players/shadowbox-qt.js delete mode 100644 public/javascripts/shadowbox/players/shadowbox-swf.js delete mode 100644 public/javascripts/shadowbox/players/shadowbox-wmp.js (limited to 'public/javascripts/shadowbox/players') diff --git a/public/javascripts/shadowbox/players/README b/public/javascripts/shadowbox/players/README deleted file mode 100644 index 7f32991..0000000 --- a/public/javascripts/shadowbox/players/README +++ /dev/null @@ -1,35 +0,0 @@ -A Shadowbox "player" is a class that is used specifically for displaying a -particular medium. For example, an image player is included for displaying -images, a QuickTime player is included for playing QuickTime movies, etc. - -All players should implement the same interface. This makes it possible for the -Shadowbox class to know what methods to call and properties to check on player -objects. - -The interface is described here, with some simple explanations of how each -method and/or property is to be used. - -METHOD/PROPERTY DESCRIPTION - -height (Number) The height of the object (in pixels) -width (Number) The width of the object (in pixels) -ready (optional, Boolean) True if the content is ready to be - loaded, false otherwise. Useful when the script should wait - until the content loads before proceeding (see below) -resizable (optional, Boolean) True if the content can be dynamically - resized by the script (e.g. images, but not most movie - formats) -append() Appends this object to the DOM -remove() Removes this object from the DOM -onLoad() (optional) Called after the content is loaded and the - loading layer is hidden -onWindowResize() (optional) Called when the window is resized - -If the ready property is set to false, the script will wait until it is set true -before proceeding to call the onReady callback. This property should be changed -in some callback function within the player class itself. - -In this case, the object's height and width do not need to be made available -immediately (because they may not initially be known). However, in the same -callback, the height and width should be set. See the Shadowbox.img class (in -shadowbox-img.js) for an example of this behavior. diff --git a/public/javascripts/shadowbox/players/shadowbox-flv.js b/public/javascripts/shadowbox/players/shadowbox-flv.js deleted file mode 100644 index 1925e69..0000000 --- a/public/javascripts/shadowbox/players/shadowbox-flv.js +++ /dev/null @@ -1 +0,0 @@ -(function(b){var a=b.util,c=20;b.flv=function(d){this.obj=d;this.resizable=true;this.height=d.height?parseInt(d.height,10):300;if(b.options.showMovieControls==true){this.height+=c}this.width=d.width?parseInt(d.width,10):300};b.flv.prototype={append:function(l,e,n){this.id=e;var j=document.createElement("div");j.id=e;l.appendChild(j);var k=n.resize_h,o=n.resize_w,f=b.path+"libraries/mediaplayer/player.swf",m=b.options.flashVersion,d=b.path+"libraries/swfobject/expressInstall.swf",g=a.apply({file:this.obj.content,height:k,width:o,autostart:(b.options.autoplayMovies?"true":"false"),controlbar:(b.options.showMovieControls?"bottom":"none"),backcolor:"0x000000",frontcolor:"0xCCCCCC",lightcolor:"0x557722"},b.options.flashVars),i=b.options.flashParams;swfobject.embedSWF(f,e,o,k,m,d,g,i)},remove:function(){swfobject.expressInstallCallback();swfobject.removeSWF(this.id)}}})(Shadowbox); \ No newline at end of file diff --git a/public/javascripts/shadowbox/players/shadowbox-html.js b/public/javascripts/shadowbox/players/shadowbox-html.js deleted file mode 100644 index e01f846..0000000 --- a/public/javascripts/shadowbox/players/shadowbox-html.js +++ /dev/null @@ -1 +0,0 @@ -(function(a){a.html=function(b){this.obj=b;this.height=b.height?parseInt(b.height,10):300;this.width=b.width?parseInt(b.width,10):500};a.html.prototype={append:function(b,e,c){this.id=e;var d=document.createElement("div");d.id=e;d.className="html";d.innerHTML=this.obj.content;b.appendChild(d)},remove:function(){var b=document.getElementById(this.id);if(b){a.lib.remove(b)}}}})(Shadowbox); \ No newline at end of file diff --git a/public/javascripts/shadowbox/players/shadowbox-iframe.js b/public/javascripts/shadowbox/players/shadowbox-iframe.js deleted file mode 100644 index eeac848..0000000 --- a/public/javascripts/shadowbox/players/shadowbox-iframe.js +++ /dev/null @@ -1 +0,0 @@ -(function(a){a.iframe=function(c){this.obj=c;var b=document.getElementById("sb-overlay");this.height=c.height?parseInt(c.height,10):b.offsetHeight;this.width=c.width?parseInt(c.width,10):b.offsetWidth};a.iframe.prototype={append:function(b,e,d){this.id=e;var c='