decembre

FLICKR(view small) - POOL(ORIG)-4-before30.07.2013

Jul 30th, 2013
271
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. YUI.add("image-fader",function(b){function a(c,d){d=b.Lang.isNumber(d)?d:1;if(b.Lang.isString(c)){c=b.all(c)}c.on("load",function(g){var f;if(g.target.inDoc()){f=new b.Anim({node:g.target,to:{opacity:d},duration:0.2});f.run()}})}b.imageFader={attach:a}},"0.0.1",{requires:["node","anim"]});YUI.add("bo-selecta-3",function(b){b.BoSelecta3=function(d,c){c=c||{};this.showUsername=c.showUsername||true;this.showSubtitle=c.showSubtitle||false;this.showIcon=c.showIcon||false;this.showRelationship=c.showRelationship||false;this.usePersonMenu=c.usePersonMenu||false;this.linkUsernameToPhotostream=c.linkUsernameToPhotostream||false;this.linkSubtitle=c.linkSubtitle||false;this.showEditRelationshipLink=c.showEditRelationshipLink||false;this.searchOnUsername=c.searchOnUsername||true;this.searchOnRealname=c.searchOnRealname||false;this.searchOnEmail=c.searchOnEmail||false;this.searchOnPathAlias=c.searchOnPathAlias||false;this.searchUsingSoundex=c.searchUsingSoundex||false;this.includeUser=c.includeUser||false;this.includeAddressBook=c.includeAddressBook||false;this.maxResultsDisplayed=c.maxResultsDisplayed||5;this.globalMaxResultsDisplayed=c.globalMaxResultsDisplayed||10;this.showTotalResults=c.showTotalResults||false;this.disableMouseHover=c.disableMouseHover||false;this.selectFirstItem=c.selectFirstItem||false;this.hideNoContactMessage=c.hideNoContactMessage||false;this.zeroResultsMessages=c.zeroResultsMessages||[];this.preloadText=c.preloadText||"";this.defaultText=c.defaultText||"";this.loadingText=c.loadingText||b.transjax.get("bo-selecta","loading");this.focusOnFetch=c.focusOnFetch||false;this.fetchDataImmediately=c.fetchDataImmediately||false;this.allowNoContacts=c.allowNoContacts||false;this.allowFormSubmit=c.allowFormSubmit||false;this.respectCanTagFlag=c.respectCanTagFlag||false;this.apiURL=c.apiURL||b.config.flickr.people.api_url;this.enableGlobalSearch=c.enableGlobalSearch||false;this.defaultContainerWidth=c.defaultContainerWidth||250;this.minListWidth=c.minListWidth||228;this.maxListWidth=c.maxListWidth||500;this.loadTransparently=c.loadTransparently||false;if(this.includeUser){this.meString=b.transjax.get("bo-selecta","me").toLowerCase()}this.contacts=null;this.skipList={};this.shadowInit=false;this.fetchingData=false;this.haveTriedToFetchData=false;this.searchingGlobally=false;this._initHTML(d);this._initAutoComplete();if(this.fetchDataImmediately){this.fetchData()}};b.augment(b.BoSelecta3,b.EventTarget);b.BoSelecta3.prototype._initHTML=function(e){if(b.Lang.isString(e)){e=b.one(e)}if(!e instanceof b.Node){e=b.one("#BoSelecta_input")}this.inputField=e;this.container=this.inputField.get("parentNode");var c=this.container.all(".no-js-fallback");c.setStyle("display","none");this.container.addClass("bo-selecta-3");this.container.addClass("yui-skin-sam");this.containerId=b.stamp(this.container);this.inputField.addClass("input");var d=this.container.all(".loading");if(d.size()>0){this.loadingBox=d.item(0);this.loadingBox.setStyle("display",this.fetchDataImmediately&&!this.loadTransparently?"block":"none")}else{this.loadingBox=b.Node.create('<div class="loading">'+this.loadingText+"</div>");this.loadingBox.setStyle("display",this.fetchDataImmediately&&!this.loadTransparently?"block":"none");this.container.append(this.loadingBox)}this.inputField.set("disabled",false);this.inputField.set("value",this.preloadText);this.inputField.addClass("grey");this.inputField.on("focus",this.clearDefaultText,this,true);this.inputField.on("blur",function(f){if(this.inputField.get("value")===""){this.restoreDefaultText()}},this,true);if(!this.allowFormSubmit){this.form=this.container.ancestor("form",true);if(this.form){this.form.on("submit",function(f){f.halt()})}}this.maxInputWidth=parseInt(this.container.getStyle("width"),10)||this.defaultContainerWidth;this.defaultInputWidth=parseInt(this.inputField.getStyle("width"),10)||this.defaultContainerWidth};b.BoSelecta3.prototype._initAutoComplete=function(){var c=this;this.contactsCacheDataSource=new b.DataSource.Function({source:function(d){return c._searchContacts(d)}});this.globalSearchDataSource=new b.BoSelectaGlobalSearchDataSource({selector:this});this.autoComp=new b.AutoComplete({inputNode:this.inputField,source:this.contactsCacheDataSource,resultTextLocator:function(d){if(d&&d.u){return b.BoSelecta3.sanitizeString(d.u)}return""},resultFormatter:function(f,d,e){return c._formatResult(f,d,e)},activateFirstItem:this.selectFirstItem,queryDelay:0,render:true});this.autoComp.on("select",this._onItemSelectEvent,this,true);this.autoComp.on("query",this._handleQueryChange,this,true);this.autoComp.after("query",this._resizeListToFit,this,true);this.inputField.on("keydown",this._onInputFieldKeyDown,this,true);this.inputField.on("focus",function(f){var d=c.getQuery();if(d){c.autoComp.sendRequest(d)}});this.inputField.on("blur",function(d){var f=c.autoComp.get("visible");if(f){if(!c.resultsHideHandler){c.resultsHideHandle=b.one("document").on("click",function(g){if(g.target.ancestor(".yui3-a...&&n!==""){e=n}},getTarget:function(o){var n=o.target||o.srcElement;return c(n)},addEvent:function(p,n,o){if(p.addEventListener){p.addEventListener(n,o,false)}else{if(p.attachEvent){p.attachEvent("on"+n,o)}}},rmEvent:function(p,n,o){if(p.removeEventListener){p.removeEventListener(n,o,false)}else{if(p.detachEvent){p.detachEvent("on"+n,o)}}},rmProto:function(n){if(!n){return""}if(n.substr(0,7)===l){return n.substr(7,n.length)}if(n.substr(0,8)===j){return n.substr(8,n.length)}return n},getAttribute:function(o,n){var p="";if(!document.documentElement.hasAttribute&&(n===d)){n="className"}if(o&&o.getAttribute){p=o.getAttribute(n,2)}return p},getLK:function(n,r){if(!n){return null}if(r===null){r=false}var p=null,u=this.getAttribute(n,this.DATA_ACTION_OUTCOME);if(u){p={};p.outcm=u}var s=this.getAttribute(n,"data-ylk");if(s===null||s.length===0){return p}if(!p){p={}}var t=s.split(e);for(var v=0,w=t.length;v<w;v++){var q=t[v].split(b);if(q.length!==2){continue}var x=q[0],o=q[1];if(x.length<=8&&o.length<=64){if(x!=="_p"||r){p[x]=o}}}return p},getLT:function(n,o){if(!n){return"_"}var p="";o=o.toLowerCase();if(o==="text"){if(h){p=n.textContent}else{p=(n.innerText?n.innerText:n.textContent)}}else{if(o==="href"){p=this.rmProto(this.getAttribute(n,"href"))}else{p=this.getAttribute(n,o)||""}}p=this.norm(p);if(p===""){p=this.norm(i(n));if(!p){p=this.norm(this.rmProto(this.getAttribute(n,"href")))}}return(p===""?"_":p)},norm:function(n){return this.trim(n?n.replace(m,""):"")},ser:function(t){if(!t){return""}var u=[];for(var q in t){if(t.hasOwnProperty(q)){var p=q,n=t[q];if(p===null||n===null){continue}p=p.toString();n=n.toString();if(p.length<=8&&n.length<=300&&!this.hasCC(p)&&!this.hasCC(n)){var s="";n=this.trim(n);if(n===""||n===" "){n="_"}try{s=this.enc(p+"\x03"+n)}catch(r){s="_ERR_ENCODE_"}u[u.length]=s}}}return u.join(this.cd)},clref:function(n){if(n.indexOf(l)!==0&&n.indexOf(j)!==0){return""}return n},hasCC:function(p){for(var o=0,n=p.length;o<n;o++){if(p.charCodeAt(o)<32){return true}}return false},_hasClass:function(o,n){var q=false,p;if(o&&n){p=this.getAttribute(o,d)||"";if(n.exec){q=n.test(p)}else{q=n&&(k+p+k).indexOf(k+n+k)>-1}}return q},hasClass:function(q,p){if(this.isArr(p)){for(var o=0,n=p.length;o<n;o++){if(this._hasClass(q,p[o])){return true}}return false}else{if(this.isStr(p)){return this._hasClass(q,p)}else{return false}}},trim:function(n){if(!n||typeof n!=="string"){return n}return n.replace(g,"")},isNum:function(n){return typeof n==="number"},isObj:function(n){return(n&&(typeof n==="object"))},isStr:function(n){return typeof n==="string"},isArr:function(n){return Object.prototype.toString.apply(n)==="[object Array]"},isFun:function(n){return(typeof n==="function")||Object.prototype.toString.apply(n)==="[object Function]"},prevDef:function(n){if(n.preventDefault){n.preventDefault()}else{n.returnValue=false}},aug:function(p,o){if(!o){return}for(var n in o){p[n]=o[n]}},objSize:function(q){if(!this.isObj(q)){return 0}var p=0;for(var n in q){if(q.hasOwnProperty(n)){p++}}return p},rand:function(){var o=0,p="",r="";while(o++<12){var q=Math.floor(Math.random()*62);if(q<10){r=q}else{r=String.fromCharCode(q<36?q+55:q+61)}p+=r}return p},sr:function(n){return(screen?screen.width+(n?n:",")+screen.height:"")},xy:function(q){function o(){var s=document.documentElement,t=document.body;if(s&&(s.scrollTop||s.scrollLeft)){return[s.scrollTop,s.scrollLeft]}else{if(t){return[t.scrollTop,t.scrollLeft]}else{return[0,0]}}}var p=null,n=q.pageX,r=q.pageY;if(f){p=o()}if(!n&&0!==n){n=q.clientX||0;if(f){n+=p[1]}}if(!r&&0!==r){r=q.clientY||0;if(f){r+=p[0]}}return n+","+r},appendScr:function(o,n){n=n||{};n.A_xy=this.xy(o);n.A_sr=this.sr();return n}}}());YUI.add("rapid-tracker",function(d){var c=false,a;var b={ok:c,_queue:[],init:function(h){var j,f,g;if(!c){d.one("body").on("click",function(l){var i=l.target.ancestor(".ywa-track",true);if(i){b.beacon(i.getAttribute("data-ywa-name"))}})}try{a=new (YAHOO.i13n.Rapid||YAHOO.i13n.Track)(h);a.init();d.mix(this,a);for(j=0,f=this._queue.length;j<f;j++){g=this._queue.shift();this.beaconEvent(g.key,g.data)}c=true}catch(k){c=false}},beacon:function(f,e){if(!e){e=""}if(!a){this._queue.push({key:f,data:e})}else{a.beaconEvent(f,e)}}};d.rapidTracker=b},"1.0.0");YUI.add("nav-selecta-rapid",function(b){var a={search:/\/search\/\?q=.+/i,search_my_photos:/\/search\/\?w=[0-9]+\@N[0-9]+\&q=.+/i,search_my_contacts:/\/search\/\?w=contacts\&q=.+/i,search_groups:/\/search\/groups\/\?q=.+/i,search_users:/\/search\/people\/\?m=names&q=.+/i,contact_photostream:/^\/photos\/[a-z]+\/?/i};b.on("NavSelecta:beforeNavigatingAway",function(d){var c;if(d.indexOf("?")===-1&&d.indexOf("/photos/")!==0){b.rapidTracker.beaconClick("searchform",d);return}if(d.indexOf("/photos/me")===0){b.rapidTracker.beaconClick("searchform","my_photostream");return}for(c in a){if(a.hasOwnProperty(c)){if(d.match(a[c])){b.rapidTracker.beaconClick("searchform",c);return}}}})},"0.0.1",{requires:F.config.modules["nav-selecta-rapid"].requires||[]});
RAW Paste Data