summaryrefslogtreecommitdiff
path: root/public/javascripts/shadowbox/adapters
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-06-30 17:11:32 +0200
committererdgeist <erdgeist@erdgeist.org>2026-06-30 17:29:12 +0200
commit3e87925a35f73aa2261eb66df3ef4ca11b64eeea (patch)
tree8a9a6da1f99b4480e07548ffaf5d5b4945603ba9 /public/javascripts/shadowbox/adapters
parentb97466cdfbcb5b02d4eaf38661c051d1a095838e (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')
-rw-r--r--public/javascripts/shadowbox/adapters/README11
-rw-r--r--public/javascripts/shadowbox/adapters/shadowbox-base.js1
-rw-r--r--public/javascripts/shadowbox/adapters/shadowbox-dojo.js1
-rw-r--r--public/javascripts/shadowbox/adapters/shadowbox-ext.js1
-rw-r--r--public/javascripts/shadowbox/adapters/shadowbox-jquery.js1
-rw-r--r--public/javascripts/shadowbox/adapters/shadowbox-mootools.js1
-rw-r--r--public/javascripts/shadowbox/adapters/shadowbox-prototype.js1
-rw-r--r--public/javascripts/shadowbox/adapters/shadowbox-yui.js1
8 files changed, 0 insertions, 18 deletions
diff --git a/public/javascripts/shadowbox/adapters/README b/public/javascripts/shadowbox/adapters/README
deleted file mode 100644
index 5083961..0000000
--- a/public/javascripts/shadowbox/adapters/README
+++ /dev/null
@@ -1,11 +0,0 @@
1A Shadowbox "adapter" is a small helper file that makes it easy to use
2Shadowbox with a given JavaScript framework. Since most JavaScript frameworks
3tend to contain a basic set of very similar functions (for retrieving style
4information on elements or handling events, for example) it is not necessary to
5tie Shadowbox to a particular framework. Instead, the adapter can use the
6underlying framework that is already loaded on the page to reuse some of the
7code.
8
9If you do not see an adapter for your favorite framework in this directory, feel
10free to create your own and implement the same interface as the others. It may
11then be used the same as you would use any other.
diff --git a/public/javascripts/shadowbox/adapters/shadowbox-base.js b/public/javascripts/shadowbox/adapters/shadowbox-base.js
deleted file mode 100644
index bfe0573..0000000
--- a/public/javascripts/shadowbox/adapters/shadowbox-base.js
+++ /dev/null
@@ -1 +0,0 @@
1if(typeof Shadowbox=="undefined"){throw"Unable to load Shadowbox adapter, Shadowbox not found"}Shadowbox.lib=function(){var b=Shadowbox.client,a=document.defaultView,d;if(b.isIE6){d=[];function c(){var h;for(var g=0,f=d.length;g<f;++g){h=d[g];h[0].detachEvent("on"+h[1],h[2])}window.detachEvent("onunload",c)}window.attachEvent("onunload",c)}return{getStyle:a&&a.getComputedStyle?function(h,g){var e,f;if(g=="float"){g="cssFloat"}if(e=h.style[g]){return e}if(f=a.getComputedStyle(h,"")){return f[g]}return null}:function(i,h){var f,g;if(h=="opacity"){if(typeof i.style.filter=="string"){var e=i.style.filter.match(/alpha\(opacity=(.+)\)/i);if(e){var j=parseFloat(e[1]);if(!isNaN(j)){return(j?j/100:0)}}}return 1}if(h=="float"){h="styleFloat"}if(f=i.style[h]){return f}if(g=i.currentStyle){return g[h]}return null},remove:function(e){e.parentNode.removeChild(e)},getTarget:function(g){var f=g.target?g.target:g.srcElement;return f.nodeType==3?f.parentNode:f},getPageXY:function(g){var f=g.pageX||(g.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));var h=g.pageY||(g.clientY+(document.documentElement.scrollTop||document.body.scrollTop));return[f,h]},preventDefault:function(f){if(f.preventDefault){f.preventDefault()}else{f.returnValue=false}},keyCode:function(f){return f.which?f.which:f.keyCode},addEvent:function(g,e,f){if(d){d[d.length]=arguments}if(g.addEventListener){g.addEventListener(e,f,false)}else{if(g.attachEvent){g.attachEvent("on"+e,f)}}},removeEvent:function(g,e,f){if(g.removeEventListener){g.removeEventListener(e,f,false)}else{if(g.detachEvent){g.detachEvent("on"+e,f)}}},append:function(g,f){if(g.insertAdjacentHTML){g.insertAdjacentHTML("BeforeEnd",f)}else{if(g.lastChild){var e=g.ownerDocument.createRange();e.setStartAfter(g.lastChild);var h=e.createContextualFragment(f);g.appendChild(h)}else{g.innerHTML=f}}}}}();(function(){var c,b=false;function a(){if(b){return}b=true;if(c){window.clearInterval(c)}Shadowbox.load()}if(document.addEventListener){if(Shadowbox.client.isWebkit){c=window.setInterval(function(){if(/loaded|complete/.test(document.readyState)){a()}},0)}else{document.addEventListener("DOMContentLoaded",a,false)}}else{document.write("<script id=__onDOMReady defer src=//:><\/script>");document.getElementById("__onDOMReady").onreadystatechange=function(){if(this.readyState=="complete"){this.onreadystatechange=null;a()}}}Shadowbox.lib.addEvent(window,"load",a)})(); \ No newline at end of file
diff --git a/public/javascripts/shadowbox/adapters/shadowbox-dojo.js b/public/javascripts/shadowbox/adapters/shadowbox-dojo.js
deleted file mode 100644
index f264c9b..0000000
--- a/public/javascripts/shadowbox/adapters/shadowbox-dojo.js
+++ /dev/null
@@ -1 +0,0 @@
1if(typeof dojo=="undefined"){throw"Unable to load Shadowbox adapter, Dojo not found"}if(typeof Shadowbox=="undefined"){throw"Unable to load Shadowbox adapter, Shadowbox not found"}Shadowbox.lib=function(){var a=[];return{getStyle:function(c,b){return dojo.style(c,b)},remove:function(b){dojo._destroyElement(b)},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(e,b,d){var c=dojo.connect(e,b,d);a.push({el:e,name:b,handle:c})},removeEvent:function(d,b,c){dojo.forEach(a,function(f,e){if(f&&f.el==d&&f.name==b){dojo.disconnect(f.handle);a[e]=null}})},append:function(d,c){if(d.insertAdjacentHTML){d.insertAdjacentHTML("BeforeEnd",c)}else{if(d.lastChild){var b=d.ownerDocument.createRange();b.setStartAfter(d.lastChild);var e=b.createContextualFragment(c);d.appendChild(e)}else{d.innerHTML=c}}}}}();dojo.addOnLoad(Shadowbox.load); \ No newline at end of file
diff --git a/public/javascripts/shadowbox/adapters/shadowbox-ext.js b/public/javascripts/shadowbox/adapters/shadowbox-ext.js
deleted file mode 100644
index e88063b..0000000
--- a/public/javascripts/shadowbox/adapters/shadowbox-ext.js
+++ /dev/null
@@ -1 +0,0 @@
1if(typeof Ext=="undefined"){throw"Unable to load Shadowbox adapter, Ext not found"}if(typeof Shadowbox=="undefined"){throw"Unable to load Shadowbox adapter, Shadowbox not found"}Shadowbox.lib=function(){var a=Ext.lib.Event;return{getStyle:function(c,b){return Ext.get(c).getStyle(b)},remove:function(b){Ext.get(b).remove()},getTarget:function(b){return a.getTarget(b)},getPageXY:function(b){return[a.getPageX(b),a.getPageY(b)]},preventDefault:function(b){a.preventDefault(b)},keyCode:function(b){return a.getCharCode(b)},addEvent:function(d,b,c){a.addListener(d,b,c)},removeEvent:function(d,b,c){a.removeListener(d,b,c)},append:function(c,b){Ext.DomHelper.append(c,b)}}}();Ext.onReady(Shadowbox.load); \ No newline at end of file
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 @@
1if(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
diff --git a/public/javascripts/shadowbox/adapters/shadowbox-mootools.js b/public/javascripts/shadowbox/adapters/shadowbox-mootools.js
deleted file mode 100644
index 58c0015..0000000
--- a/public/javascripts/shadowbox/adapters/shadowbox-mootools.js
+++ /dev/null
@@ -1 +0,0 @@
1if(typeof MooTools=="undefined"){throw"Unable to load Shadowbox adapter, MooTools not found"}if(typeof Shadowbox=="undefined"){throw"Unable to load Shadowbox adapter, Shadowbox not found"}Shadowbox.lib={getStyle:function(b,a){return $(b).getStyle(a)},remove:function(a){a.parentNode.removeChild(a)},getTarget:function(a){return a.target},getPageXY:function(a){return[a.page.x,a.page.y]},preventDefault:function(a){a.preventDefault()},keyCode:function(a){return a.code},addEvent:function(c,a,b){$(c).addEvent(a,b)},removeEvent:function(c,a,b){$(c).removeEvent(a,b)},append:function(c,b){if(c.insertAdjacentHTML){c.insertAdjacentHTML("BeforeEnd",b)}else{if(c.lastChild){var a=c.ownerDocument.createRange();a.setStartAfter(c.lastChild);var d=a.createContextualFragment(b);c.appendChild(d)}else{c.innerHTML=b}}}};window.addEvent("domready",Shadowbox.load); \ No newline at end of file
diff --git a/public/javascripts/shadowbox/adapters/shadowbox-prototype.js b/public/javascripts/shadowbox/adapters/shadowbox-prototype.js
deleted file mode 100644
index 637dd87..0000000
--- a/public/javascripts/shadowbox/adapters/shadowbox-prototype.js
+++ /dev/null
@@ -1 +0,0 @@
1if(typeof Prototype=="undefined"){throw"Unable to load Shadowbox adapter, Prototype not found"}if(typeof Shadowbox=="undefined"){throw"Unable to load Shadowbox adapter, Shadowbox not found"}Shadowbox.lib={getStyle:function(b,a){return Element.getStyle(b,a)},remove:function(a){Element.remove(a)},getTarget:function(a){return Event.element(a)},getPageXY:function(b){var a=Event.pointer(b);return[a.x,a.y]},preventDefault:function(a){Event.stop(a)},keyCode:function(a){return a.keyCode},addEvent:function(c,a,b){Event.observe(c,a,b)},removeEvent:function(c,a,b){Event.stopObserving(c,a,b)},append:function(b,a){Element.insert(b,a)}};document.observe("dom:loaded",Shadowbox.load); \ No newline at end of file
diff --git a/public/javascripts/shadowbox/adapters/shadowbox-yui.js b/public/javascripts/shadowbox/adapters/shadowbox-yui.js
deleted file mode 100644
index f045d76..0000000
--- a/public/javascripts/shadowbox/adapters/shadowbox-yui.js
+++ /dev/null
@@ -1 +0,0 @@
1if(typeof YAHOO=="undefined"){throw"Unable to load Shadowbox adapter, YAHOO not found"}if(typeof Shadowbox=="undefined"){throw"Unable to load Shadowbox adapter, Shadowbox not found"}Shadowbox.lib=function(){var a=YAHOO.util.Event;var b=YAHOO.util.Dom;return{getStyle:function(d,c){return b.getStyle(d,c)},remove:function(c){c.parentNode.removeChild(c)},getTarget:function(c){return a.getTarget(c)},getPageXY:function(c){return[a.getPageX(c),a.getPageY(c)]},preventDefault:function(c){a.preventDefault(c)},keyCode:function(c){return c.keyCode},addEvent:function(e,c,d){a.addListener(e,c,d)},removeEvent:function(e,c,d){a.removeListener(e,c,d)},append:function(e,d){if(e.insertAdjacentHTML){e.insertAdjacentHTML("BeforeEnd",d)}else{if(e.lastChild){var c=e.ownerDocument.createRange();c.setStartAfter(e.lastChild);var f=c.createContextualFragment(d);e.appendChild(f)}else{e.innerHTML=d}}}}}();YAHOO.util.Event.onDOMReady(Shadowbox.load); \ No newline at end of file