Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
webclient.js-ext.bubbling-min.js Maven / Gradle / Ivy
/*
Copyright (c) 2008, Bubbling Library Team. All rights reserved.
Portions Copyright (c) 2008, Yahoo!, Inc. All rights reserved.
Code licensed under the BSD License:
http://www.bubbling-library.com/eng/licence
version: 2.1
*/
YAHOO.namespace("plugin","behavior");(function(){var C=YAHOO.util,A=YAHOO.util.Event,B=YAHOO.util.Dom,D=YAHOO.lang,E=YAHOO.util.Dom.get;YAHOO.Bubbling=function(){var J={},M={classname:"js"},G=null;var O=function(T,R){var U=R[1].anchor;if(!(R[1].flagged||R[1].decrepitate)&&U){var V=U.getAttribute("rel"),S=U.getAttribute("target");if((!S||(S===""))&&(V=="external")){U.setAttribute("target","blank")}}};var Q=function(S,R){J.processingAction(S,R,J.defaultActions)};var H={newRef:null,oldRef:null,value:null};function K(){if(H.oldRef){J.fire("blur",{target:H.oldRef})}}function N(){if(H.newRef){J.fire("focus",{target:H.newRef,blur:H.oldRef})}}function L(){if(H.newRef){H.newValue=(H.tagName=="SELECT"?H.newRef[H.newRef.selectedIndex].value:H.newRef.value);if(H.newValue!=H.oldValue){if(YAHOO.env.ua.webkit&&(H.tagName=="SELECT")){H.newRef.setAttribute("default",H.newValue)}J.fire("change",{target:H.newRef,value:H.newValue,newValue:H.newValue,oldValue:H.oldValue,rel:H.newRef.getAttribute("rel")});H.oldValue=H.newValue}}}function I(S,R){H={oldRef:H.newRef,newRef:S,tagName:(S&&S.tagName?S.tagName.toUpperCase():null),oldValue:(S?S.value:null)};if(R=="SELECT"){H.oldValue=(YAHOO.env.ua.webkit?S.getAttribute("default"):S[S.selectedIndex].value)}}function P(T){var S,R="[INPUT][TEXTAREA][SELECT][BUTTON][A][IMG]";if(T&&(S=T.tagName.toUpperCase())){if(T.getAttribute("tabindex")||(R.indexOf("["+S+"]")!==-1)){return true}}return false}function F(T,S){var R=(T&&T.tagName?T.tagName.toUpperCase():null);if(T&&R){if(R=="OPTION"){return F(T.parentNode,S)}else{if(document.body&&(T===document.body)){L();I(null);K()}else{if((T!==H.newRef)&&P(T)){L();I(T,R);K();N()}}}}}J.ready=false;J.bubble={};J.getOwnerByClassName=function(S,R){return(B.hasClass(S,R)?S:B.getAncestorByClassName(S,R))};J.getOwnerByTagName=function(S,R){S=B.get(S);if(!S){return null}return(S.tagName&&S.tagName.toUpperCase()==R.toUpperCase()?S:B.getAncestorByTagName(S,R))};J.getAncestorByClassName=J.getOwnerByClassName;J.getAncestorByTagName=J.getOwnerByTagName;J.onKeyPressedTrigger=function(T,U,S){var R="key";U=U||A.getEvent();S=S||{};S.action=R;S.target=T.target||(U?A.getTarget(U):null);F(S.target,S);S.flagged=false;S.decrepitate=false;S.event=U;S.stop=false;S.type=T.type;S.keyCode=T.keyCode;S.charCode=T.charCode;S.ctrlKey=T.ctrlKey;S.shiftKey=T.shiftKey;S.altKey=T.altKey;this.bubble.key.fire(U,S);if(S.stop){A.stopEvent(U)}return S.stop};J.onEventTrigger=function(S,U,R){U=U||A.getEvent();var T=R=R||{};R.action=S;R.target=(U?A.getTarget(U):null);if((S=="navigate")||(S=="property")){F(R.target,R)}R.flagged=false;R.decrepitate=false;R.event=U;R.stop=false;this.bubble[S].fire(U,R);if(R.stop){A.stopEvent(U)}return R.stop};J.onNavigate=function(S){var R={anchor:this.getOwnerByTagName(A.getTarget(S),"A"),button:J.getYUIButton(A.getTarget(S))};if(R.button){R.value=R.button.get("value");R.rel=R.button._button.getAttribute("rel")}else{if(R.anchor){R.rel=R.anchor.getAttribute("rel")}else{R.input=this.getOwnerByTagName(A.getTarget(S),"INPUT");R.select=this.getOwnerByTagName(A.getTarget(S),"SELECT");if(R.input){R.value=R.input.getAttribute("value");R.rel=R.input.getAttribute("rel")}else{if(R.select){R.value=R.select[R.select.selectedIndex].value;R.rel=R.select.getAttribute("rel")}}}}if(!this.onEventTrigger("navigate",S,R)){this.onEventTrigger("god",S,R)}};J.onProperty=function(R){this.onEventTrigger("property",R,{anchor:this.getOwnerByTagName(A.getTarget(R),"A"),button:J.getYUIButton(A.getTarget(R))})};J._timeoutId=0;J.onRepaint=function(R){clearTimeout(J._timeoutId);J._timeoutId=setTimeout(function(){var T="repaint",U={target:document.body},S={action:T,target:null,event:U,flagged:false,decrepitate:false,stop:false};J.bubble[T].fire(U,S);if(S.stop){A.stopEvent(U)}},150)};J.onRollOver=function(R){this.onEventTrigger("rollover",R,{anchor:this.getOwnerByTagName(A.getTarget(R),"A")})};J.onRollOut=function(R){this.onEventTrigger("rollout",R,{anchor:this.getOwnerByTagName(A.getTarget(R),"A")})};J.onKeyPressed=function(R){this.onKeyPressedTrigger(R)};J.getActionName=function(S,W){W=W||{};var R=null,T=null,U=(B.inDocument(S)?function(X){return B.hasClass(S,X)}:function(X){return S.hasClass(X)});if(S&&(D.isObject(S)||(S=E(S)))){try{T=S.getAttribute("rel")}catch(V){}for(R in W){if((W.hasOwnProperty(R))&&(U(R)||(R===T))){return R}}}return null};J.getAllActions=function(S,X){X=X||{};var R=null,T=null,W=[],U=(B.inDocument(S)?function(Y){return B.hasClass(S,Y)}:function(Y){return S.hasClass(Y)});if(S&&(D.isObject(S)||(S=E(S)))){try{T=S.getAttribute("rel")}catch(V){}for(R in X){if((X.hasOwnProperty(R))&&(U(R)||(R===T))){W.push(R)}}}return W};J.getFirstChildByTagName=function(T,S){if(T&&(D.isObject(T)||(T=E(T)))&&S){var R=T.getElementsByTagName(S);if(R.length>0){return R[0]}}return null};J.virtualTarget=function(T,S){if(S&&(D.isObject(S)||(S=E(S)))&&D.isObject(T)){var R=A.getRelatedTarget(T);if(D.isObject(R)){while((R.parentNode)&&D.isObject(R.parentNode)&&(R.parentNode.tagName!=="BODY")){if(R.parentNode===S){return true}R=R.parentNode}}}return false};J.getYUIButton=function(S){var T=this.getOwnerByClassName(S,"yui-button"),R=null,U=null;if(D.isObject(T)&&YAHOO.widget.Button){R=YAHOO.widget.Button.getButton(T.id)}return R};J.addLayer=function(U,T){var R=false;U=(D.isArray(U)?U:[U]);T=T||window;for(var S=0;S