[Midnightbsd-cvs] www: build/adapter: for new site revision
smultron at midnightbsd.org
smultron at midnightbsd.org
Thu Aug 21 15:12:49 EDT 2008
Log Message:
-----------
for new site revision
Added Files:
-----------
www/shadowbox/build/adapter:
shadowbox-base.js (r1.1)
shadowbox-dojo.js (r1.1)
shadowbox-ext.js (r1.1)
shadowbox-jquery.js (r1.1)
shadowbox-mootools.js (r1.1)
shadowbox-prototype.js (r1.1)
shadowbox-yui.js (r1.1)
-------------- next part --------------
--- /dev/null
+++ shadowbox/build/adapter/shadowbox-jquery.js
@@ -0,0 +1 @@
+if(typeof jQuery=="undefined"){throw"Unable to load Shadowbox, jQuery library not found"}var Shadowbox={};Shadowbox.lib={adapter:"jquery",getStyle:function(B,A){return jQuery(B).css(A)},setStyle:function(C,B,D){if(typeof B!="object"){var A={};A[B]=D;B=A}jQuery(C).css(B)},get:function(A){return(typeof A=="string")?document.getElementById(A):A},remove:function(A){jQuery(A).remove()},getTarget:function(A){return A.target},getPageXY:function(A){return[A.pageX,A.pageY]},preventDefault:function(A){A.preventDefault()},keyCode:function(A){return A.keyCode},addEvent:function(C,A,B){jQuery(C).bind(A,B)},removeEvent:function(C,A,B){jQuery(C).unbind(A,B)},append:function(B,A){jQuery(B).append(A)}};(function(A){A.fn.shadowbox=function(B){return this.each(function(){var E=A(this);var D=A.extend({},B||{},A.metadata?E.metadata():A.meta?E.data():{});var C=this.className||"";D.width=parseInt((C.match(/w:(\d+)/)||[])[1])||D.width;D.height=parseInt((C.match(/h:(\d+)/)||[])[1])||D.height;Shadowbox.setup(E,D)})}})(jQuery);
\ No newline at end of file
--- /dev/null
+++ shadowbox/build/adapter/shadowbox-prototype.js
@@ -0,0 +1 @@
+if(typeof Prototype=="undefined"){throw"Unable to load Shadowbox, Prototype framework not found"}var Shadowbox={};Shadowbox.lib=function(){var C={};var B=/(-[a-z])/gi;var A=function(E,F){return F.charAt(1).toUpperCase()};var D=function(F){var E;if(!(E=C[F])){E=C[F]=F.replace(B,A)}return E};return{adapter:"prototype",getStyle:function(F,E){return Element.getStyle(F,E)},setStyle:function(G,F,H){if(typeof F=="string"){var E={};E[D(F)]=H;F=E}Element.setStyle(G,F)},get:function(E){return $(E)},remove:function(E){Element.remove(E)},getTarget:function(E){return Event.element(E)},preventDefault:function(E){Event.stop(E)},getPageXY:function(F){var E=Event.pointer(F);return[E.x,E.y]},keyCode:function(E){return E.keyCode},addEvent:function(G,E,F){Event.observe(G,E,F)},removeEvent:function(G,E,F){Event.stopObserving(G,E,F)},append:function(F,E){Element.insert(F,E)}}}();
\ No newline at end of file
--- /dev/null
+++ shadowbox/build/adapter/shadowbox-ext.js
@@ -0,0 +1 @@
+if(typeof Ext=="undefined"){throw"Unable to load Shadowbox, core Ext framework not found"}var Shadowbox={};Shadowbox.lib=function(){var A=Ext.lib.Event;return{adapter:"ext",getStyle:function(C,B){return Ext.get(C).getStyle(B)},setStyle:function(C,B,D){Ext.get(C).setStyle(B,D)},get:function(B){return Ext.getDom(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)}}}();
\ No newline at end of file
--- /dev/null
+++ shadowbox/build/adapter/shadowbox-mootools.js
@@ -0,0 +1 @@
+if(typeof MooTools=="undefined"){throw"Unable to load Shadowbox, MooTools library not found"}var Shadowbox={};Shadowbox.lib=function(){var B=/alpha\([^\)]*\)/gi;var A=function(E,C){var D=E.style;if(window.ActiveXObject){D.zoom=1;D.filter=(D.filter||"").replace(B,"")+(C==1?"":" alpha(opacity="+C*100+")")}else{D.opacity=C}};return{adapter:"mootools",getStyle:function(D,C){return $(D).getStyle(C)},setStyle:function(E,D,F){E=$(E);if(typeof D!="object"){var G={};G[D]=F;D=G}for(var C in D){if(C=="opacity"){A(E,D[C])}else{E.setStyle(C,D[C])}}},get:function(C){return $(C)},remove:function(C){C.parentNode.removeChild(C)},getTarget:function(C){return C.target},getPageXY:function(C){return[C.page.x,C.page.y]},preventDefault:function(C){C.preventDefault()},keyCode:function(C){return C.code},addEvent:function(E,C,D){$(E).addEvent(C,D)},removeEvent:function(E,C,D){$(E).removeEvent(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}}}}}();
\ No newline at end of file
--- /dev/null
+++ shadowbox/build/adapter/shadowbox-yui.js
@@ -0,0 +1 @@
+if(typeof YAHOO=="undefined"){throw"Unable to load Shadowbox, core YUI utilities (yahoo, dom, event) not found"}var Shadowbox={};Shadowbox.lib=function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;return{adapter:"yui",getStyle:function(D,C){return B.getStyle(D,C)},setStyle:function(F,E,G){if(typeof E!="object"){var C={};C[E]=G;E=C}for(var D in E){B.setStyle(F,D,E[D])}},get:function(C){return B.get(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}}}}}();
\ No newline at end of file
--- /dev/null
+++ shadowbox/build/adapter/shadowbox-dojo.js
@@ -0,0 +1 @@
+if(typeof dojo=="undefined"){throw"Unable to load Shadowbox, Dojo Toolkit not found"}var Shadowbox={};Shadowbox.lib=function(){var C=[];var D={};var B=/(-[a-z])/gi;var A=function(F,G){return G.charAt(1).toUpperCase()};var E=function(G){var F;if(!(F=D[G])){F=D[G]=G.replace(B,A)}return F};return{adapter:"dojo",getStyle:function(G,F){return dojo.style(G,E(F))},setStyle:function(H,G,I){if(typeof G=="string"){dojo.style(H,E(G),I)}else{for(var F in G){dojo.style(H,F,G[F])}}},get:function(F){return dojo.byId(F)},remove:function(F){dojo._destroyElement(F)},getTarget:function(F){return F.target},getPageXY:function(F){return[F.pageX,F.pageY]},preventDefault:function(F){F.preventDefault()},keyCode:function(F){return F.keyCode},addEvent:function(I,F,H){var G=dojo.connect(I,F,H);C.push({el:I,name:F,handle:G})},removeEvent:function(H,F,G){dojo.forEach(C,function(J,I){if(J&&J.el==H&&J.name==F){dojo.disconnect(J.handle);C[I]=null}})},append:function(H,G){if(H.insertAdjacentHTML){H.insertAdjacentHTML("BeforeEnd",G)}else{if(H.lastChild){var F=H.ownerDocument.createRange();F.setStartAfter(H.lastChild);var I=F.createContextualFragment(G);H.appendChild(I)}else{H.innerHTML=G}}}}}();
\ No newline at end of file
--- /dev/null
+++ shadowbox/build/adapter/shadowbox-base.js
@@ -0,0 +1 @@
+var Shadowbox={};Shadowbox.lib=function(){var F={};var C=/(-[a-z])/gi;var B=function(H,I){return I.charAt(1).toUpperCase()};var G=function(I){var H;if(!(H=F[I])){H=F[I]=I.replace(C,B)}return H};var A=document.defaultView;var E=/alpha\([^\)]*\)/gi;var D=function(J,H){var I=J.style;if(window.ActiveXObject){I.zoom=1;I.filter=(I.filter||"").replace(E,"")+(H==1?"":" alpha(opacity="+(H*100)+")")}else{I.opacity=H}};return{adapter:"standalone",getStyle:function(){return A&&A.getComputedStyle?function(L,K){var H,J,I;if(K=="float"){K="cssFloat"}if(H=L.style[K]){return H}if(J=A.getComputedStyle(L,"")){return J[G(K)]}return null}:function(M,L){var I,K,J;if(L=="opacity"){if(typeof M.style.filter=="string"){var H=M.style.filter.match(/alpha\(opacity=(.+)\)/i);if(H){var N=parseFloat(H[1]);if(!isNaN(N)){return(N?N/100:0)}}}return 1}else{if(L=="float"){L="styleFloat"}}var J=G(L);if(I=M.style[J]){return I}if(K=M.currentStyle){return K[J]}return null}}(),setStyle:function(K,J,L){if(typeof J=="string"){var H=G(J);if(H=="opacity"){D(K,L)}else{K.style[H]=L}}else{for(var I in J){this.setStyle(K,I,J[I])}}},get:function(H){return typeof H=="string"?document.getElementById(H):H},remove:function(H){H.parentNode.removeChild(H)},getTarget:function(I){var H=I.target?I.target:I.srcElement;return H.nodeType==3?H.parentNode:H},getPageXY:function(I){var H=I.pageX||(I.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));var J=I.pageY||(I.clientY+(document.documentElement.scrollTop||document.body.scrollTop));return[H,J]},preventDefault:function(H){if(H.preventDefault){H.preventDefault()}else{H.returnValue=false}},keyCode:function(H){return H.which?H.which:H.keyCode},addEvent:function(J,H,I){if(J.addEventListener){J.addEventListener(H,I,false)}else{if(J.attachEvent){J.attachEvent("on"+H,I)}}},removeEvent:function(J,H,I){if(J.removeEventListener){J.removeEventListener(H,I,false)}else{if(J.detachEvent){J.detachEvent("on"+H,I)}}},append:function(J,I){if(J.insertAdjacentHTML){J.insertAdjacentHTML("BeforeEnd",I)}else{if(J.la!
stChild){var H=J.ownerDocument.createRange();H.setStartAfter(J.lastChild);var K=H.createContextualFragment(I);J.appendChild(K)}else{J.innerHTML=I}}}}}();
\ No newline at end of file
More information about the Midnightbsd-cvs
mailing list