const currentDiv = document.getElementById("WLC_Galeria"); var linka = document.createElement('link'); linka.setAttribute('href','/sk/sbot/assets.php?1&file=/sk/sbot/css/nanogallery.css?1711694551'); linka.setAttribute('rel','stylesheet'); linka.setAttribute('type','text/css'); document.head.appendChild(linka); var stylea = document.createElement('style'); stylea.appendChild(document.createTextNode("nanoGalleryContainerParent { margin-bottom: 100px;} .nanogallery_theme_default .nanoGalleryNavigationbarContainer { display: none !important; }.nanogallery_theme_default .nanoGalleryContainer .nanoGalleryThumbnailContainer .imgContainer { background-color: #fff;}.nanogallery_theme_default .nanoGalleryContainer .nanoGalleryThumbnailContainer { background-color: #fff; border: none; border-bottom: 1px solid #ccc; }');.nanogallery_theme_default .nanoGalleryContainer .nanoGalleryThumbnailContainer { background-color: #fff;}")); document.head.appendChild(stylea); var scripta = document.createElement('script'); scripta.setAttribute('src','/sk/sbot/assets.php?1&file=/sk/sbot/js/jquery.min.js'); scripta.setAttribute('type','text/javascript'); scripta.async = false; document.body.appendChild(scripta); var scriptb = document.createElement('script'); scriptb.setAttribute('src','/sk/sbot/assets.php?1&file=/sk/sbot/js/jquery.nanogallery.min.js'); scriptb.setAttribute('type','text/javascript'); scriptb.async = false; document.body.appendChild(scriptb); var diva = document.createElement('div'); diva.setAttribute('id','nanoGallery'); currentDiv.appendChild(diva); var nanoGalleryContainerHeight; var FirstPage = true; console.log('AAAAA loading WLC gallery via hack') setTimeout(function(){ console.log('BBBBB loading WLC gallery via hack') $(document).on('click','#loadMoreGallery', function() { $(this).remove(); $('.nanoGalleryThumbnailContainer').show(); $('.nanoGalleryPagination').show(); if (nanoGalleryContainerHeight) { $('.nanoGalleryContainerParent').css('height',nanoGalleryContainerHeight).css('margin-bottom','100px'); } else { $('.nanoGalleryContainerParent').css('min-height','1400px').css('margin-bottom','100px'); } }); $("#nanoGallery").nanoGallery({ thumbnailWidth: 180, thumbnailHeight: 130, kind: 'json', paginationMaxLinesPerPage: 10, jsonProvider: '/sk/sbot/galeria.php/nanoPhotosProvider', album: '39-sulov-galeria', locationHash: false, colorScheme: 'none', paginationVisiblePages: 6, fnInitGallery: function() { console.log('fnInitGallery',FirstPage); $('.nanoGalleryPagination').css('width','100%').css('position','absolute').css('bottom','-100px'); $('.nanoGalleryPagination div').addClass('btn-wlc btn-default'); $('.nanoGalleryPagination div.currentPage').removeClass('btn-secondary').addClass('btn-primary'); $('.nanoGalleryPagination div.paginationNext').removeClass('btn-secondary').addClass('btn-default'); if (FirstPage) { $('.nanoGalleryPagination').hide(); $('.nanoGalleryThumbnailContainer').hide().filter('.nanoGalleryThumbnailContainer:lt(8)').show(); $('.nanoGalleryContainer').css('height'); $('.nanoGalleryContainerParent').css('height','300px'); $('.nanoGalleryContainerParent').after('
'); } FirstPage = false; }, thumbnailLabel: { display: false, }, i18n: { thumbnailLabelItemsCountPart1: '', thumbnailImageDescription: 'kliknite pre zobrazenie', paginationPrevious: 'predošlá', paginationNext: 'ďalšia' } }); }, 3000); /* */