/*! Concept Gallery v3.1.0 http://sam3.pl | all rights reserved Ostatnia modyfikacja: 2016-09-08 - rozmiar miniaturek na podstawie Height oraz opcja SQUARE, albo domyślnie ustawić szerokość pustą - rozmiar zdjęcia inline slideshow na podstawie proporcji - Fullscreen - opcja chowania miniaturek - na hoverze pokazane - Pager - zamieniany na numerki przy wielu elementach - touch gesty - opcja w konfiguracji GO FULLSCREEN? - - mouse wheel po wejściu w fullscreen przestaje działać - 2 galerie Fullscreen z-index konflikt - przy trybie wall aktywne zdjęcie nie hoveruje (po wejściu w FS i wyjściu) !!!!!! STARA KONFIGURACJA */ function runConceptGallery(myel,op,$) { console.info('runConceptGallery('+$(myel).attr("id")+')'); /* --------------- NEW ---------- */ op.squareThumbnails = false; op.inlineSlideshowPhotoFormat = '4:3'; // 4:3 16:9 16:10 3:4 9:16 10:16 op.desktopFullMode = false; // czy chować interfejs systemu (F11 w przeglądarce) op.fsThumbnailsMode = 'hover'; // hover - zjęcie pełnej wielkości - miniaturki niewidoczne, pokazują się na zdjęciu po mouse hover // on - pasek pod zdjęciem widoczny // off - schowane do ikonki /* --------------- NEW ---------- */ /* --------------- TEMP ---------- */ ///op.alignThumbnails = 'fill'; ///op.rowLimit = 2; /* --------------- TEMP ---------- */ /* --------------- OVERWRITES ---------- */ op.buttonActiveColor = 'rgba(0,0,0,0.6)'; op.backgroundOpacity = 0.9; // fullscreen mode background alpha op.speed1 = 0.3; op.speed2 = 0.5; op.scaleHover = 1.2; op.photoBoxPadding = 20; // padding inside photoBox (border containing title image and image description) //op.alignThumbnails = 'fill'; // align thumbnails in inline view (not fullscreen) 'left' 'right' 'center' 'justify' 'fill' op.buttonInactiveColor = '#aaaaaa'; // kolor nieaktywnego buttonu op.buttonActiveColor = '#1256bb'; // kolor aktywnego buttonu op.buttonHoverColor = '#000000'; // kolor hover buttonu op.buttonInactiveFsColor = '#aaaaaa'; // kolor nieaktywnego buttonu fullscreen op.buttonActiveFsColor = '#000000'; // kolor aktywnego buttonu fullscreen op.buttonHoverFsColor = '#ffffff'; // kolor hover buttonu fullscreenoptions.buttonInactiveColor = '#dddddd'; // kolor nieaktywnego buttonu //op.showGalleryTitle = false; op.showPictureTitle = false; /* --------------- OVERWRITES ---------- */ var el=myel; $(myel).wrap('
'); var gal=$(myel).parent(); var browserFullScreen = $(window).data('fullscreen-state'); $(window).bind("fullscreen-on", function(e, state) { browserFullScreen = true; getScreenSize(); fixView(); }); $(window).bind("fullscreen-off", function(e, state) { browserFullScreen = false; getViewportSize(); fixView(); }); // get viewport size var w=window,d=document,e=d.documentElement,g=d.getElementsByTagName('body')[0]; var getViewportSize = function(){ x=w.innerWidth||e.clientWidth||g.clientWidth,y=w.innerHeight||e.clientHeight||g.clientHeight; } var getScreenSize = function(){ x=window.screen.width; y=window.screen.height; } var getViewSize = function(){ //cc('getViewSize browserFullScreen=',browserFullScreen); if (browserFullScreen) getScreenSize(); else getViewportSize(); } //getViewportSize(); getViewSize(); TweenLite.defaultEase = Quad.easeOut; /* *************************************************** * Config * ***************************************************/ op.rowLimit = parseInt(op.rowLimit); // limit rzędów jakie będą na jednej stronie w przypadku ściany op.thumbHeight = parseInt(op.thumbHeight); // wysokość miniaturki (dla kwadratowych tasama będzie szerokość op.thumbWidth = parseInt(op.thumbWidth); // szerokość miniaturki (jeśli zero to zdjęcia będą zmniejszane na wysokość o automatycznej szerokości) op.inlineSlideshowPhotoHeight = parseInt(op.inlineSlideshowPhotoHeight); // wysokość zdjęcia w trybie inline slideshow // ustal wielkość zdjęcia inlineSlideshow na podstawie proporcji z konfiguracji var isphx = parseInt(op.inlineSlideshowPhotoFormat.split(':')[0]); var isphy = parseInt(op.inlineSlideshowPhotoFormat.split(':')[1]); op.inlineSlideshowPhotoHeight = $(gal).width()*isphy/isphx; op.alignThumbnailsFillExtraQuality = parseInt(op.alignThumbnailsFillExtraQuality); // ile razy większe miniaturki przygotować, by następnie po powiększeniu ich w trybie FILL wyglądały lepiej op.slideshowTime = parseInt(op.slideshowTime); var smallGallery; var largeGallery; var largeGalleryGenerated=false; // is full screen in memory? var lastPicture = 0; // currentPicture of previous gallery view (used to determine if after mode change picture should be changed to) var fsThumbnailsMode = op.fsThumbnailsMode; var currentPage = 0; // current thumbnail page var currentPageInline = 0; var currentPageFs = 0; var pageCount = 0; var currentPicture = 1; // current picture var currentViewRowLimit = op.rowLimit; // limit used in current view var fsgcurrentViewRowLimit = op.rowLimit; // limit used in current view var centerThumbnails = false; var fsgcenterThumbnails = false; var slideshowRunning=false; var slideshowTimer; var displayText = true; // display text on picture var fsgdisplayText = true; // display text on picture var cancelLoad = false; // stops loading loop when switched to full screen before all thumbnails are loaded var allThumbnailsLoaded = false; var splitThumbnailsCounter = 0; // fixes problem when splitThumbnailsToPages function is executed twice var fsMode = false; // full screen mode var changingMode = false; var displayPhotoView = false; // if in this view large photo should be displayed var fsgdisplayPhotoView = false; // if in this view large photo should be displayed var photoBoxImageOnly = false; // if photo box should have border title and description var fsgphotoBoxImageOnly = false; // if photo box should have border title and description var photoNextOverScale = 1; var photoNextOutScale = 0.7; // starting diemensions var startHeight = $('.concept-gallery',gal).height(); var startWidth = $('.concept-gallery',gal).width(); var startMarginTop = $('.concept-gallery',gal).css('margin-top'); var startMarginBottom = $('.concept-gallery',gal).css('margin-bottom'); var fullScreenStartScrollTop = -1; var photoAreaWidth = 0; var photoAreaHeight = 0; var fsgphotoAreaWidth = 0; var fsgphotoAreaHeight = 0; var currentViewMode = 'fsView'; //fsView fsWall inlineView inlineWall // ************************ // get image list and gallery data var timthumbPath = op.timThumbPath; var imagePath = op.imagesPath; var imageFile = op.imagesFile; var loaderUrl = op.loaderUrl; // prepare image list config var configString = $('.config', el).text(); var cArray = configString.split("°"); var images = new Array(); // array with image data var photos = new Array(); // array with picture objects var fsgphotos = new Array(); // array with picture objects var galleryConfig = new Object(); var temp = cArray[0].split('~'); galleryConfig.title = temp[0]; galleryConfig.description = temp[1]; galleryConfig.imagesUrl = temp[2]; galleryConfig.imagesFile = temp[3]; for (var i=1; i < cArray.length; i++) { var temp = cArray[i].split('~'); var img = new Object(); img.url = temp[0]; img.title = temp[1]; img.alt = temp[2]; console.log(img.alt); images[i] = img; } //cc('imgages.length',images.length); imagePath = galleryConfig.imagesUrl; imageFile = galleryConfig.imagesUrl+galleryConfig.imagesFile; //imagePath = 'http://localhost/galerie/v3/images/'; // array with configured src paths for thimthumb var srcArray = new Array(); var thumbnailsLoadedTotal = 0; var thumbnails = new Array(); var thumbnailContainers = new Array(); var fsgthumbnails = new Array(); var fsgthumbnailContainers = new Array(); $('.concept-gallery',gal).text(''); $('.concept-gallery',gal).addClass('concept-gallery'); if(!op.allowLargeView){ $('.concept-gallery',gal).addClass('unclickable'); } if(op.type=='inlineSlideshow'){ $('.concept-gallery',gal).addClass('inline-slideshow'); } var galleryTitleStyle=''; if (!op.showGalleryTitle) { galleryTitleStyle="display:none;"; } galleryTitle=$('