diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-30 17:11:32 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-30 17:29:12 +0200 |
| commit | 3e87925a35f73aa2261eb66df3ef4ca11b64eeea (patch) | |
| tree | 8a9a6da1f99b4480e07548ffaf5d5b4945603ba9 /public/javascripts/shadowbox/adapters/shadowbox-jquery.js | |
| parent | b97466cdfbcb5b02d4eaf38661c051d1a095838e (diff) | |
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)
Diffstat (limited to 'public/javascripts/shadowbox/adapters/shadowbox-jquery.js')
| -rw-r--r-- | public/javascripts/shadowbox/adapters/shadowbox-jquery.js | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/public/javascripts/shadowbox/adapters/shadowbox-jquery.js b/public/javascripts/shadowbox/adapters/shadowbox-jquery.js deleted file mode 100644 index a0965a4..0000000 --- a/public/javascripts/shadowbox/adapters/shadowbox-jquery.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | if(typeof jQuery=="undefined"){throw"Unable to load Shadowbox adapter, jQuery not found"}if(typeof Shadowbox=="undefined"){throw"Unable to load Shadowbox adapter, Shadowbox not found"}Shadowbox.lib=function(a){return{getStyle:function(c,b){return a(c).css(b)},remove:function(b){a(b).remove()},getTarget:function(b){return b.target},getPageXY:function(b){return[b.pageX,b.pageY]},preventDefault:function(b){b.preventDefault()},keyCode:function(b){return b.keyCode},addEvent:function(d,b,c){a(d).bind(b,c)},removeEvent:function(d,b,c){a(d).unbind(b,c)},append:function(c,b){a(c).append(b)}}}(jQuery);jQuery(Shadowbox.load);(function(a){a.fn.shadowbox=function(b){return this.each(function(){var d=a(this);var e=a.extend({},b||{},a.metadata?d.metadata():a.meta?d.data():{});var c=this.className||"";e.width=parseInt((c.match(/w:(\d+)/)||[])[1])||e.width;e.height=parseInt((c.match(/h:(\d+)/)||[])[1])||e.height;Shadowbox.setup(d,e)})}})(jQuery); \ No newline at end of file | ||
