mirror of
https://github.com/a2nt/meta-lightbox.git
synced 2024-10-22 17:05:53 +02:00
FIX: iframe reload
This commit is contained in:
parent
13a0c6aee9
commit
d8f6aeff5c
2
dist/js/app.js
vendored
2
dist/js/app.js
vendored
@ -1,3 +1,3 @@
|
|||||||
/*! For license information please see app.js.LICENSE.txt */
|
/*! For license information please see app.js.LICENSE.txt */
|
||||||
!function(t){var e={};function a(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=t,a.c=e,a.d=function(t,e,o){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},a.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)a.d(o,n,function(e){return t[e]}.bind(null,n));return o},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="/mnt/data/srv/dist/repositories/meta-lightbox/dist",a(a.s="./src/js/app.js")}({"./src/js/_events.js":function(t,e){t.exports={AJAX:"ajax-load",AJAXMAIN:"ajax-main-load",MAININIT:"main-init",TABHIDDEN:"tab-hidden",TABFOCUSED:"tab-focused",OFFLINE:"offline",ONLINE:"online",BACKONLINE:"back-online",TOUCHENABLE:"touch-enabled",TOUCHDISABLED:"touch-disabled",LOADED:"load",SWIPELEFT:"swipeleft panleft",SWIPERIGHT:"swiperight panright",ALLERTAPPEARED:"alert-appeared",ALERTREMOVED:"alert-removed",LODEDANDREADY:"load-ready",LAZYIMAGEREADY:"image-lazy-bg-loaded",LAZYIMAGESREADY:"images-lazy-loaded",MAPLOADED:"map-loaded",MAPAPILOADED:"map-api-loaded",MAPMARKERCLICK:"map-marker-click",MAPPOPUPCLOSE:"map-popup-close",SCROLL:"scroll",RESIZE:"resize",CAROUSEL_READY:"bs.carousel.ready",SET_TARGET_UPDATE:"set-target-update",RESTORE_FIELD:"restore-field",FORM_INIT_BASICS:"form-basics",FORM_INIT_STEPPED:"form-init-stepped",FORM_INIT_VALIDATE:"form-init-validate",FORM_INIT_VALIDATE_FIELD:"form-init-validate-field",FORM_INIT_STORAGE:"form-init-storage",FORM_VALIDATION_FAILED:"form-validation-failed",FORM_STEPPED_NEW_STEP:"form-new-step",FORM_STEPPED_FIRST_STEP:"form-first-step",FORM_STEPPED_LAST_STEP:"form-last-step",FORM_FIELDS:"input,textarea,select"}},"./src/js/app.js":function(t,e,a){"use strict";a.r(e);a("./src/scss/app.scss");var o=a("jquery"),n=a.n(o),i=a("./src/js/_events.js"),r=a.n(i);function c(t){return(c="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var a=0;a<e.length;a++){var o=e[a];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var s,d,f,u,h,p,m,g;s=n.a,d=window,f=s(d),u=document,h=s("body"),p="MetaLightboxUI",m='<div class="meta-lightbox-error"><div class="alert alert-error alert-danger">Connection failure.</div></div>',g=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,a,o;return e=t,o=[{key:"init",value:function(){console.log("".concat(p,": init ..."));var t=this;t.isMSIE=0;try{t.isHidpi=t.is_hdpi()}catch(e){console.log("".concat(p,": catch"))}s(".js".concat(p,',[data-toggle="lightbox"],[data-lightbox-gallery]')).on("click",(function(e){e.preventDefault(),e.stopPropagation();var a=s(e.currentTarget);t.show(a)}))}},{key:"is_hdpi",value:function(){return console.log("".concat(p,": isHidpi")),d.devicePixelRatio>1||d.matchMedia&&d.matchMedia("(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)").matches}},{key:"show",value:function(t){console.log("".concat(p,": show"));var e=this;if(e.constructLightbox()){var a=e.$content;if(a){if(h.addClass("meta-lightbox-body-effect-fade"),e.process(a,t),t.data("lightbox-gallery")){var o=s('[data-lightbox-gallery="'.concat(t.data("lightbox-gallery"),'"]'));1===o.length?s(".meta-lightbox-nav").hide():s(".meta-lightbox-nav").show(),s(".meta-lightbox-prev").off("click").on("click",(function(a){a.preventDefault();var n=o.index(t),i=o.eq(n-1);i.length||(i=o.last()),setTimeout((function(){e.show(i)}),10)})),s(".meta-lightbox-next").off("click").on("click",(function(a){a.preventDefault();var n=o.index(t),i=o.eq(n+1);i.length||(i=o.first()),setTimeout((function(){e.show(i)}),10)}))}setTimeout((function(){e.$overlay.addClass("meta-lightbox-open")}),1)}}}},{key:"constructLightbox",value:function(){console.log("".concat(p,": constructLightbox"));var t=this,e=s("<div>",{class:"meta-lightbox-overlay meta-lightbox-theme-default meta-lightbox-effect-fade"}),a=s("<div>",{class:"meta-lightbox-wrap"}),o=s("<div>",{class:"meta-lightbox-content"}),n=s('<a href="#" class="meta-lightbox-nav meta-lightbox-prev"><i class="fas fa fa-chevron-left"></i> <span class="sr-only">Previous</span></a><a href="#" class="meta-lightbox-nav meta-lightbox-next"><i class="fa fas fa-chevron-right"></i> <span class="sr-only">Next</span></a>'),i=s('<a href="#" class="meta-lightbox-close fas fa fa-times" title="Close"><span class="sr-only">Close</span></a>'),r=s("<div>",{class:"meta-lightbox-title-wrap"});return t.$overlay||(t.isMSIE&&e.addClass("meta-lightbox-ie"),a.append(o),a.append(r),e.append(a),e.append(n),e.append(i),h.append(e),e.on("click",(function(e){e.preventDefault(),t.hide()})),i.on("click",(function(e){e.preventDefault(),t.hide()})),t.$overlay=e,t.$content=o,t.$title=r),t.$overlay}},{key:"setTitle",value:function(t){this.$title.html(t)}},{key:"process",value:function(t,e){console.log("".concat(p,": process"));var a=this,o=e.attr("href")&&e.attr("href").length?e.attr("href"):e.data("href");a.$content.attr("class","meta-lightbox-content"),a.$content.addClass(e.data("lightbox-class")),o.length||(console.log(e),console.error("".concat(p,": href(attr/data) is missing")));var n=s("#PageLoading .loading-spinner"),i=n.length?n.clone():"";if(a.$content.append(i).addClass("meta-lightbox-loading"),o.match(/\.(jpeg|jpg|gif|png|svg)$/i)){s.ajax({url:o,success:function(){var e=s("<img>",{src:o}),n=s('<div class="meta-lightbox-image"></div>'),i=s('<span class="meta-lightbox-zoom-wrapper"></span>');i.append(e),n.append(i),n.css({"line-height":"".concat(t.height(),"px"),height:"".concat(t.height(),"px")}),f.resize((function(){n.css({"line-height":"".concat(t.height(),"px"),height:"".concat(t.height(),"px")})})),"undefined"!==typeof i.zoom?i.zoom():i.addClass("no-zoom"),a.$content.html(n),a.contentLoaded()},error:function(t,e){var o=s(m);a.$content.html(o),a.contentLoaded()}});var r=e.data("title")?e.data("title"):e.attr("title");a.setTitle(r),"function"===typeof ga&&ga("send","event","meta","Image Click",o)}else if(o.match(/(youtube|youtube-nocookie|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/)){var l,h=o.match(/(youtube|youtube-nocookie|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/),g="meta-lightbox-video";"youtube"==h[1]&&(l="https://www.youtube.com/embed/".concat(h[4]),g="".concat(g," meta-lightbox-youtube")),"youtu"==h[1]&&(l="https://www.youtube.com/embed/".concat(h[3]),g="".concat(g," meta-lightbox-youtube")),"youtube-nocookie"==h[1]&&(l="https://www.youtube-nocookie.com/embed/".concat(h[4]),g="".concat(g," meta-lightbox-youtube")),"vimeo"==h[1]&&(l="https://player.vimeo.com/video/".concat(h[3]),g="".concat(g," meta-lightbox-vimeo")),l&&a.loadIframe(l,g);var b=e.data("title")?e.data("title"):e.attr("title");a.setTitle(b),"function"===typeof ga&&ga("send","event","meta","Video Click",h)}else if("#"==o.substring(0,1))s(o).length?(wrap=s('<div class="meta-lightbox-inline" />'),wrap.append(s(o).clone().show()),wrap.outerHeight()<a.$content.height()&&wrap.css({position:"relative",top:"50%","margin-top":"".concat(-wrap.outerHeight()/2,"px")}),f.resize((function(){wrap.outerHeight()<a.$content.height()&&wrap.css({position:"relative",top:"50%","margin-top":"".concat(-wrap.outerHeight()/2,"px")})})),a.$content.html(wrap),a.contentLoaded()):(wrap=s(m),a.$content.html(wrap),a.contentLoaded()),s(".meta-lightbox-title-wrap").html(""),"function"===typeof ga&&ga("send","event","meta","inline HTML click",o);else{if(e.data("force-iframe"))return console.log("".concat(p,": IFrame forced")),a.loadIframe(o,"meta-lightbox-iframe-content");console.log("".concat(p,": loading AJAX")),s.ajax({sync:!1,async:!0,url:o,dataType:"html",method:"GET",cache:!1,statusCode:{404:function(){console.log("".concat(p,": page not found")),d.location.href=url},302:function(){console.log("".concat(p,": redirect 302")),d.location.href=url}},error:function(t,e){console.log("".concat(p,": AJAX request failure.").concat(t.statusText));var o=s(m);a.$content.html(o),a.contentLoaded(),"function"===typeof ga&&ga("send","event","error","AJAX ERROR",t.statusText)},success:function(t,e,o){try{var n=s.parseJSON(t);if("object"===c(n)){if("object"===c(n.regions)&&"undefinded"!==typeof n.regions.LayoutAjax){var i=s('<div class="meta-lightbox-ajax" />');i.html(n.regions.LayoutAjax),a.$content.html(i),a.contentLoaded()}var r=o.getResponseHeader("X-Title"),l=o.getResponseHeader("X-Link");r&&r.length&&l&&l.length&&l!==d.location.href&&l.substring(0,l.indexOf("#"))!==d.location.href.replace(s("base").attr("href"),"/")&&(s(".meta-lightbox-ajax").data("curr-title",u.title),s(".meta-lightbox-ajax").data("curr-link",d.location.href),"undefined"!==typeof d.localStorage&&"/"!==l&&d.localStorage.setItem("current-page",l),u.URL!==l&&u.URL!==s("base").attr("href")+l&&u.URL!=="".concat(s("base").attr("href"),"/").concat(l)&&d.history.pushState({title:r,page:l,ajax:"true"},r,l),s(".meta-lightbox-title-wrap").html(""),"function"===typeof ga&&(ga("set",{page:l.replace(s("base").attr("href"),""),title:r}),ga("send","pageview")))}}catch(h){var f=s('<div class="meta-lightbox-ajax" />');f.append(t),a.$content.html(f),a.contentLoaded()}a.contentLoaded()}})}}},{key:"loadIframe",value:function(t,e){var a=this,o=s("<iframe>",{src:t,class:e,frameborder:0,vspace:0,hspace:0,scrolling:"auto",allowtransparency:"true"});console.log("".concat(p,": loading iframe")),h.append('<div id="IFramePreload" class="hidden d-none iframe-preload" style="display:none"></div>');var n=s("#IFramePreload");return n.html(o),o.on("load",(function(){console.log("".concat(p,": the iframe was loaded")),n.html(""),n.remove(),a.$content.addClass("iframe-delay"),a.$content.html(o),a.contentLoaded(),setTimeout((function(){a.$content.removeClass("iframe-delay")}),1e3)})),h.on("".concat(r.a.BACKONLINE),(function(){console.log("".concat(p,": reloading iframe")),o[0].contentDocument.location.reload(!0)})),o}},{key:"contentLoaded",value:function(){this.$content.removeClass("meta-lightbox-loading"),setTimeout((function(){f.trigger("meta-lightbox-loaded")}),1),setTimeout((function(){h.addClass("meta-lightbox-body-effect-fade")}),600)}},{key:"hide",value:function(t){var e=this.$overlay,a=s(".meta-lightbox-ajax").data("curr-title"),o=s(".meta-lightbox-ajax").data("curr-link");a&&o&&("undefined"!==typeof d.localStorage&&"/"!==o&&d.localStorage.setItem("current-page",o),u.URL!==o&&u.URL!==s("base").attr("href")+o&&u.URL!=="".concat(s("base").attr("href"),"/").concat(o)&&d.history.replaceState({title:a,page:o,ajax:"true"},a,o)),e.removeClass("meta-lightbox-open"),h.removeClass("meta-lightbox-body-effect-fade"),s(".meta-lightbox-content .meta-lightbox-zoom-wrapper").trigger("zoom.destroy"),this.isMSIE&&(e.find("iframe").attr("src"," "),e.find("iframe").remove()),s(".meta-lightbox-prev").off("click"),s(".meta-lightbox-next").off("click"),s(".meta-lightbox-content").empty(),h.removeClass("meta-lightbox-body-effect-fade")}}],(a=null)&&l(e.prototype,a),o&&l(e,o),t}(),f.on("MetaLightboxUI.init ".concat(r.a.AJAX," ").concat(r.a.LOADED),(function(){g.init()})),d.MetaLightboxUI=g},"./src/scss/app.scss":function(t,e,a){},jquery:function(t,e){t.exports=jQuery}});
|
!function(t){var e={};function a(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=t,a.c=e,a.d=function(t,e,o){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},a.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)a.d(o,n,function(e){return t[e]}.bind(null,n));return o},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="/mnt/data/srv/dist/repositories/meta-lightbox/dist",a(a.s="./src/js/app.js")}({"./src/js/_events.js":function(t,e){t.exports={AJAX:"ajax-load",AJAXMAIN:"ajax-main-load",MAININIT:"main-init",TABHIDDEN:"tab-hidden",TABFOCUSED:"tab-focused",OFFLINE:"offline",ONLINE:"online",BACKONLINE:"back-online",TOUCHENABLE:"touch-enabled",TOUCHDISABLED:"touch-disabled",LOADED:"load",SWIPELEFT:"swipeleft panleft",SWIPERIGHT:"swiperight panright",ALLERTAPPEARED:"alert-appeared",ALERTREMOVED:"alert-removed",LODEDANDREADY:"load-ready",LAZYIMAGEREADY:"image-lazy-bg-loaded",LAZYIMAGESREADY:"images-lazy-loaded",MAPLOADED:"map-loaded",MAPAPILOADED:"map-api-loaded",MAPMARKERCLICK:"map-marker-click",MAPPOPUPCLOSE:"map-popup-close",SCROLL:"scroll",RESIZE:"resize",CAROUSEL_READY:"bs.carousel.ready",SET_TARGET_UPDATE:"set-target-update",RESTORE_FIELD:"restore-field",FORM_INIT_BASICS:"form-basics",FORM_INIT_STEPPED:"form-init-stepped",FORM_INIT_VALIDATE:"form-init-validate",FORM_INIT_VALIDATE_FIELD:"form-init-validate-field",FORM_INIT_STORAGE:"form-init-storage",FORM_VALIDATION_FAILED:"form-validation-failed",FORM_STEPPED_NEW_STEP:"form-new-step",FORM_STEPPED_FIRST_STEP:"form-first-step",FORM_STEPPED_LAST_STEP:"form-last-step",FORM_FIELDS:"input,textarea,select"}},"./src/js/app.js":function(t,e,a){"use strict";a.r(e);a("./src/scss/app.scss");var o=a("jquery"),n=a.n(o),i=a("./src/js/_events.js"),r=a.n(i);function c(t){return(c="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var a=0;a<e.length;a++){var o=e[a];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var s,d,f,u,h,p,g,m;s=n.a,d=window,f=s(d),u=document,h=s("body"),p="MetaLightboxUI",g='<div class="meta-lightbox-error"><div class="alert alert-error alert-danger">Connection failure.</div></div>',m=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,a,o;return e=t,o=[{key:"init",value:function(){console.log("".concat(p,": init ..."));var t=this;t.isMSIE=0;try{t.isHidpi=t.is_hdpi()}catch(e){console.log("".concat(p,": catch"))}s(".js".concat(p,',[data-toggle="lightbox"],[data-lightbox-gallery]')).on("click",(function(e){e.preventDefault(),e.stopPropagation();var a=s(e.currentTarget);t.show(a)}))}},{key:"is_hdpi",value:function(){return console.log("".concat(p,": isHidpi")),d.devicePixelRatio>1||d.matchMedia&&d.matchMedia("(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)").matches}},{key:"show",value:function(t){console.log("".concat(p,": show"));var e=this;if(e.constructLightbox()){var a=e.$content;if(a){if(h.addClass("meta-lightbox-body-effect-fade"),e.process(a,t),t.data("lightbox-gallery")){var o=s('[data-lightbox-gallery="'.concat(t.data("lightbox-gallery"),'"]'));1===o.length?s(".meta-lightbox-nav").hide():s(".meta-lightbox-nav").show(),s(".meta-lightbox-prev").off("click").on("click",(function(a){a.preventDefault();var n=o.index(t),i=o.eq(n-1);i.length||(i=o.last()),setTimeout((function(){e.show(i)}),10)})),s(".meta-lightbox-next").off("click").on("click",(function(a){a.preventDefault();var n=o.index(t),i=o.eq(n+1);i.length||(i=o.first()),setTimeout((function(){e.show(i)}),10)}))}setTimeout((function(){e.$overlay.addClass("meta-lightbox-open")}),1)}}}},{key:"constructLightbox",value:function(){console.log("".concat(p,": constructLightbox"));var t=this,e=s("<div>",{class:"meta-lightbox-overlay meta-lightbox-theme-default meta-lightbox-effect-fade"}),a=s("<div>",{class:"meta-lightbox-wrap"}),o=s("<div>",{class:"meta-lightbox-content"}),n=s('<a href="#" class="meta-lightbox-nav meta-lightbox-prev"><i class="fas fa fa-chevron-left"></i> <span class="sr-only">Previous</span></a><a href="#" class="meta-lightbox-nav meta-lightbox-next"><i class="fa fas fa-chevron-right"></i> <span class="sr-only">Next</span></a>'),i=s('<a href="#" class="meta-lightbox-close fas fa fa-times" title="Close"><span class="sr-only">Close</span></a>'),r=s("<div>",{class:"meta-lightbox-title-wrap"});return t.$overlay||(t.isMSIE&&e.addClass("meta-lightbox-ie"),a.append(o),a.append(r),e.append(a),e.append(n),e.append(i),h.append(e),e.on("click",(function(e){e.preventDefault(),t.hide()})),i.on("click",(function(e){e.preventDefault(),t.hide()})),t.$overlay=e,t.$content=o,t.$title=r),t.$overlay}},{key:"setTitle",value:function(t){this.$title.html(t)}},{key:"process",value:function(t,e){console.log("".concat(p,": process"));var a=this,o=e.attr("href")&&e.attr("href").length?e.attr("href"):e.data("href");a.$content.attr("class","meta-lightbox-content"),a.$content.addClass(e.data("lightbox-class")),o.length||(console.log(e),console.error("".concat(p,": href(attr/data) is missing")));var n=s("#PageLoading .loading-spinner"),i=n.length?n.clone():"";if(a.$content.append(i).addClass("meta-lightbox-loading"),o.match(/\.(jpeg|jpg|gif|png|svg)$/i)){s.ajax({url:o,success:function(){var e=s("<img>",{src:o}),n=s('<div class="meta-lightbox-image"></div>'),i=s('<span class="meta-lightbox-zoom-wrapper"></span>');i.append(e),n.append(i),n.css({"line-height":"".concat(t.height(),"px"),height:"".concat(t.height(),"px")}),f.resize((function(){n.css({"line-height":"".concat(t.height(),"px"),height:"".concat(t.height(),"px")})})),"undefined"!==typeof i.zoom?i.zoom():i.addClass("no-zoom"),a.$content.html(n),a.contentLoaded()},error:function(t,e){var o=s(g);a.$content.html(o),a.contentLoaded()}});var r=e.data("title")?e.data("title"):e.attr("title");a.setTitle(r),"function"===typeof ga&&ga("send","event","meta","Image Click",o)}else if(o.match(/(youtube|youtube-nocookie|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/)){var l,h=o.match(/(youtube|youtube-nocookie|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/),m="meta-lightbox-video";"youtube"==h[1]&&(l="https://www.youtube.com/embed/".concat(h[4]),m="".concat(m," meta-lightbox-youtube")),"youtu"==h[1]&&(l="https://www.youtube.com/embed/".concat(h[3]),m="".concat(m," meta-lightbox-youtube")),"youtube-nocookie"==h[1]&&(l="https://www.youtube-nocookie.com/embed/".concat(h[4]),m="".concat(m," meta-lightbox-youtube")),"vimeo"==h[1]&&(l="https://player.vimeo.com/video/".concat(h[3]),m="".concat(m," meta-lightbox-vimeo")),l&&a.loadIframe(l,m);var b=e.data("title")?e.data("title"):e.attr("title");a.setTitle(b),"function"===typeof ga&&ga("send","event","meta","Video Click",h)}else if("#"==o.substring(0,1))s(o).length?(wrap=s('<div class="meta-lightbox-inline" />'),wrap.append(s(o).clone().show()),wrap.outerHeight()<a.$content.height()&&wrap.css({position:"relative",top:"50%","margin-top":"".concat(-wrap.outerHeight()/2,"px")}),f.resize((function(){wrap.outerHeight()<a.$content.height()&&wrap.css({position:"relative",top:"50%","margin-top":"".concat(-wrap.outerHeight()/2,"px")})})),a.$content.html(wrap),a.contentLoaded()):(wrap=s(g),a.$content.html(wrap),a.contentLoaded()),s(".meta-lightbox-title-wrap").html(""),"function"===typeof ga&&ga("send","event","meta","inline HTML click",o);else{if(e.data("force-iframe"))return console.log("".concat(p,": IFrame forced")),a.loadIframe(o,"meta-lightbox-iframe-content");console.log("".concat(p,": loading AJAX")),s.ajax({sync:!1,async:!0,url:o,dataType:"html",method:"GET",cache:!1,statusCode:{404:function(){console.log("".concat(p,": page not found")),d.location.href=url},302:function(){console.log("".concat(p,": redirect 302")),d.location.href=url}},error:function(t,e){console.log("".concat(p,": AJAX request failure.").concat(t.statusText));var o=s(g);a.$content.html(o),a.contentLoaded(),"function"===typeof ga&&ga("send","event","error","AJAX ERROR",t.statusText)},success:function(t,e,o){try{var n=s.parseJSON(t);if("object"===c(n)){if("object"===c(n.regions)&&"undefinded"!==typeof n.regions.LayoutAjax){var i=s('<div class="meta-lightbox-ajax" />');i.html(n.regions.LayoutAjax),a.$content.html(i),a.contentLoaded()}var r=o.getResponseHeader("X-Title"),l=o.getResponseHeader("X-Link");r&&r.length&&l&&l.length&&l!==d.location.href&&l.substring(0,l.indexOf("#"))!==d.location.href.replace(s("base").attr("href"),"/")&&(s(".meta-lightbox-ajax").data("curr-title",u.title),s(".meta-lightbox-ajax").data("curr-link",d.location.href),"undefined"!==typeof d.localStorage&&"/"!==l&&d.localStorage.setItem("current-page",l),u.URL!==l&&u.URL!==s("base").attr("href")+l&&u.URL!=="".concat(s("base").attr("href"),"/").concat(l)&&d.history.pushState({title:r,page:l,ajax:"true"},r,l),s(".meta-lightbox-title-wrap").html(""),"function"===typeof ga&&(ga("set",{page:l.replace(s("base").attr("href"),""),title:r}),ga("send","pageview")))}}catch(h){var f=s('<div class="meta-lightbox-ajax" />');f.append(t),a.$content.html(f),a.contentLoaded()}a.contentLoaded()}})}}},{key:"loadIframe",value:function(t,e){var a=this,o=s("<iframe>",{src:t,class:e,frameborder:0,vspace:0,hspace:0,scrolling:"auto",allowtransparency:"true"});console.log("".concat(p,": loading iframe")),h.append('<div id="IFramePreload" class="hidden d-none iframe-preload" style="display:none"></div>');var n=s("#IFramePreload");return n.html(o),o.on("load",(function(){console.log("".concat(p,": the iframe was loaded")),n.html(""),n.remove(),a.$content.addClass("iframe-delay"),a.$content.html(o),a.contentLoaded(),setTimeout((function(){a.$content.removeClass("iframe-delay")}),1e3)})),h.on("".concat(r.a.BACKONLINE),(function(){console.log("".concat(p,": reloading iframe")),o.attr("src",o.attr("src"))})),o}},{key:"contentLoaded",value:function(){this.$content.removeClass("meta-lightbox-loading"),setTimeout((function(){f.trigger("meta-lightbox-loaded")}),1),setTimeout((function(){h.addClass("meta-lightbox-body-effect-fade")}),600)}},{key:"hide",value:function(t){var e=this.$overlay,a=s(".meta-lightbox-ajax").data("curr-title"),o=s(".meta-lightbox-ajax").data("curr-link");a&&o&&("undefined"!==typeof d.localStorage&&"/"!==o&&d.localStorage.setItem("current-page",o),u.URL!==o&&u.URL!==s("base").attr("href")+o&&u.URL!=="".concat(s("base").attr("href"),"/").concat(o)&&d.history.replaceState({title:a,page:o,ajax:"true"},a,o)),e.removeClass("meta-lightbox-open"),h.removeClass("meta-lightbox-body-effect-fade"),s(".meta-lightbox-content .meta-lightbox-zoom-wrapper").trigger("zoom.destroy"),this.isMSIE&&(e.find("iframe").attr("src"," "),e.find("iframe").remove()),s(".meta-lightbox-prev").off("click"),s(".meta-lightbox-next").off("click"),s(".meta-lightbox-content").empty(),h.removeClass("meta-lightbox-body-effect-fade")}}],(a=null)&&l(e.prototype,a),o&&l(e,o),t}(),f.on("MetaLightboxUI.init ".concat(r.a.AJAX," ").concat(r.a.LOADED),(function(){m.init()})),d.MetaLightboxUI=m},"./src/scss/app.scss":function(t,e,a){},jquery:function(t,e){t.exports=jQuery}});
|
||||||
//# sourceMappingURL=app.js.map
|
//# sourceMappingURL=app.js.map
|
2
dist/js/app.js.map
vendored
2
dist/js/app.js.map
vendored
@ -1 +1 @@
|
|||||||
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/js/_events.js","webpack:///./src/js/meta-lightbox.js","webpack:///external \"jQuery\""],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","AJAX","AJAXMAIN","MAININIT","TABHIDDEN","TABFOCUSED","OFFLINE","ONLINE","BACKONLINE","TOUCHENABLE","TOUCHDISABLED","LOADED","SWIPELEFT","SWIPERIGHT","ALLERTAPPEARED","ALERTREMOVED","LODEDANDREADY","LAZYIMAGEREADY","LAZYIMAGESREADY","MAPLOADED","MAPAPILOADED","MAPMARKERCLICK","MAPPOPUPCLOSE","SCROLL","RESIZE","CAROUSEL_READY","SET_TARGET_UPDATE","RESTORE_FIELD","FORM_INIT_BASICS","FORM_INIT_STEPPED","FORM_INIT_VALIDATE","FORM_INIT_VALIDATE_FIELD","FORM_INIT_STORAGE","FORM_VALIDATION_FAILED","FORM_STEPPED_NEW_STEP","FORM_STEPPED_FIRST_STEP","FORM_STEPPED_LAST_STEP","FORM_FIELDS","$","W","$W","D","$Body","NAME","NETWORK_ERROR","MetaLightboxUI","window","document","console","log","ui","this","isMSIE","isHidpi","is_hdpi","e","on","preventDefault","stopPropagation","$link","currentTarget","show","devicePixelRatio","matchMedia","matches","constructLightbox","$content","addClass","process","data","$galleryItems","length","hide","off","index","$currentLink","eq","last","setTimeout","first","$overlay","overlay","class","wrap","content","nav","close","title","append","$title","str","html","href","attr","error","$pageSpinner","loadingContent","clone","match","ajax","url","success","img","src","imgwrapper","css","height","resize","zoom","contentLoaded","jqXHR","status","setTitle","ga","video","classTerm","loadIframe","substring","outerHeight","position","top","sync","async","dataType","method","cache","statusCode","404","location","302","statusText","dataJson","parseJSON","getResponseHeader","link","indexOf","replace","localStorage","setItem","URL","history","pushState","page","$wrap","$iframe","frameborder","vspace","hspace","scrolling","allowtransparency","$preload","remove","removeClass","Events","contentDocument","reload","trigger","callback","replaceState","find","empty","init","jQuery"],"mappings":";aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,qBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,kBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,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oCACd,OAhhBsB,2BAmhBf0F,GACV,IAEM7E,EAFK7B,KAES6B,SAEhBO,EAAQjD,EAAE,uBAAuB+B,KAAK,cACxCiE,EAAOhG,EAAE,uBAAuB+B,KAAK,aACnCkB,GAAS+C,IACmB,qBAAnB/F,EAAEkG,cAAyC,MAATH,GAC3C/F,EAAEkG,aAAaC,QAAQ,eAAgBJ,GAIvC7F,EAAEkG,MAAQL,GACV7F,EAAEkG,MAAQrG,EAAE,QAAQuD,KAAK,QAAUyC,GACnC7F,EAAEkG,MAAF,UAAarG,EAAE,QAAQuD,KAAK,QAA5B,YAAuCyC,IAEvC/F,EAAEqG,QAAQkB,aACR,CACEvE,QACAuD,KAAMR,EACNnC,KAAM,QAERZ,EACA+C,IAKNtD,EAASwE,YAAY,sBACrB9G,EAAM8G,YAAY,kCAClBlH,EAAE,sDAAsDsH,QACtD,gBA/BSzG,KAmCJC,SACL4B,EAAS+E,KAAK,UAAUlE,KAAK,MAAO,KACpCb,EAAS+E,KAAK,UAAUR,UAE1BjH,EAAE,uBAAuBmC,IAAI,SAG7BnC,EAAE,uBAAuBmC,IAAI,SAG7BnC,EAAE,0BAA0B0H,QAE5BtH,EAAM8G,YAAY,sC,EAnkBO,O,2BAAA,KAukB7BhH,EAAGgB,GAAH,8BAA6BiG,IAAOxJ,KAApC,YAA4CwJ,IAAO9I,SAAU,WAC3DkC,EAAeoH,UAGjB1H,EAAEM,eAAiBA,G,6DC1lBrB7E,EAAOD,QAAUmM","file":"js/app.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/mnt/data/srv/dist/repositories/meta-lightbox/dist\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/js/app.js\");\n","/**\n * Add your global events here\n */\n\nmodule.exports = {\n AJAX: 'ajax-load',\n AJAXMAIN: 'ajax-main-load',\n MAININIT: 'main-init',\n TABHIDDEN: 'tab-hidden',\n TABFOCUSED: 'tab-focused',\n OFFLINE: 'offline',\n ONLINE: 'online',\n BACKONLINE: 'back-online',\n TOUCHENABLE: 'touch-enabled',\n TOUCHDISABLED: 'touch-disabled',\n LOADED: 'load',\n SWIPELEFT: 'swipeleft panleft',\n SWIPERIGHT: 'swiperight panright',\n ALLERTAPPEARED: 'alert-appeared',\n ALERTREMOVED: 'alert-removed',\n LODEDANDREADY: 'load-ready',\n LAZYIMAGEREADY: 'image-lazy-bg-loaded',\n LAZYIMAGESREADY: 'images-lazy-loaded',\n MAPLOADED: 'map-loaded',\n MAPAPILOADED: 'map-api-loaded',\n MAPMARKERCLICK: 'map-marker-click',\n MAPPOPUPCLOSE: 'map-popup-close',\n SCROLL: 'scroll',\n RESIZE: 'resize',\n CAROUSEL_READY: 'bs.carousel.ready',\n SET_TARGET_UPDATE: 'set-target-update',\n RESTORE_FIELD: 'restore-field',\n FORM_INIT_BASICS: 'form-basics',\n FORM_INIT_STEPPED: 'form-init-stepped',\n FORM_INIT_VALIDATE: 'form-init-validate',\n FORM_INIT_VALIDATE_FIELD: 'form-init-validate-field',\n FORM_INIT_STORAGE: 'form-init-storage',\n FORM_VALIDATION_FAILED: 'form-validation-failed',\n FORM_STEPPED_NEW_STEP: 'form-new-step',\n FORM_STEPPED_FIRST_STEP: 'form-first-step',\n FORM_STEPPED_LAST_STEP: 'form-last-step',\n FORM_FIELDS: 'input,textarea,select',\n};\n","/*\n * MetaLightbox\n * https://tony.twma.pro\n *\n */\n\n// optional:\n//=require ../../bower_components/jquery-zoom/jquery.zoom.js\n\n'use strict';\n\nimport $ from 'jquery';\n\nimport Events from './_events';\n\nconst MetaLightboxUI = (($) => {\n const W = window;\n const $W = $(W);\n const D = document;\n const $Body = $('body');\n\n const NAME = 'MetaLightboxUI';\n const NETWORK_ERROR =\n '<div class=\"meta-lightbox-error\"><div class=\"alert alert-error alert-danger\">Connection failure.</div></div>';\n\n class MetaLightboxUI {\n static init() {\n console.log(`${NAME}: init ...`);\n\n const ui = this;\n ui.isMSIE = /*@cc_on!@*/ 0;\n try {\n ui.isHidpi = ui.is_hdpi();\n } catch (e) {\n console.log(`${NAME}: catch`);\n }\n\n $(`.js${NAME},[data-toggle=\"lightbox\"],[data-lightbox-gallery]`).on(\n 'click',\n (e) => {\n e.preventDefault();\n e.stopPropagation();\n const $link = $(e.currentTarget);\n\n ui.show($link);\n },\n );\n }\n\n static is_hdpi() {\n console.log(`${NAME}: isHidpi`);\n const mediaQuery =\n '(-webkit-min-device-pixel-ratio: 1.5),\\\n (min--moz-device-pixel-ratio: 1.5),\\\n (-o-min-device-pixel-ratio: 3/2),\\\n (min-resolution: 1.5dppx)';\n if (W.devicePixelRatio > 1) return true;\n return W.matchMedia && W.matchMedia(mediaQuery).matches;\n }\n\n static show($link) {\n console.log(`${NAME}: show`);\n const ui = this;\n\n const $lightbox = ui.constructLightbox();\n if (!$lightbox) return;\n\n const $content = ui.$content;\n if (!$content) return;\n\n $Body.addClass(`meta-lightbox-body-effect-fade`);\n\n // Add content\n ui.process($content, $link);\n\n // Nav\n if ($link.data('lightbox-gallery')) {\n const $galleryItems = $(\n `[data-lightbox-gallery=\"${$link.data('lightbox-gallery')}\"]`,\n );\n\n if ($galleryItems.length === 1) {\n $('.meta-lightbox-nav').hide();\n } else {\n $('.meta-lightbox-nav').show();\n }\n\n // Prev\n $('.meta-lightbox-prev')\n .off('click')\n .on('click', (e) => {\n e.preventDefault();\n const index = $galleryItems.index($link);\n let $currentLink = $galleryItems.eq(index - 1);\n if (!$currentLink.length) $currentLink = $galleryItems.last();\n\n //ui.hide();\n setTimeout(() => {\n ui.show($currentLink);\n }, 10);\n });\n\n // Next\n $('.meta-lightbox-next')\n .off('click')\n .on('click', (e) => {\n e.preventDefault();\n const index = $galleryItems.index($link);\n let $currentLink = $galleryItems.eq(index + 1);\n if (!$currentLink.length) $currentLink = $galleryItems.first();\n\n //ui.hide();\n setTimeout(() => {\n ui.show($currentLink);\n }, 10);\n });\n }\n\n setTimeout(() => {\n ui.$overlay.addClass('meta-lightbox-open');\n }, 1); // For CSS transitions\n }\n\n static constructLightbox() {\n console.log(`${NAME}: constructLightbox`);\n const ui = this;\n\n const overlay = $('<div>', {\n class:\n 'meta-lightbox-overlay meta-lightbox-theme-default meta-lightbox-effect-fade',\n });\n const wrap = $('<div>', {\n class: 'meta-lightbox-wrap',\n });\n const content = $('<div>', {\n class: 'meta-lightbox-content',\n });\n const nav = $(\n '<a href=\"#\" class=\"meta-lightbox-nav meta-lightbox-prev\"><i class=\"fas fa fa-chevron-left\"></i> <span class=\"sr-only\">Previous</span></a><a href=\"#\" class=\"meta-lightbox-nav meta-lightbox-next\"><i class=\"fa fas fa-chevron-right\"></i> <span class=\"sr-only\">Next</span></a>',\n );\n const close = $(\n '<a href=\"#\" class=\"meta-lightbox-close fas fa fa-times\" title=\"Close\"><span class=\"sr-only\">Close</span></a>',\n );\n const title = $('<div>', {\n class: 'meta-lightbox-title-wrap',\n });\n\n if (ui.$overlay) return ui.$overlay;\n\n if (ui.isMSIE) overlay.addClass('meta-lightbox-ie');\n\n wrap.append(content);\n wrap.append(title);\n overlay.append(wrap);\n overlay.append(nav);\n overlay.append(close);\n $Body.append(overlay);\n\n overlay.on('click', (e) => {\n e.preventDefault();\n ui.hide();\n });\n\n close.on('click', (e) => {\n e.preventDefault();\n ui.hide();\n });\n\n ui.$overlay = overlay;\n ui.$content = content;\n ui.$title = title;\n\n return ui.$overlay;\n }\n\n static setTitle(str) {\n const ui = this;\n\n ui.$title.html(str);\n }\n\n static process($content, $link) {\n console.log(`${NAME}: process`);\n const ui = this;\n\n const href =\n $link.attr('href') && $link.attr('href').length\n ? $link.attr('href')\n : $link.data('href');\n\n // add custom link specific class\n ui.$content.attr('class', 'meta-lightbox-content');\n ui.$content.addClass($link.data('lightbox-class'));\n\n if (!href.length) {\n console.log($link);\n console.error(`${NAME}: href(attr/data) is missing`);\n }\n\n const $pageSpinner = $('#PageLoading .loading-spinner');\n const loadingContent = $pageSpinner.length ? $pageSpinner.clone() : '';\n ui.$content.append(loadingContent).addClass('meta-lightbox-loading');\n\n // Image\n if (href.match(/\\.(jpeg|jpg|gif|png|svg)$/i)) {\n $.ajax({\n url: href,\n success: () => {\n const img = $('<img>', { src: href });\n const wrap = $('<div class=\"meta-lightbox-image\"></div>');\n const imgwrapper = $(\n '<span class=\"meta-lightbox-zoom-wrapper\"></span>',\n );\n\n imgwrapper.append(img);\n wrap.append(imgwrapper);\n\n // Vertically center images\n wrap.css({\n 'line-height': `${$content.height()}px`,\n height: `${$content.height()}px`, // For Firefox\n });\n\n $W.resize(() => {\n wrap.css({\n 'line-height': `${$content.height()}px`,\n height: `${$content.height()}px`, // For Firefox\n });\n });\n\n if (typeof imgwrapper['zoom'] !== 'undefined') {\n imgwrapper.zoom();\n } else {\n imgwrapper.addClass('no-zoom');\n }\n\n ui.$content.html(wrap);\n ui.contentLoaded();\n },\n error: (jqXHR, status) => {\n const wrap = $(NETWORK_ERROR);\n\n ui.$content.html(wrap);\n ui.contentLoaded();\n },\n });\n\n // Set the title\n const title = $link.data('title')\n ? $link.data('title')\n : $link.attr('title');\n ui.setTitle(title);\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'meta', 'Image Click', href);\n }\n }\n // Video (Youtube/Vimeo)\n else if (\n href.match(\n /(youtube|youtube-nocookie|youtu|vimeo)\\.(com|be)\\/(watch\\?v=([\\w-]+)|([\\w-]+))/,\n )\n ) {\n const video = href.match(\n /(youtube|youtube-nocookie|youtu|vimeo)\\.(com|be)\\/(watch\\?v=([\\w-]+)|([\\w-]+))/,\n );\n let classTerm = 'meta-lightbox-video';\n let src;\n\n if (video[1] == 'youtube') {\n src = `https://www.youtube.com/embed/${video[4]}`;\n classTerm = `${classTerm} meta-lightbox-youtube`;\n }\n if (video[1] == 'youtu') {\n src = `https://www.youtube.com/embed/${video[3]}`;\n classTerm = `${classTerm} meta-lightbox-youtube`;\n }\n if (video[1] == 'youtube-nocookie') {\n src = `https://www.youtube-nocookie.com/embed/${video[4]}`;\n classTerm = `${classTerm} meta-lightbox-youtube`;\n }\n if (video[1] == 'vimeo') {\n src = `https://player.vimeo.com/video/${video[3]}`;\n classTerm = `${classTerm} meta-lightbox-vimeo`;\n }\n\n if (src) {\n ui.loadIframe(src, classTerm);\n }\n\n // Set the title\n const title = $link.data('title')\n ? $link.data('title')\n : $link.attr('title');\n ui.setTitle(title);\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'meta', 'Video Click', video);\n }\n }\n // Inline HTML\n else if (href.substring(0, 1) == '#') {\n if ($(href).length) {\n wrap = $('<div class=\"meta-lightbox-inline\" />');\n wrap.append($(href).clone().show());\n\n // Vertically center html\n if (wrap.outerHeight() < ui.$content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n $W.resize(() => {\n if (wrap.outerHeight() < ui.$content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n });\n\n ui.$content.html(wrap);\n ui.contentLoaded();\n } else {\n wrap = $(NETWORK_ERROR);\n ui.$content.html(wrap);\n ui.contentLoaded();\n }\n\n $('.meta-lightbox-title-wrap').html('');\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'meta', 'inline HTML click', href);\n }\n }\n // AJAX/iFrame (default)\n else {\n if ($link.data('force-iframe')) {\n console.log(`${NAME}: IFrame forced`);\n\n return ui.loadIframe(href, 'meta-lightbox-iframe-content');\n }\n\n console.log(`${NAME}: loading AJAX`);\n $.ajax({\n sync: false,\n async: true,\n url: href,\n dataType: 'html',\n method: 'GET',\n cache: false,\n statusCode: {\n 404: function () {\n console.log(`${NAME}: page not found`);\n W.location.href = url;\n },\n 302: function () {\n console.log(`${NAME}: redirect 302`);\n W.location.href = url;\n },\n },\n error: function (jqXHR, status) {\n console.log(`${NAME}: AJAX request failure.${jqXHR.statusText}`);\n\n var wrap = $(NETWORK_ERROR);\n ui.$content.html(wrap);\n ui.contentLoaded();\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'error', 'AJAX ERROR', jqXHR.statusText);\n }\n },\n success: function (data, status, jqXHR) {\n try {\n const dataJson = $.parseJSON(data);\n if (typeof dataJson === 'object') {\n // Replace regions\n if (\n typeof dataJson['regions'] === 'object' &&\n typeof dataJson['regions']['LayoutAjax'] !== 'undefinded'\n ) {\n var wrap = $('<div class=\"meta-lightbox-ajax\" />');\n wrap.html(dataJson['regions']['LayoutAjax']);\n ui.$content.html(wrap);\n ui.contentLoaded();\n }\n\n // trigger events\n /*if (typeof (data['events']) === 'object') {\n for (var eventName in data.events) {\n $(D).trigger(eventName, [data['events'][eventName]]);\n }\n }*/\n\n var title = jqXHR.getResponseHeader('X-Title'),\n link = jqXHR.getResponseHeader('X-Link');\n\n if (\n title &&\n title.length &&\n link &&\n link.length &&\n link !== W.location.href &&\n link.substring(0, link.indexOf('#')) !==\n W.location.href.replace($('base').attr('href'), '/')\n ) {\n $('.meta-lightbox-ajax').data('curr-title', D.title);\n $('.meta-lightbox-ajax').data('curr-link', W.location.href);\n\n if (typeof W.localStorage !== 'undefined' && link !== '/') {\n W.localStorage.setItem('current-page', link);\n }\n\n if (\n D.URL !== link &&\n D.URL !== $('base').attr('href') + link &&\n D.URL !== `${$('base').attr('href')}/${link}`\n ) {\n W.history.pushState(\n {\n title,\n page: link,\n ajax: 'true',\n },\n title,\n link,\n );\n }\n\n $('.meta-lightbox-title-wrap').html('');\n\n // google analytics\n if (typeof ga === 'function') {\n ga('set', {\n page: link.replace($('base').attr('href'), ''),\n title,\n });\n ga('send', 'pageview');\n }\n }\n }\n } catch (e) {\n const $wrap = $('<div class=\"meta-lightbox-ajax\" />');\n $wrap.append(data);\n ui.$content.html($wrap);\n ui.contentLoaded();\n }\n\n // Vertically center html\n /*if (wrap.outerHeight() < ui.$content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n $W.resize(() => {\n if (wrap.outerHeight() < ui.$content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n });*/\n\n /*setTimeout(() => {\n $W.resize();\n\n if (typeof W.imagesLoaded === 'function') {\n W.imagesLoaded().then(() => {\n $W.resize();\n });\n }\n }, 500);*/\n\n ui.contentLoaded();\n },\n });\n }\n }\n\n static loadIframe(href, classTerm) {\n const ui = this;\n\n const $iframe = $('<iframe>', {\n src: href,\n class: classTerm,\n frameborder: 0,\n vspace: 0,\n hspace: 0,\n scrolling: 'auto',\n allowtransparency: 'true',\n });\n\n console.log(`${NAME}: loading iframe`);\n\n $Body.append(\n '<div id=\"IFramePreload\" class=\"hidden d-none iframe-preload\" style=\"display:none\"></div>',\n );\n const $preload = $('#IFramePreload');\n $preload.html($iframe);\n\n $iframe.on('load', () => {\n console.log(`${NAME}: the iframe was loaded`);\n $preload.html('');\n $preload.remove();\n\n ui.$content.addClass('iframe-delay');\n\n ui.$content.html($iframe);\n ui.contentLoaded();\n\n setTimeout(() => {\n ui.$content.removeClass('iframe-delay');\n }, 1000);\n });\n\n $Body.on(`${Events.BACKONLINE}`, () => {\n console.log(`${NAME}: reloading iframe`);\n $iframe[0].contentDocument.location.reload(true);\n });\n\n return $iframe;\n }\n\n static contentLoaded() {\n const ui = this;\n\n ui.$content.removeClass('meta-lightbox-loading');\n setTimeout(() => {\n $W.trigger('meta-lightbox-loaded');\n }, 1); // For CSS transitions\n\n setTimeout(() => {\n $Body.addClass('meta-lightbox-body-effect-fade');\n }, 600);\n }\n\n static hide(callback) {\n const ui = this;\n\n const $overlay = ui.$overlay;\n\n var title = $('.meta-lightbox-ajax').data('curr-title'),\n link = $('.meta-lightbox-ajax').data('curr-link');\n if (title && link) {\n if (typeof W.localStorage !== 'undefined' && link !== '/') {\n W.localStorage.setItem('current-page', link);\n }\n\n if (\n D.URL !== link &&\n D.URL !== $('base').attr('href') + link &&\n D.URL !== `${$('base').attr('href')}/${link}`\n ) {\n W.history.replaceState(\n {\n title,\n page: link,\n ajax: 'true',\n },\n title,\n link,\n );\n }\n }\n\n $overlay.removeClass('meta-lightbox-open');\n $Body.removeClass('meta-lightbox-body-effect-fade');\n $('.meta-lightbox-content .meta-lightbox-zoom-wrapper').trigger(\n 'zoom.destroy',\n );\n\n // For IE\n if (ui.isMSIE) {\n $overlay.find('iframe').attr('src', ' ');\n $overlay.find('iframe').remove();\n }\n $('.meta-lightbox-prev').off('click');\n\n // Remove click handlers\n $('.meta-lightbox-next').off('click');\n\n // Empty content (for videos)\n $('.meta-lightbox-content').empty();\n\n $Body.removeClass('meta-lightbox-body-effect-fade');\n }\n }\n\n $W.on(`MetaLightboxUI.init ${Events.AJAX} ${Events.LOADED}`, () => {\n MetaLightboxUI.init();\n });\n\n W.MetaLightboxUI = MetaLightboxUI;\n\n return MetaLightboxUI;\n})($);\n\nexport default MetaLightboxUI;\n","module.exports = jQuery;"],"sourceRoot":""}
|
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/js/_events.js","webpack:///./src/js/meta-lightbox.js","webpack:///external \"jQuery\""],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","AJAX","AJAXMAIN","MAININIT","TABHIDDEN","TABFOCUSED","OFFLINE","ONLINE","BACKONLINE","TOUCHENABLE","TOUCHDISABLED","LOADED","SWIPELEFT","SWIPERIGHT","ALLERTAPPEARED","ALERTREMOVED","LODEDANDREADY","LAZYIMAGEREADY","LAZYIMAGESREADY","MAPLOADED","MAPAPILOADED","MAPMARKERCLICK","MAPPOPUPCLOSE","SCROLL","RESIZE","CAROUSEL_READY","SET_TARGET_UPDATE","RESTORE_FIELD","FORM_INIT_BASICS","FORM_INIT_STEPPED","FORM_INIT_VALIDATE","FORM_INIT_VALIDATE_FIELD","FORM_INIT_STORAGE","FORM_VALIDATION_FAILED","FORM_STEPPED_NEW_STEP","FORM_STEPPED_FIRST_STEP","FORM_STEPPED_LAST_STEP","FORM_FIELDS","$","W","$W","D","$Body","NAME","NETWORK_ERROR","MetaLightboxUI","window","document","console","log","ui","this","isMSIE","isHidpi","is_hdpi","e","on","preventDefault","stopPropagation","$link","currentTarget","show","devicePixelRatio","matchMedia","matches","constructLightbox","$content","addClass","process","data","$galleryItems","length","hide","off","index","$currentLink","eq","last","setTimeout","first","$overlay","overlay","class","wrap","content","nav","close","title","append","$title","str","html","href","attr","error","$pageSpinner","loadingContent","clone","match","ajax","url","success","img","src","imgwrapper","css","height","resize","zoom","contentLoaded","jqXHR","status","setTitle","ga","video","classTerm","loadIframe","substring","outerHeight","position","top","sync","async","dataType","method","cache","statusCode","404","location","302","statusText","dataJson","parseJSON","getResponseHeader","link","indexOf","replace","localStorage","setItem","URL","history","pushState","page","$wrap","$iframe","frameborder","vspace","hspace","scrolling","allowtransparency","$preload","remove","removeClass","Events","trigger","callback","replaceState","find","empty","init","jQuery"],"mappings":";aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAG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I,SAG7BnC,EAAE,0BAA0BwH,QAE5BpH,EAAM8G,YAAY,sC,EAnkBO,O,2BAAA,KAukB7BhH,EAAGgB,GAAH,8BAA6BiG,IAAOxJ,KAApC,YAA4CwJ,IAAO9I,SAAU,WAC3DkC,EAAekH,UAGjBxH,EAAEM,eAAiBA,G,6DC1lBrB7E,EAAOD,QAAUiM","file":"js/app.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/mnt/data/srv/dist/repositories/meta-lightbox/dist\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/js/app.js\");\n","/**\n * Add your global events here\n */\n\nmodule.exports = {\n AJAX: 'ajax-load',\n AJAXMAIN: 'ajax-main-load',\n MAININIT: 'main-init',\n TABHIDDEN: 'tab-hidden',\n TABFOCUSED: 'tab-focused',\n OFFLINE: 'offline',\n ONLINE: 'online',\n BACKONLINE: 'back-online',\n TOUCHENABLE: 'touch-enabled',\n TOUCHDISABLED: 'touch-disabled',\n LOADED: 'load',\n SWIPELEFT: 'swipeleft panleft',\n SWIPERIGHT: 'swiperight panright',\n ALLERTAPPEARED: 'alert-appeared',\n ALERTREMOVED: 'alert-removed',\n LODEDANDREADY: 'load-ready',\n LAZYIMAGEREADY: 'image-lazy-bg-loaded',\n LAZYIMAGESREADY: 'images-lazy-loaded',\n MAPLOADED: 'map-loaded',\n MAPAPILOADED: 'map-api-loaded',\n MAPMARKERCLICK: 'map-marker-click',\n MAPPOPUPCLOSE: 'map-popup-close',\n SCROLL: 'scroll',\n RESIZE: 'resize',\n CAROUSEL_READY: 'bs.carousel.ready',\n SET_TARGET_UPDATE: 'set-target-update',\n RESTORE_FIELD: 'restore-field',\n FORM_INIT_BASICS: 'form-basics',\n FORM_INIT_STEPPED: 'form-init-stepped',\n FORM_INIT_VALIDATE: 'form-init-validate',\n FORM_INIT_VALIDATE_FIELD: 'form-init-validate-field',\n FORM_INIT_STORAGE: 'form-init-storage',\n FORM_VALIDATION_FAILED: 'form-validation-failed',\n FORM_STEPPED_NEW_STEP: 'form-new-step',\n FORM_STEPPED_FIRST_STEP: 'form-first-step',\n FORM_STEPPED_LAST_STEP: 'form-last-step',\n FORM_FIELDS: 'input,textarea,select',\n};\n","/*\n * MetaLightbox\n * https://tony.twma.pro\n *\n */\n\n// optional:\n//=require ../../bower_components/jquery-zoom/jquery.zoom.js\n\n'use strict';\n\nimport $ from 'jquery';\n\nimport Events from './_events';\n\nconst MetaLightboxUI = (($) => {\n const W = window;\n const $W = $(W);\n const D = document;\n const $Body = $('body');\n\n const NAME = 'MetaLightboxUI';\n const NETWORK_ERROR =\n '<div class=\"meta-lightbox-error\"><div class=\"alert alert-error alert-danger\">Connection failure.</div></div>';\n\n class MetaLightboxUI {\n static init() {\n console.log(`${NAME}: init ...`);\n\n const ui = this;\n ui.isMSIE = /*@cc_on!@*/ 0;\n try {\n ui.isHidpi = ui.is_hdpi();\n } catch (e) {\n console.log(`${NAME}: catch`);\n }\n\n $(`.js${NAME},[data-toggle=\"lightbox\"],[data-lightbox-gallery]`).on(\n 'click',\n (e) => {\n e.preventDefault();\n e.stopPropagation();\n const $link = $(e.currentTarget);\n\n ui.show($link);\n },\n );\n }\n\n static is_hdpi() {\n console.log(`${NAME}: isHidpi`);\n const mediaQuery =\n '(-webkit-min-device-pixel-ratio: 1.5),\\\n (min--moz-device-pixel-ratio: 1.5),\\\n (-o-min-device-pixel-ratio: 3/2),\\\n (min-resolution: 1.5dppx)';\n if (W.devicePixelRatio > 1) return true;\n return W.matchMedia && W.matchMedia(mediaQuery).matches;\n }\n\n static show($link) {\n console.log(`${NAME}: show`);\n const ui = this;\n\n const $lightbox = ui.constructLightbox();\n if (!$lightbox) return;\n\n const $content = ui.$content;\n if (!$content) return;\n\n $Body.addClass(`meta-lightbox-body-effect-fade`);\n\n // Add content\n ui.process($content, $link);\n\n // Nav\n if ($link.data('lightbox-gallery')) {\n const $galleryItems = $(\n `[data-lightbox-gallery=\"${$link.data('lightbox-gallery')}\"]`,\n );\n\n if ($galleryItems.length === 1) {\n $('.meta-lightbox-nav').hide();\n } else {\n $('.meta-lightbox-nav').show();\n }\n\n // Prev\n $('.meta-lightbox-prev')\n .off('click')\n .on('click', (e) => {\n e.preventDefault();\n const index = $galleryItems.index($link);\n let $currentLink = $galleryItems.eq(index - 1);\n if (!$currentLink.length) $currentLink = $galleryItems.last();\n\n //ui.hide();\n setTimeout(() => {\n ui.show($currentLink);\n }, 10);\n });\n\n // Next\n $('.meta-lightbox-next')\n .off('click')\n .on('click', (e) => {\n e.preventDefault();\n const index = $galleryItems.index($link);\n let $currentLink = $galleryItems.eq(index + 1);\n if (!$currentLink.length) $currentLink = $galleryItems.first();\n\n //ui.hide();\n setTimeout(() => {\n ui.show($currentLink);\n }, 10);\n });\n }\n\n setTimeout(() => {\n ui.$overlay.addClass('meta-lightbox-open');\n }, 1); // For CSS transitions\n }\n\n static constructLightbox() {\n console.log(`${NAME}: constructLightbox`);\n const ui = this;\n\n const overlay = $('<div>', {\n class:\n 'meta-lightbox-overlay meta-lightbox-theme-default meta-lightbox-effect-fade',\n });\n const wrap = $('<div>', {\n class: 'meta-lightbox-wrap',\n });\n const content = $('<div>', {\n class: 'meta-lightbox-content',\n });\n const nav = $(\n '<a href=\"#\" class=\"meta-lightbox-nav meta-lightbox-prev\"><i class=\"fas fa fa-chevron-left\"></i> <span class=\"sr-only\">Previous</span></a><a href=\"#\" class=\"meta-lightbox-nav meta-lightbox-next\"><i class=\"fa fas fa-chevron-right\"></i> <span class=\"sr-only\">Next</span></a>',\n );\n const close = $(\n '<a href=\"#\" class=\"meta-lightbox-close fas fa fa-times\" title=\"Close\"><span class=\"sr-only\">Close</span></a>',\n );\n const title = $('<div>', {\n class: 'meta-lightbox-title-wrap',\n });\n\n if (ui.$overlay) return ui.$overlay;\n\n if (ui.isMSIE) overlay.addClass('meta-lightbox-ie');\n\n wrap.append(content);\n wrap.append(title);\n overlay.append(wrap);\n overlay.append(nav);\n overlay.append(close);\n $Body.append(overlay);\n\n overlay.on('click', (e) => {\n e.preventDefault();\n ui.hide();\n });\n\n close.on('click', (e) => {\n e.preventDefault();\n ui.hide();\n });\n\n ui.$overlay = overlay;\n ui.$content = content;\n ui.$title = title;\n\n return ui.$overlay;\n }\n\n static setTitle(str) {\n const ui = this;\n\n ui.$title.html(str);\n }\n\n static process($content, $link) {\n console.log(`${NAME}: process`);\n const ui = this;\n\n const href =\n $link.attr('href') && $link.attr('href').length\n ? $link.attr('href')\n : $link.data('href');\n\n // add custom link specific class\n ui.$content.attr('class', 'meta-lightbox-content');\n ui.$content.addClass($link.data('lightbox-class'));\n\n if (!href.length) {\n console.log($link);\n console.error(`${NAME}: href(attr/data) is missing`);\n }\n\n const $pageSpinner = $('#PageLoading .loading-spinner');\n const loadingContent = $pageSpinner.length ? $pageSpinner.clone() : '';\n ui.$content.append(loadingContent).addClass('meta-lightbox-loading');\n\n // Image\n if (href.match(/\\.(jpeg|jpg|gif|png|svg)$/i)) {\n $.ajax({\n url: href,\n success: () => {\n const img = $('<img>', { src: href });\n const wrap = $('<div class=\"meta-lightbox-image\"></div>');\n const imgwrapper = $(\n '<span class=\"meta-lightbox-zoom-wrapper\"></span>',\n );\n\n imgwrapper.append(img);\n wrap.append(imgwrapper);\n\n // Vertically center images\n wrap.css({\n 'line-height': `${$content.height()}px`,\n height: `${$content.height()}px`, // For Firefox\n });\n\n $W.resize(() => {\n wrap.css({\n 'line-height': `${$content.height()}px`,\n height: `${$content.height()}px`, // For Firefox\n });\n });\n\n if (typeof imgwrapper['zoom'] !== 'undefined') {\n imgwrapper.zoom();\n } else {\n imgwrapper.addClass('no-zoom');\n }\n\n ui.$content.html(wrap);\n ui.contentLoaded();\n },\n error: (jqXHR, status) => {\n const wrap = $(NETWORK_ERROR);\n\n ui.$content.html(wrap);\n ui.contentLoaded();\n },\n });\n\n // Set the title\n const title = $link.data('title')\n ? $link.data('title')\n : $link.attr('title');\n ui.setTitle(title);\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'meta', 'Image Click', href);\n }\n }\n // Video (Youtube/Vimeo)\n else if (\n href.match(\n /(youtube|youtube-nocookie|youtu|vimeo)\\.(com|be)\\/(watch\\?v=([\\w-]+)|([\\w-]+))/,\n )\n ) {\n const video = href.match(\n /(youtube|youtube-nocookie|youtu|vimeo)\\.(com|be)\\/(watch\\?v=([\\w-]+)|([\\w-]+))/,\n );\n let classTerm = 'meta-lightbox-video';\n let src;\n\n if (video[1] == 'youtube') {\n src = `https://www.youtube.com/embed/${video[4]}`;\n classTerm = `${classTerm} meta-lightbox-youtube`;\n }\n if (video[1] == 'youtu') {\n src = `https://www.youtube.com/embed/${video[3]}`;\n classTerm = `${classTerm} meta-lightbox-youtube`;\n }\n if (video[1] == 'youtube-nocookie') {\n src = `https://www.youtube-nocookie.com/embed/${video[4]}`;\n classTerm = `${classTerm} meta-lightbox-youtube`;\n }\n if (video[1] == 'vimeo') {\n src = `https://player.vimeo.com/video/${video[3]}`;\n classTerm = `${classTerm} meta-lightbox-vimeo`;\n }\n\n if (src) {\n ui.loadIframe(src, classTerm);\n }\n\n // Set the title\n const title = $link.data('title')\n ? $link.data('title')\n : $link.attr('title');\n ui.setTitle(title);\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'meta', 'Video Click', video);\n }\n }\n // Inline HTML\n else if (href.substring(0, 1) == '#') {\n if ($(href).length) {\n wrap = $('<div class=\"meta-lightbox-inline\" />');\n wrap.append($(href).clone().show());\n\n // Vertically center html\n if (wrap.outerHeight() < ui.$content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n $W.resize(() => {\n if (wrap.outerHeight() < ui.$content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n });\n\n ui.$content.html(wrap);\n ui.contentLoaded();\n } else {\n wrap = $(NETWORK_ERROR);\n ui.$content.html(wrap);\n ui.contentLoaded();\n }\n\n $('.meta-lightbox-title-wrap').html('');\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'meta', 'inline HTML click', href);\n }\n }\n // AJAX/iFrame (default)\n else {\n if ($link.data('force-iframe')) {\n console.log(`${NAME}: IFrame forced`);\n\n return ui.loadIframe(href, 'meta-lightbox-iframe-content');\n }\n\n console.log(`${NAME}: loading AJAX`);\n $.ajax({\n sync: false,\n async: true,\n url: href,\n dataType: 'html',\n method: 'GET',\n cache: false,\n statusCode: {\n 404: function () {\n console.log(`${NAME}: page not found`);\n W.location.href = url;\n },\n 302: function () {\n console.log(`${NAME}: redirect 302`);\n W.location.href = url;\n },\n },\n error: function (jqXHR, status) {\n console.log(`${NAME}: AJAX request failure.${jqXHR.statusText}`);\n\n var wrap = $(NETWORK_ERROR);\n ui.$content.html(wrap);\n ui.contentLoaded();\n\n // google analytics\n if (typeof ga === 'function') {\n ga('send', 'event', 'error', 'AJAX ERROR', jqXHR.statusText);\n }\n },\n success: function (data, status, jqXHR) {\n try {\n const dataJson = $.parseJSON(data);\n if (typeof dataJson === 'object') {\n // Replace regions\n if (\n typeof dataJson['regions'] === 'object' &&\n typeof dataJson['regions']['LayoutAjax'] !== 'undefinded'\n ) {\n var wrap = $('<div class=\"meta-lightbox-ajax\" />');\n wrap.html(dataJson['regions']['LayoutAjax']);\n ui.$content.html(wrap);\n ui.contentLoaded();\n }\n\n // trigger events\n /*if (typeof (data['events']) === 'object') {\n for (var eventName in data.events) {\n $(D).trigger(eventName, [data['events'][eventName]]);\n }\n }*/\n\n var title = jqXHR.getResponseHeader('X-Title'),\n link = jqXHR.getResponseHeader('X-Link');\n\n if (\n title &&\n title.length &&\n link &&\n link.length &&\n link !== W.location.href &&\n link.substring(0, link.indexOf('#')) !==\n W.location.href.replace($('base').attr('href'), '/')\n ) {\n $('.meta-lightbox-ajax').data('curr-title', D.title);\n $('.meta-lightbox-ajax').data('curr-link', W.location.href);\n\n if (typeof W.localStorage !== 'undefined' && link !== '/') {\n W.localStorage.setItem('current-page', link);\n }\n\n if (\n D.URL !== link &&\n D.URL !== $('base').attr('href') + link &&\n D.URL !== `${$('base').attr('href')}/${link}`\n ) {\n W.history.pushState(\n {\n title,\n page: link,\n ajax: 'true',\n },\n title,\n link,\n );\n }\n\n $('.meta-lightbox-title-wrap').html('');\n\n // google analytics\n if (typeof ga === 'function') {\n ga('set', {\n page: link.replace($('base').attr('href'), ''),\n title,\n });\n ga('send', 'pageview');\n }\n }\n }\n } catch (e) {\n const $wrap = $('<div class=\"meta-lightbox-ajax\" />');\n $wrap.append(data);\n ui.$content.html($wrap);\n ui.contentLoaded();\n }\n\n // Vertically center html\n /*if (wrap.outerHeight() < ui.$content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n $W.resize(() => {\n if (wrap.outerHeight() < ui.$content.height()) {\n wrap.css({\n position: 'relative',\n top: '50%',\n 'margin-top': `${-(wrap.outerHeight() / 2)}px`,\n });\n }\n });*/\n\n /*setTimeout(() => {\n $W.resize();\n\n if (typeof W.imagesLoaded === 'function') {\n W.imagesLoaded().then(() => {\n $W.resize();\n });\n }\n }, 500);*/\n\n ui.contentLoaded();\n },\n });\n }\n }\n\n static loadIframe(href, classTerm) {\n const ui = this;\n\n const $iframe = $('<iframe>', {\n src: href,\n class: classTerm,\n frameborder: 0,\n vspace: 0,\n hspace: 0,\n scrolling: 'auto',\n allowtransparency: 'true',\n });\n\n console.log(`${NAME}: loading iframe`);\n\n $Body.append(\n '<div id=\"IFramePreload\" class=\"hidden d-none iframe-preload\" style=\"display:none\"></div>',\n );\n const $preload = $('#IFramePreload');\n $preload.html($iframe);\n\n $iframe.on('load', () => {\n console.log(`${NAME}: the iframe was loaded`);\n $preload.html('');\n $preload.remove();\n\n ui.$content.addClass('iframe-delay');\n\n ui.$content.html($iframe);\n ui.contentLoaded();\n\n setTimeout(() => {\n ui.$content.removeClass('iframe-delay');\n }, 1000);\n });\n\n $Body.on(`${Events.BACKONLINE}`, () => {\n console.log(`${NAME}: reloading iframe`);\n $iframe.attr('src', $iframe.attr('src'));\n });\n\n return $iframe;\n }\n\n static contentLoaded() {\n const ui = this;\n\n ui.$content.removeClass('meta-lightbox-loading');\n setTimeout(() => {\n $W.trigger('meta-lightbox-loaded');\n }, 1); // For CSS transitions\n\n setTimeout(() => {\n $Body.addClass('meta-lightbox-body-effect-fade');\n }, 600);\n }\n\n static hide(callback) {\n const ui = this;\n\n const $overlay = ui.$overlay;\n\n var title = $('.meta-lightbox-ajax').data('curr-title'),\n link = $('.meta-lightbox-ajax').data('curr-link');\n if (title && link) {\n if (typeof W.localStorage !== 'undefined' && link !== '/') {\n W.localStorage.setItem('current-page', link);\n }\n\n if (\n D.URL !== link &&\n D.URL !== $('base').attr('href') + link &&\n D.URL !== `${$('base').attr('href')}/${link}`\n ) {\n W.history.replaceState(\n {\n title,\n page: link,\n ajax: 'true',\n },\n title,\n link,\n );\n }\n }\n\n $overlay.removeClass('meta-lightbox-open');\n $Body.removeClass('meta-lightbox-body-effect-fade');\n $('.meta-lightbox-content .meta-lightbox-zoom-wrapper').trigger(\n 'zoom.destroy',\n );\n\n // For IE\n if (ui.isMSIE) {\n $overlay.find('iframe').attr('src', ' ');\n $overlay.find('iframe').remove();\n }\n $('.meta-lightbox-prev').off('click');\n\n // Remove click handlers\n $('.meta-lightbox-next').off('click');\n\n // Empty content (for videos)\n $('.meta-lightbox-content').empty();\n\n $Body.removeClass('meta-lightbox-body-effect-fade');\n }\n }\n\n $W.on(`MetaLightboxUI.init ${Events.AJAX} ${Events.LOADED}`, () => {\n MetaLightboxUI.init();\n });\n\n W.MetaLightboxUI = MetaLightboxUI;\n\n return MetaLightboxUI;\n})($);\n\nexport default MetaLightboxUI;\n","module.exports = jQuery;"],"sourceRoot":""}
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@a2nt/meta-lightbox",
|
"name": "@a2nt/meta-lightbox",
|
||||||
"version": "2.3.1",
|
"version": "2.3.2",
|
||||||
"description": "Universal Lightbox window",
|
"description": "Universal Lightbox window",
|
||||||
"main": "meta-lightbox.js",
|
"main": "meta-lightbox.js",
|
||||||
"author": "Tony Air <tony@twma.pro>",
|
"author": "Tony Air <tony@twma.pro>",
|
||||||
|
@ -525,7 +525,7 @@ const MetaLightboxUI = (($) => {
|
|||||||
|
|
||||||
$Body.on(`${Events.BACKONLINE}`, () => {
|
$Body.on(`${Events.BACKONLINE}`, () => {
|
||||||
console.log(`${NAME}: reloading iframe`);
|
console.log(`${NAME}: reloading iframe`);
|
||||||
$iframe[0].contentDocument.location.reload(true);
|
$iframe.attr('src', $iframe.attr('src'));
|
||||||
});
|
});
|
||||||
|
|
||||||
return $iframe;
|
return $iframe;
|
||||||
|
Loading…
Reference in New Issue
Block a user