bachelorthesis/Webseiten/Docker - Build, Ship, and Run Any App, Anywhere_files/jquery.cubeportfolio.min.js

13 lines
52 KiB
JavaScript
Raw Normal View History

2016-06-15 12:40:15 +00:00
/**
* cubeportfolio v1.2 - http://scriptpie.com
*
* Copyright - 2013 Mihai Buricea (http://www.scriptpie.com)
* All rights reserved.
*
* You may not modify and/or redistribute this file
* save cases where Extended License has been purchased
*
*/
(function(e,t,n,r){"use strict";var i="cbp",s="."+i;if(typeof Object.create!=="function"){Object.create=function(e){function t(){}t.prototype=e;return new t}}e.expr[":"].uncached=function(t){if(!e(t).is('img[src!=""]')){return false}var n=new Image;n.src=t.src;return!n.complete};var o={init:function(e,t){var n=this,r;n.cubeportfolio=e;n.type=t;n.isOpen=false;n.options=n.cubeportfolio.options;if(t==="singlePageInline"){n.matrice=[-1,-1];n.height=0;n._createMarkupSinglePageInline();return}n._createMarkup();if(n.options.singlePageDeeplinking&&t==="singlePage"){n.url=location.href;if(n.url.slice(-1)=="#"){n.url=n.url.slice(0,-1)}r=n.cubeportfolio.blocksAvailable.find(n.options.singlePageDelegate).filter(function(e){return n.url.split("#cbp=")[1]===this.getAttribute("href")})[0];if(r){n.url=n.url.replace(/#cbp=(.+)/ig,"");n.openSinglePage(n.cubeportfolio.blocksAvailable,r)}}},_createMarkup:function(){var t=this;t.wrap=e("<div/>",{"class":"cbp-popup-wrap cbp-popup-"+t.type,"data-action":t.type==="lightbox"?"close":""}).on("click"+s,function(n){if(t.stopEvents){return}var r=e(n.target).attr("data-action");if(r){t[r]();n.preventDefault()}});t.content=e("<div/>",{"class":"cbp-popup-content"}).appendTo(t.wrap);e("<div/>",{"class":"cbp-popup-loadingBox"}).appendTo(t.wrap);if(t.cubeportfolio.browser==="ie8"){t.bg=e("<div/>",{"class":"cbp-popup-ie8bg","data-action":t.type==="lightbox"?"close":""}).appendTo(t.wrap)}t.navigationWrap=e("<div/>",{"class":"cbp-popup-navigation-wrap"}).appendTo(t.wrap);t.navigation=e("<div/>",{"class":"cbp-popup-navigation"}).appendTo(t.navigationWrap);t.closeButton=e("<button/>",{"class":"cbp-popup-close",title:"Close (Esc arrow key)",type:"button","data-action":"close"}).appendTo(t.navigation);t.nextButton=e("<button/>",{"class":"cbp-popup-next",title:"Next (Right arrow key)",type:"button","data-action":"next"}).appendTo(t.navigation);t.prevButton=e("<button/>",{"class":"cbp-popup-prev",title:"Previous (Left arrow key)",type:"button","data-action":"prev"}).appendTo(t.navigation);if(t.type==="singlePage"){if(t.options.singlePageShowCounter){t.counter=e("<div/>",{"class":"cbp-popup-singlePage-counter"}).appendTo(t.navigation)}if(t.options.singlePageStickyNavigation){t.wrap.on("scroll",function(){if(t.stopScroll)return;t.navigationWrap.width(t.wrap[0].clientWidth);t.wrap.addClass("cbp-popup-singlePage-sticky")})}}e(n).on("keydown"+s,function(e){if(!t.isOpen)return;if(t.stopEvents)return;if(e.keyCode===37){t.prev()}else if(e.keyCode===39){t.next()}else if(e.keyCode===27){t.close()}})},_createMarkupSinglePageInline:function(){var t=this;t.wrap=e("<div/>",{"class":"cbp-popup-singlePageInline"}).on("click"+s,function(n){if(t.stopEvents){return}var r=e(n.target).attr("data-action");if(r){t[r]();n.preventDefault()}});t.content=e("<div/>",{"class":"cbp-popup-content"}).appendTo(t.wrap);e("<div/>",{"class":"cbp-popup-loadingBox"}).appendTo(t.wrap);t.navigation=e("<div/>",{"class":"cbp-popup-navigation"}).appendTo(t.wrap);t.closeButton=e("<button/>",{"class":"cbp-popup-close",title:"Close (Esc arrow key)",type:"button","data-action":"close"}).appendTo(t.navigation)},destroy:function(){var t=this;e(n).off("keydown"+s);t.cubeportfolio.$obj.off("click"+s,t.options.lightboxDelegate);t.cubeportfolio.$obj.off("click"+s,t.options.singlePageDelegate);t.cubeportfolio.$obj.off("click"+s,t.options.singlePageInlineDelegate);t.cubeportfolio.$obj.removeClass("cbp-popup-isOpening");t.cubeportfolio.blocks.removeClass("cbp-singlePageInline-active");t.wrap.remove()},openLightbox:function(r,i){var s=this,o=0,u,a=[],f;if(s.isOpen)return;if(s.cubeportfolio.singlePageInline&&s.cubeportfolio.singlePageInline.isOpen){s.cubeportfolio.singlePageInline.close()}s.isOpen=true;s.stopEvents=false;s.dataArray=[];s.current=null;u=i.getAttribute("href");if(u===null){throw new Error("HEI! Your clicked element doesn't have a href attribute.")}e.each(r.find(s.options.lightboxDelegate),function(t,n){var r=n.getAttribute("href"),i=r,f="isImage";if(e.inArray(r,a)===-1){if(u==r){s.current=o}else if(!s.options.lightboxGallery){return}if(/youtube/i.test(r))