# HG changeset patch # User Thierry Florac # Date 1542637007 -3600 # Node ID d462a5ced83e6cbba8da8c3fcec77966ab05a3ef # Parent 951d11442e0b5a24cd1997c80403dbc1948b32a5 Updated resources diff -r 951d11442e0b -r d462a5ced83e src/pyams_default_theme/__init__.py --- a/src/pyams_default_theme/__init__.py Mon Nov 19 15:16:16 2018 +0100 +++ b/src/pyams_default_theme/__init__.py Mon Nov 19 15:16:47 2018 +0100 @@ -12,12 +12,12 @@ __docformat__ = 'restructuredtext' +from fanstatic import Resource, Library +from pyramid.i18n import TranslationStringFactory -from fanstatic import Resource, Library -from pyams_skin import myams_js, bootstrap_css, bootstrap +from pyams_skin import bootstrap_css, bootstrap, bootstrap_modal_css, myams_js from pyams_utils.fanstatic import ExternalResource -from pyramid.i18n import TranslationStringFactory _ = TranslationStringFactory('pyams_default_theme') @@ -28,13 +28,26 @@ pyams_default_theme_css = Resource(library, 'css/pyams-default.css', minified='css/pyams-default.min.css', - depends=[bootstrap_css, pyams_default_theme_fonts]) + depends=(bootstrap_css, pyams_default_theme_fonts)) pyams_default_theme = Resource(library, 'js/pyams-default.js', minified='js/pyams-default.min.js', - depends=[bootstrap, myams_js, pyams_default_theme_css], + depends=(bootstrap, myams_js, pyams_default_theme_css), bottom=True) +# +# External extensions +# + +lightbox_css = Resource(library, 'css/ext/ekko-lightbox.css', + minified='css/ext/ekko-lightbox.min.css', + depends=(bootstrap_modal_css,)) + +lightbox = Resource(library, 'js/ext/ekko-lightbox.js', + minified='js/ext/ekko-lightbox.min.js', + depends=(bootstrap, lightbox_css), + bottom=True) + def includeme(config): """Pyramid include""" diff -r 951d11442e0b -r d462a5ced83e src/pyams_default_theme/resources/css/ext/ekko-lightbox.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_default_theme/resources/css/ext/ekko-lightbox.css Mon Nov 19 15:16:47 2018 +0100 @@ -0,0 +1,2 @@ +.ekko-lightbox{display:-ms-flexbox!important;display:flex!important;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding-right:0!important}.ekko-lightbox-container{position:relative}.ekko-lightbox-container>div.ekko-lightbox-item{position:absolute;top:0;left:0;bottom:0;right:0;width:100%}.ekko-lightbox iframe{width:100%;height:100%}.ekko-lightbox-nav-overlay{z-index:1;position:absolute;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex}.ekko-lightbox-nav-overlay a{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0;transition:opacity .5s;color:#fff;font-size:30px;z-index:1}.ekko-lightbox-nav-overlay a>*{-ms-flex-positive:1;flex-grow:1}.ekko-lightbox-nav-overlay a>:focus{outline:none}.ekko-lightbox-nav-overlay a span{padding:0 30px}.ekko-lightbox-nav-overlay a:last-child span{text-align:right}.ekko-lightbox-nav-overlay a:hover{text-decoration:none}.ekko-lightbox-nav-overlay a:focus{outline:none}.ekko-lightbox-nav-overlay a.disabled{cursor:default;visibility:hidden}.ekko-lightbox a:hover{opacity:1;text-decoration:none}.ekko-lightbox .modal-dialog{display:none}.ekko-lightbox .modal-footer{text-align:left}.ekko-lightbox-loader{position:absolute;top:0;left:0;bottom:0;right:0;width:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.ekko-lightbox-loader>div{width:40px;height:40px;position:relative;text-align:center}.ekko-lightbox-loader>div>div{width:100%;height:100%;border-radius:50%;background-color:#fff;opacity:.6;position:absolute;top:0;left:0;animation:a 2s infinite ease-in-out}.ekko-lightbox-loader>div>div:last-child{animation-delay:-1s}.modal-dialog .ekko-lightbox-loader>div>div{background-color:#333}@keyframes a{0%,to{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}} +/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImVra28tbGlnaHRib3guY3NzIl0sIm5hbWVzIjpbXSwibWFwcGlu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2x1dGU7XG4gIHRvcDogMDtcbiAgbGVmdDogMDtcbiAgYW5pbWF0aW9uOiBzay1ib3VuY2UgMnMgaW5maW5pdGUgZWFzZS1pbi1vdXQ7XG59XG4uZWtrby1saWdodGJveC1sb2FkZXIgPiBkaXYgPiBkaXY6bGFzdC1jaGlsZCB7XG4gIGFuaW1hdGlvbi1kZWxheTogLTFzO1xufVxuLm1vZGFsLWRpYWxvZyAuZWtrby1saWdodGJveC1sb2FkZXIgPiBkaXYgPiBkaXYge1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjMzMzO1xufVxuQC13ZWJraXQta2V5ZnJhbWVzIHNrLWJvdW5jZSB7XG4gIDAlLFxuICAxMDAlIHtcbiAgICAtd2Via2l0LXRyYW5zZm9ybTogc2NhbGUoMCk7XG4gIH1cbiAgNTAlIHtcbiAgICAtd2Via2l0LXRyYW5zZm9ybTogc2NhbGUoMSk7XG4gIH1cbn1cbkBrZXlmcmFtZXMgc2stYm91bmNlIHtcbiAgMCUsXG4gIDEwMCUge1xuICAgIHRyYW5zZm9ybTogc2NhbGUoMCk7XG4gICAgLXdlYmtpdC10cmFuc2Zvcm06IHNjYWxlKDApO1xuICB9XG4gIDUwJSB7XG4gICAgdHJhbnNmb3JtOiBzY2FsZSgxKTtcbiAgICAtd2Via2l0LXRyYW5zZm9ybTogc2NhbGUoMSk7XG4gIH1cbn1cbiJdfQ== */ \ No newline at end of file diff -r 951d11442e0b -r d462a5ced83e src/pyams_default_theme/resources/css/ext/ekko-lightbox.min.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_default_theme/resources/css/ext/ekko-lightbox.min.css Mon Nov 19 15:16:47 2018 +0100 @@ -0,0 +1,1 @@ +.ekko-lightbox{display:-ms-flexbox!important;display:flex!important;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding-right:0!important}.ekko-lightbox-container{position:relative}.ekko-lightbox-container>div.ekko-lightbox-item{position:absolute;top:0;left:0;bottom:0;right:0;width:100%}.ekko-lightbox iframe{width:100%;height:100%}.ekko-lightbox-nav-overlay{z-index:1;position:absolute;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex}.ekko-lightbox-nav-overlay a{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0;transition:opacity .5s;color:#fff;font-size:30px;z-index:1}.ekko-lightbox-nav-overlay a>*{-ms-flex-positive:1;flex-grow:1}.ekko-lightbox-nav-overlay a>:focus{outline:0}.ekko-lightbox-nav-overlay a span{padding:0 30px}.ekko-lightbox-nav-overlay a:last-child span{text-align:right}.ekko-lightbox-nav-overlay a:hover{text-decoration:none}.ekko-lightbox-nav-overlay a:focus{outline:0}.ekko-lightbox-nav-overlay a.disabled{cursor:default;visibility:hidden}.ekko-lightbox a:hover{opacity:1;text-decoration:none}.ekko-lightbox .modal-dialog{display:none}.ekko-lightbox .modal-footer{text-align:left}.ekko-lightbox-loader{position:absolute;top:0;left:0;bottom:0;right:0;width:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.ekko-lightbox-loader>div{width:40px;height:40px;position:relative;text-align:center}.ekko-lightbox-loader>div>div{width:100%;height:100%;border-radius:50%;background-color:#fff;opacity:.6;position:absolute;top:0;left:0;animation:a 2s infinite ease-in-out}.ekko-lightbox-loader>div>div:last-child{animation-delay:-1s}.modal-dialog .ekko-lightbox-loader>div>div{background-color:#333}@keyframes a{0%,to{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}} diff -r 951d11442e0b -r d462a5ced83e src/pyams_default_theme/resources/css/pyams-default.css --- a/src/pyams_default_theme/resources/css/pyams-default.css Mon Nov 19 15:16:16 2018 +0100 +++ b/src/pyams_default_theme/resources/css/pyams-default.css Mon Nov 19 15:16:47 2018 +0100 @@ -1,3 +1,15 @@ +/** + * Generic styles + */ +.margin-bottom-10 { + margin-bottom: 10px; +} +.margin-bottom-20 { + margin-bottom: 20px; +} +/** + * Main classes + */ body { font-family: Lato, Helvetica, Arial, sans-serif; margin: 0 auto; @@ -83,15 +95,34 @@ display: none; } } -.margin-bottom-10 { - margin-bottom: 10px; +/** + * Summary styles + */ +.summary .thumbnail.pull-left { + margin-right: 15px; } -.margin-bottom-20 { - margin-bottom: 20px; +blockquote { + margin-top: 2rem; + border: 1px solid #ddd; + border-left: 5px solid #ddd; +} +blockquote.pull-right { + padding: 0 15px; + text-align: left; + border: 1px solid #ddd; + border-left: 5px solid #ddd; } /** * Images gallery */ +.illustration { + margin-bottom: 1rem; +} +.illustration .author { + padding-top: 0.2em; + font-size: 0.9em; + font-style: italic; +} .gallery { display: flex; flex-wrap: wrap; @@ -114,4 +145,45 @@ font-style: italic; font-size: 0.8em; } +.ekko-lightbox { + position: fixed; + top: 0!important; + height: 100vh; +} +.ekko-lightbox .modal-footer { + padding-top: 0; + text-align: right!important; + font-style: italic; + font-size: 0.8em; +} +/** + * Videos + */ +.video-wrapper iframe { + width: 100%; +} +/** + * Milestones + */ +.milestones { + display: flex; + justify-content: space-around; +} +.milestones .arrow { + font-weight: bold; + font-size: 1.5em; +} +/** + * Contact card + */ +.contact-card .photo.pull-left { + margin-right: 1em; +} +.contact-card .photo.pull-right { + margin-left: 1em; +} +.contact-card .address { + margin-top: 0.5em; + margin-bottom: 0.5em; +} /*# sourceMappingURL=pyams-default.css.map */ \ No newline at end of file diff -r 951d11442e0b -r d462a5ced83e src/pyams_default_theme/resources/css/pyams-default.css.map --- a/src/pyams_default_theme/resources/css/pyams-default.css.map Mon Nov 19 15:16:16 2018 +0100 +++ b/src/pyams_default_theme/resources/css/pyams-default.css.map Mon Nov 19 15:16:47 2018 +0100 @@ -1,1 +1,1 @@ -{"version":3,"sources":["../../../../../../../../../home/tflorac/Dropbox/src/PyAMS/pyams_default_theme/src/pyams_default_theme/resources/less/pyams-default.less"],"names":[],"mappings":"AACA;EACC,+CAAA;EACA,cAAA;;AAFD,IAIC,eACC;EACC,kBAAA;;AAIC,IANH,eACC,eAGC,QAEE;AAAD,IANH,eACC,eAIC,IACE;EACA,WAAA;;AAED,IATH,eACC,eAGC,QAKE;AAAD,IATH,eACC,eAIC,IAIE;EACA,kBAAA;EACA,SAAA;EACA,UAAA;EACA,YAAY,SAAZ;;AAjBL,IAsBC;EACC,MAAA;EACA,WAAA;EACA,wBAAA;EACA,aAAA;EACA,gCAAA;;AA3BF,IA6BC,OAAO;EACN,kBAAA;EACA,SAAA;;AA/BF,IAiCC;EACC,mBAAA;EACA,uBAAA;EACA,yBAAA;EACA,iDAAA;EACA,gCAAA;;AAtCF,IAiCC,QAOC;AAxCF,IAiCC,QAQC,EAAC;AAzCH,IAiCC,QASC,EAAC;EACA,cAAA;;AA3CH,IAiCC,QAYC,GAAE;AA7CJ,IAiCC,QAaC;EACC,yBAAA;;AAED,IAhBD,QAgBE;EACA,yBAAA;;AADD,IAhBD,QAgBE,MAGA;EACC,YAAA;;AAED,IAtBF,QAgBE,MAMC,MACA,EAAC;EACA,cAAA;;AARH,IAhBD,QAgBE,MAWA;EACC,uBAAA;;AAMJ;AACA;AACA;AACA;AACA;AACA;EACC,iDAAA;;AAKC,wBAA2C;EAC1C,YAFF,MAEG;IACA,aAAA;;;AAGF,wBAA0C,uBAAwB;EACjE,YAPF,MAOG;IACA,aAAA;;;AAGF,wBAA0C,uBAAuB;EAChE,YAZF,MAYG;IACA,aAAA;;;AAGF,wBAA0C;EACzC,YAjBF,MAiBG;IACA,aAAA;;;AAQH,cAAC;EACA,mBAAA;;AAED,cAAC;EACA,mBAAA;;;;;AASF;EACC,aAAA;EACA,eAAA;;AAFD,QAIC;EACC,oBAAA;;AALF,QAOC;EACC,6CAAA;EACG,kBAAA;EACH,QAAQ,WAAR;EACA,gCAAA;;AAEA,QAND,IAME;EACA,YAAA;;AAdH,QAiBC;EACC,mBAAA;EACA,iBAAA;EACA,kBAAA;EACA,gBAAA","file":"pyams-default.css"} \ No newline at end of file +{"version":3,"sources":["../../../../../../../../../home/tflorac/Dropbox/src/PyAMS/pyams_default_theme/src/pyams_default_theme/resources/less/pyams-default.less"],"names":[],"mappings":";;;AAIC,cAAC;EACA,mBAAA;;AAED,cAAC;EACA,mBAAA;;;;;AASF;EACC,+CAAA;EACA,cAAA;;AAFD,IAIC,eACC;EACC,kBAAA;;AAIC,IANH,eACC,eAGC,QAEE;AAAD,IANH,eACC,eAIC,IACE;EACA,WAAA;;AAED,IATH,eACC,eAGC,QAKE;AAAD,IATH,eACC,eAIC,IAIE;EACA,kBAAA;EACA,SAAA;EACA,UAAA;EACA,YAAY,SAAZ;;AAjBL,IAsBC;EACC,MAAA;EACA,WAAA;EACA,wBAAA;EACA,aAAA;EACA,gCAAA;;AA3BF,IA6BC,OAAO;EACN,kBAAA;EACA,SAAA;;AA/BF,IAiCC;EACC,mBAAA;EACA,uBAAA;EACA,yBAAA;EACA,iDAAA;EACA,gCAAA;;AAtCF,IAiCC,QAOC;AAxCF,IAiCC,QAQC,EAAC;AAzCH,IAiCC,QASC,EAAC;EACA,cAAA;;AA3CH,IAiCC,QAYC,GAAE;AA7CJ,IAiCC,QAaC;EACC,yBAAA;;AAED,IAhBD,QAgBE;EACA,yBAAA;;AADD,IAhBD,QAgBE,MAGA;EACC,YAAA;;AAED,IAtBF,QAgBE,MAMC,MACA,EAAC;EACA,cAAA;;AARH,IAhBD,QAgBE,MAWA;EACC,uBAAA;;AAMJ;AACA;AACA;AACA;AACA;AACA;EACC,iDAAA;;AAKC,wBAA2C;EAC1C,YAFF,MAEG;IACA,aAAA;;;AAGF,wBAA0C,uBAAwB;EACjE,YAPF,MAOG;IACA,aAAA;;;AAGF,wBAA0C,uBAAuB;EAChE,YAZF,MAYG;IACA,aAAA;;;AAGF,wBAA0C;EACzC,YAjBF,MAiBG;IACA,aAAA;;;;;;AAaF,QADD,WACE;EACA,kBAAA;;AAKH;EACC,gBAAA;EACA,sBAAA;EACA,2BAAA;;AAEA,UAAC;EACA,eAAA;EACA,gBAAA;EACA,sBAAA;EACA,2BAAA;;;;;AAQF;EACC,mBAAA;;AADD,aAGC;EACC,kBAAA;EACA,gBAAA;EACA,kBAAA;;AAGF;EACC,aAAA;EACA,eAAA;;AAFD,QAIC;EACC,oBAAA;;AALF,QAOC;EACC,6CAAA;EACG,kBAAA;EACH,QAAQ,WAAR;EACA,gCAAA;;AAEA,QAND,IAME;EACA,YAAA;;AAdH,QAiBC;EACC,mBAAA;EACA,iBAAA;EACA,kBAAA;EACA,gBAAA;;AAIF;EACC,eAAA;EACA,gBAAA;EACA,aAAA;;AAHD,cAKC;EACC,cAAA;EACA,2BAAA;EACA,kBAAA;EACA,gBAAA;;;;;AASF,cACC;EACC,WAAA;;;;;AAQF;EACC,aAAA;EACA,6BAAA;;AAFD,WAIC;EACC,iBAAA;EACA,gBAAA;;;;;AAWA,aADD,OACE;EACA,iBAAA;;AAED,aAJD,OAIE;EACA,gBAAA;;AANH,aASC;EACC,iBAAA;EACA,oBAAA","file":"pyams-default.css"} \ No newline at end of file diff -r 951d11442e0b -r d462a5ced83e src/pyams_default_theme/resources/css/pyams-default.min.css --- a/src/pyams_default_theme/resources/css/pyams-default.min.css Mon Nov 19 15:16:16 2018 +0100 +++ b/src/pyams_default_theme/resources/css/pyams-default.min.css Mon Nov 19 15:16:47 2018 +0100 @@ -1,1 +1,1 @@ -body{font-family:Lato,Helvetica,Arial,sans-serif;margin:0 auto}body .header-simple .regularbanner{position:relative}body .header-simple .regularbanner img.regularbanner__media,body .header-simple .regularbanner picture.regularbanner__media{width:100%}body .header-simple .regularbanner img.logo,body .header-simple .regularbanner picture.logo{position:absolute;top:10px;left:10px;max-height:calc(80%)}body .affix{top:0;width:100%;z-index:9999!important;opacity:.95;transition:all .5s ease-in-out}body .affix~.container-fluid{position:relative;top:50px}body .navbar{margin-bottom:20px;background-color:#fff;border:1px solid #39413b;font-family:Oswald,Helvetica,Arial,Sans-Serif;transition:all .5s ease-in-out}body .navbar a,body .navbar a:active,body .navbar a:visited{color:#39413b}body .navbar .icon-bar,body .navbar li.active{background-color:#a5bcaa}body .navbar.affix{background-color:#39413b}body .navbar.affix a{color:#fff}body .navbar.affix:hover a:hover{color:#39413b}body .navbar.affix .icon-bar{background-color:#fff}h1,h2,h3,h4,h5,h6{font-family:Oswald,Helvetica,Arial,Sans-Serif}@media only screen and (min-width:1200px){.portal-page .slot.col-lg-0{display:none}}@media only screen and (min-width:992px) and (max-width:1199px){.portal-page .slot.col-md-0{display:none}}@media only screen and (min-width:768px) and (max-width:991px){.portal-page .slot.col-sm-0{display:none}}@media only screen and (max-width:767px){.portal-page .slot.col-xs-0{display:none}}.margin-bottom-10{margin-bottom:10px}.margin-bottom-20{margin-bottom:20px}.gallery{display:flex;flex-wrap:wrap}.gallery .legend{margin-bottom:.2em}.gallery img{box-shadow:0 2px 6px 2px rgba(0,0,0,.75);margin-bottom:5px;filter:grayscale();transition:all ease-in-out .5s}.gallery img:hover{filter:none}.gallery .author{margin-bottom:15px;text-align:right;font-style:italic;font-size:.8em} +.margin-bottom-10{margin-bottom:10px}.margin-bottom-20{margin-bottom:20px}body{font-family:Lato,Helvetica,Arial,sans-serif;margin:0 auto}body .header-simple .regularbanner{position:relative}body .header-simple .regularbanner img.regularbanner__media,body .header-simple .regularbanner picture.regularbanner__media{width:100%}body .header-simple .regularbanner img.logo,body .header-simple .regularbanner picture.logo{position:absolute;top:10px;left:10px;max-height:calc(80%)}body .affix{top:0;width:100%;z-index:9999!important;opacity:.95;transition:all .5s ease-in-out}body .affix~.container-fluid{position:relative;top:50px}body .navbar{margin-bottom:20px;background-color:#fff;border:1px solid #39413b;font-family:Oswald,Helvetica,Arial,Sans-Serif;transition:all .5s ease-in-out}body .navbar a,body .navbar a:active,body .navbar a:visited{color:#39413b}body .navbar .icon-bar,body .navbar li.active{background-color:#a5bcaa}body .navbar.affix{background-color:#39413b}body .navbar.affix a{color:#fff}body .navbar.affix:hover a:hover{color:#39413b}body .navbar.affix .icon-bar{background-color:#fff}h1,h2,h3,h4,h5,h6{font-family:Oswald,Helvetica,Arial,Sans-Serif}@media only screen and (min-width:1200px){.portal-page .slot.col-lg-0{display:none}}@media only screen and (min-width:992px) and (max-width:1199px){.portal-page .slot.col-md-0{display:none}}@media only screen and (min-width:768px) and (max-width:991px){.portal-page .slot.col-sm-0{display:none}}@media only screen and (max-width:767px){.portal-page .slot.col-xs-0{display:none}}.summary .thumbnail.pull-left{margin-right:15px}blockquote{margin-top:2rem;border:1px solid #ddd;border-left:5px solid #ddd}blockquote.pull-right{padding:0 15px;text-align:left;border:1px solid #ddd;border-left:5px solid #ddd}.illustration{margin-bottom:1rem}.illustration .author{padding-top:.2em;font-size:.9em;font-style:italic}.gallery{display:flex;flex-wrap:wrap}.gallery .legend{margin-bottom:.2em}.gallery img{box-shadow:0 2px 6px 2px rgba(0,0,0,.75);margin-bottom:5px;filter:grayscale();transition:all ease-in-out .5s}.gallery img:hover{filter:none}.gallery .author{margin-bottom:15px;text-align:right;font-style:italic;font-size:.8em}.ekko-lightbox{position:fixed;top:0!important;height:100vh}.ekko-lightbox .modal-footer{padding-top:0;text-align:right!important;font-style:italic;font-size:.8em}.video-wrapper iframe{width:100%}.milestones{display:flex;justify-content:space-around}.milestones .arrow{font-weight:700;font-size:1.5em}.contact-card .photo.pull-left{margin-right:1em}.contact-card .photo.pull-right{margin-left:1em}.contact-card .address{margin-top:.5em;margin-bottom:.5em} diff -r 951d11442e0b -r d462a5ced83e src/pyams_default_theme/resources/js/ext/ekko-lightbox.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_default_theme/resources/js/ext/ekko-lightbox.js Mon Nov 19 15:16:47 2018 +0100 @@ -0,0 +1,694 @@ +/*! + * Lightbox for Bootstrap by @ashleydw + * https://github.com/ashleydw/lightbox + * + * License: https://github.com/ashleydw/lightbox/blob/master/LICENSE + */ ++function ($) { + +'use strict'; + +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +var Lightbox = (function ($) { + + var NAME = 'ekkoLightbox'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + + var Default = { + title: '', + footer: '', + maxWidth: 9999, + maxHeight: 9999, + showArrows: true, //display the left / right arrows or not + wrapping: true, //if true, gallery loops infinitely + type: null, //force the lightbox into image / youtube mode. if null, or not image|youtube|vimeo; detect it + alwaysShowClose: false, //always show the close button, even if there is no title + loadingMessage: '
', // http://tobiasahlin.com/spinkit/ + leftArrow: '', + rightArrow: '', + strings: { + close: 'Close', + fail: 'Failed to load image:', + type: 'Could not detect remote target type. Force the type using data-type' + }, + doc: document, // if in an iframe can specify top.document + onShow: function onShow() {}, + onShown: function onShown() {}, + onHide: function onHide() {}, + onHidden: function onHidden() {}, + onNavigate: function onNavigate() {}, + onContentLoaded: function onContentLoaded() {} + }; + + var Lightbox = (function () { + _createClass(Lightbox, null, [{ + key: 'Default', + + /** + Class properties: + _$element: null -> the element currently being displayed + _$modal: The bootstrap modal generated + _$modalDialog: The .modal-dialog + _$modalContent: The .modal-content + _$modalBody: The .modal-body + _$modalHeader: The .modal-header + _$modalFooter: The .modal-footer + _$lightboxContainerOne: Container of the first lightbox element + _$lightboxContainerTwo: Container of the second lightbox element + _$lightboxBody: First element in the container + _$modalArrows: The overlayed arrows container + _$galleryItems: Other 's available for this gallery + _galleryName: Name of the current data('gallery') showing + _galleryIndex: The current index of the _$galleryItems being shown + _config: {} the options for the modal + _modalId: unique id for the current lightbox + _padding / _border: CSS properties for the modal container; these are used to calculate the available space for the content + */ + + get: function get() { + return Default; + } + }]); + + function Lightbox($element, config) { + var _this = this; + + _classCallCheck(this, Lightbox); + + this._config = $.extend({}, Default, config); + this._$modalArrows = null; + this._galleryIndex = 0; + this._galleryName = null; + this._padding = null; + this._border = null; + this._titleIsShown = false; + this._footerIsShown = false; + this._wantedWidth = 0; + this._wantedHeight = 0; + this._touchstartX = 0; + this._touchendX = 0; + + this._modalId = 'ekkoLightbox-' + Math.floor(Math.random() * 1000 + 1); + this._$element = $element instanceof jQuery ? $element : $($element); + + this._isBootstrap3 = $.fn.modal.Constructor.VERSION[0] == 3; + + var h4 = ''; + var btn = ''; + + var header = ''; + var footer = ''; + var body = ''; + var dialog = ''; + $(this._config.doc.body).append(''); + + this._$modal = $('#' + this._modalId, this._config.doc); + this._$modalDialog = this._$modal.find('.modal-dialog').first(); + this._$modalContent = this._$modal.find('.modal-content').first(); + this._$modalBody = this._$modal.find('.modal-body').first(); + this._$modalHeader = this._$modal.find('.modal-header').first(); + this._$modalFooter = this._$modal.find('.modal-footer').first(); + + this._$lightboxContainer = this._$modalBody.find('.ekko-lightbox-container').first(); + this._$lightboxBodyOne = this._$lightboxContainer.find('> div:first-child').first(); + this._$lightboxBodyTwo = this._$lightboxContainer.find('> div:last-child').first(); + + this._border = this._calculateBorders(); + this._padding = this._calculatePadding(); + + this._galleryName = this._$element.data('gallery'); + if (this._galleryName) { + this._$galleryItems = $(document.body).find('*[data-gallery="' + this._galleryName + '"]'); + this._galleryIndex = this._$galleryItems.index(this._$element); + $(document).on('keydown.ekkoLightbox', this._navigationalBinder.bind(this)); + + // add the directional arrows to the modal + if (this._config.showArrows && this._$galleryItems.length > 1) { + this._$lightboxContainer.append('
' + this._config.leftArrow + '' + this._config.rightArrow + '
'); + this._$modalArrows = this._$lightboxContainer.find('div.ekko-lightbox-nav-overlay').first(); + this._$lightboxContainer.on('click', 'a:first-child', function (event) { + event.preventDefault(); + return _this.navigateLeft(); + }); + this._$lightboxContainer.on('click', 'a:last-child', function (event) { + event.preventDefault(); + return _this.navigateRight(); + }); + this.updateNavigation(); + } + } + + this._$modal.on('show.bs.modal', this._config.onShow.bind(this)).on('shown.bs.modal', function () { + _this._toggleLoading(true); + _this._handle(); + return _this._config.onShown.call(_this); + }).on('hide.bs.modal', this._config.onHide.bind(this)).on('hidden.bs.modal', function () { + if (_this._galleryName) { + $(document).off('keydown.ekkoLightbox'); + $(window).off('resize.ekkoLightbox'); + } + _this._$modal.remove(); + return _this._config.onHidden.call(_this); + }).modal(this._config); + + $(window).on('resize.ekkoLightbox', function () { + _this._resize(_this._wantedWidth, _this._wantedHeight); + }); + this._$lightboxContainer.on('touchstart', function () { + _this._touchstartX = event.changedTouches[0].screenX; + }).on('touchend', function () { + _this._touchendX = event.changedTouches[0].screenX; + _this._swipeGesure(); + }); + } + + _createClass(Lightbox, [{ + key: 'element', + value: function element() { + return this._$element; + } + }, { + key: 'modal', + value: function modal() { + return this._$modal; + } + }, { + key: 'navigateTo', + value: function navigateTo(index) { + + if (index < 0 || index > this._$galleryItems.length - 1) return this; + + this._galleryIndex = index; + + this.updateNavigation(); + + this._$element = $(this._$galleryItems.get(this._galleryIndex)); + this._handle(); + } + }, { + key: 'navigateLeft', + value: function navigateLeft() { + + if (!this._$galleryItems) return; + + if (this._$galleryItems.length === 1) return; + + if (this._galleryIndex === 0) { + if (this._config.wrapping) this._galleryIndex = this._$galleryItems.length - 1;else return; + } else //circular + this._galleryIndex--; + + this._config.onNavigate.call(this, 'left', this._galleryIndex); + return this.navigateTo(this._galleryIndex); + } + }, { + key: 'navigateRight', + value: function navigateRight() { + + if (!this._$galleryItems) return; + + if (this._$galleryItems.length === 1) return; + + if (this._galleryIndex === this._$galleryItems.length - 1) { + if (this._config.wrapping) this._galleryIndex = 0;else return; + } else //circular + this._galleryIndex++; + + this._config.onNavigate.call(this, 'right', this._galleryIndex); + return this.navigateTo(this._galleryIndex); + } + }, { + key: 'updateNavigation', + value: function updateNavigation() { + if (!this._config.wrapping) { + var $nav = this._$lightboxContainer.find('div.ekko-lightbox-nav-overlay'); + if (this._galleryIndex === 0) $nav.find('a:first-child').addClass('disabled');else $nav.find('a:first-child').removeClass('disabled'); + + if (this._galleryIndex === this._$galleryItems.length - 1) $nav.find('a:last-child').addClass('disabled');else $nav.find('a:last-child').removeClass('disabled'); + } + } + }, { + key: 'close', + value: function close() { + return this._$modal.modal('hide'); + } + + // helper private methods + }, { + key: '_navigationalBinder', + value: function _navigationalBinder(event) { + event = event || window.event; + if (event.keyCode === 39) return this.navigateRight(); + if (event.keyCode === 37) return this.navigateLeft(); + } + + // type detection private methods + }, { + key: '_detectRemoteType', + value: function _detectRemoteType(src, type) { + + type = type || false; + + if (!type && this._isImage(src)) type = 'image'; + if (!type && this._getYoutubeId(src)) type = 'youtube'; + if (!type && this._getVimeoId(src)) type = 'vimeo'; + if (!type && this._getInstagramId(src)) type = 'instagram'; + if (type == 'audio' || type == 'video' || !type && this._isMedia(src)) type = 'media'; + if (!type || ['image', 'youtube', 'vimeo', 'instagram', 'media', 'url'].indexOf(type) < 0) type = 'url'; + + return type; + } + }, { + key: '_getRemoteContentType', + value: function _getRemoteContentType(src) { + var response = $.ajax({ + type: 'HEAD', + url: src, + async: false + }); + var contentType = response.getResponseHeader('Content-Type'); + return contentType; + } + }, { + key: '_isImage', + value: function _isImage(string) { + return string && string.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i); + } + }, { + key: '_isMedia', + value: function _isMedia(string) { + return string && string.match(/(\.(mp3|mp4|ogg|webm|wav)((\?|#).*)?$)/i); + } + }, { + key: '_containerToUse', + value: function _containerToUse() { + var _this2 = this; + + // if currently showing an image, fade it out and remove + var $toUse = this._$lightboxBodyTwo; + var $current = this._$lightboxBodyOne; + + if (this._$lightboxBodyTwo.hasClass('in')) { + $toUse = this._$lightboxBodyOne; + $current = this._$lightboxBodyTwo; + } + + $current.removeClass('in show'); + setTimeout(function () { + if (!_this2._$lightboxBodyTwo.hasClass('in')) _this2._$lightboxBodyTwo.empty(); + if (!_this2._$lightboxBodyOne.hasClass('in')) _this2._$lightboxBodyOne.empty(); + }, 500); + + $toUse.addClass('in show'); + return $toUse; + } + }, { + key: '_handle', + value: function _handle() { + + var $toUse = this._containerToUse(); + this._updateTitleAndFooter(); + + var currentRemote = this._$element.attr('data-remote') || this._$element.attr('href'); + var currentType = this._detectRemoteType(currentRemote, this._$element.attr('data-type') || false); + + if (['image', 'youtube', 'vimeo', 'instagram', 'media', 'url'].indexOf(currentType) < 0) return this._error(this._config.strings.type); + + switch (currentType) { + case 'image': + this._preloadImage(currentRemote, $toUse); + this._preloadImageByIndex(this._galleryIndex, 3); + break; + case 'youtube': + this._showYoutubeVideo(currentRemote, $toUse); + break; + case 'vimeo': + this._showVimeoVideo(this._getVimeoId(currentRemote), $toUse); + break; + case 'instagram': + this._showInstagramVideo(this._getInstagramId(currentRemote), $toUse); + break; + case 'media': + this._showHtml5Media(currentRemote, $toUse); + break; + default: + // url + this._loadRemoteContent(currentRemote, $toUse); + break; + } + + return this; + } + }, { + key: '_getYoutubeId', + value: function _getYoutubeId(string) { + if (!string) return false; + var matches = string.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/); + return matches && matches[2].length === 11 ? matches[2] : false; + } + }, { + key: '_getVimeoId', + value: function _getVimeoId(string) { + return string && string.indexOf('vimeo') > 0 ? string : false; + } + }, { + key: '_getInstagramId', + value: function _getInstagramId(string) { + return string && string.indexOf('instagram') > 0 ? string : false; + } + + // layout private methods + }, { + key: '_toggleLoading', + value: function _toggleLoading(show) { + show = show || false; + if (show) { + this._$modalDialog.css('display', 'none'); + this._$modal.removeClass('in show'); + $('.modal-backdrop').append(this._config.loadingMessage); + } else { + this._$modalDialog.css('display', 'block'); + this._$modal.addClass('in show'); + $('.modal-backdrop').find('.ekko-lightbox-loader').remove(); + } + return this; + } + }, { + key: '_calculateBorders', + value: function _calculateBorders() { + return { + top: this._totalCssByAttribute('border-top-width'), + right: this._totalCssByAttribute('border-right-width'), + bottom: this._totalCssByAttribute('border-bottom-width'), + left: this._totalCssByAttribute('border-left-width') + }; + } + }, { + key: '_calculatePadding', + value: function _calculatePadding() { + return { + top: this._totalCssByAttribute('padding-top'), + right: this._totalCssByAttribute('padding-right'), + bottom: this._totalCssByAttribute('padding-bottom'), + left: this._totalCssByAttribute('padding-left') + }; + } + }, { + key: '_totalCssByAttribute', + value: function _totalCssByAttribute(attribute) { + return parseInt(this._$modalDialog.css(attribute), 10) + parseInt(this._$modalContent.css(attribute), 10) + parseInt(this._$modalBody.css(attribute), 10); + } + }, { + key: '_updateTitleAndFooter', + value: function _updateTitleAndFooter() { + var title = this._$element.data('title') || ""; + var caption = this._$element.data('footer') || ""; + + this._titleIsShown = false; + if (title || this._config.alwaysShowClose) { + this._titleIsShown = true; + this._$modalHeader.css('display', '').find('.modal-title').html(title || " "); + } else this._$modalHeader.css('display', 'none'); + + this._footerIsShown = false; + if (caption) { + this._footerIsShown = true; + this._$modalFooter.css('display', '').html(caption); + } else this._$modalFooter.css('display', 'none'); + + return this; + } + }, { + key: '_showYoutubeVideo', + value: function _showYoutubeVideo(remote, $containerForElement) { + var id = this._getYoutubeId(remote); + var query = remote.indexOf('&') > 0 ? remote.substr(remote.indexOf('&')) : ''; + var width = this._$element.data('width') || 560; + var height = this._$element.data('height') || width / (560 / 315); + return this._showVideoIframe('//www.youtube.com/embed/' + id + '?badge=0&autoplay=1&html5=1' + query, width, height, $containerForElement); + } + }, { + key: '_showVimeoVideo', + value: function _showVimeoVideo(id, $containerForElement) { + var width = this._$element.data('width') || 500; + var height = this._$element.data('height') || width / (560 / 315); + return this._showVideoIframe(id + '?autoplay=1', width, height, $containerForElement); + } + }, { + key: '_showInstagramVideo', + value: function _showInstagramVideo(id, $containerForElement) { + // instagram load their content into iframe's so this can be put straight into the element + var width = this._$element.data('width') || 612; + var height = width + 80; + id = id.substr(-1) !== '/' ? id + '/' : id; // ensure id has trailing slash + $containerForElement.html(''); + this._resize(width, height); + this._config.onContentLoaded.call(this); + if (this._$modalArrows) //hide the arrows when showing video + this._$modalArrows.css('display', 'none'); + this._toggleLoading(false); + return this; + } + }, { + key: '_showVideoIframe', + value: function _showVideoIframe(url, width, height, $containerForElement) { + // should be used for videos only. for remote content use loadRemoteContent (data-type=url) + height = height || width; // default to square + $containerForElement.html('
'); + this._resize(width, height); + this._config.onContentLoaded.call(this); + if (this._$modalArrows) this._$modalArrows.css('display', 'none'); //hide the arrows when showing video + this._toggleLoading(false); + return this; + } + }, { + key: '_showHtml5Media', + value: function _showHtml5Media(url, $containerForElement) { + // should be used for videos only. for remote content use loadRemoteContent (data-type=url) + var contentType = this._getRemoteContentType(url); + if (!contentType) { + return this._error(this._config.strings.type); + } + var mediaType = ''; + if (contentType.indexOf('audio') > 0) { + mediaType = 'audio'; + } else { + mediaType = 'video'; + } + var width = this._$element.data('width') || 560; + var height = this._$element.data('height') || width / (560 / 315); + $containerForElement.html('
<' + mediaType + ' width="' + width + '" height="' + height + '" preload="auto" autoplay controls class="embed-responsive-item">' + this._config.strings.type + '
'); + this._resize(width, height); + this._config.onContentLoaded.call(this); + if (this._$modalArrows) this._$modalArrows.css('display', 'none'); //hide the arrows when showing video + this._toggleLoading(false); + return this; + } + }, { + key: '_loadRemoteContent', + value: function _loadRemoteContent(url, $containerForElement) { + var _this3 = this; + + var width = this._$element.data('width') || 560; + var height = this._$element.data('height') || 560; + + var disableExternalCheck = this._$element.data('disableExternalCheck') || false; + this._toggleLoading(false); + + // external urls are loading into an iframe + // local ajax can be loaded into the container itself + if (!disableExternalCheck && !this._isExternal(url)) { + $containerForElement.load(url, $.proxy(function () { + return _this3._$element.trigger('loaded.bs.modal');l; + })); + } else { + $containerForElement.html(''); + this._config.onContentLoaded.call(this); + } + + if (this._$modalArrows) //hide the arrows when remote content + this._$modalArrows.css('display', 'none'); + + this._resize(width, height); + return this; + } + }, { + key: '_isExternal', + value: function _isExternal(url) { + var match = url.match(/^([^:\/?#]+:)?(?:\/\/([^\/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/); + if (typeof match[1] === "string" && match[1].length > 0 && match[1].toLowerCase() !== location.protocol) return true; + + if (typeof match[2] === "string" && match[2].length > 0 && match[2].replace(new RegExp(':(' + ({ + "http:": 80, + "https:": 443 + })[location.protocol] + ')?$'), "") !== location.host) return true; + + return false; + } + }, { + key: '_error', + value: function _error(message) { + console.error(message); + this._containerToUse().html(message); + this._resize(300, 300); + return this; + } + }, { + key: '_preloadImageByIndex', + value: function _preloadImageByIndex(startIndex, numberOfTimes) { + + if (!this._$galleryItems) return; + + var next = $(this._$galleryItems.get(startIndex), false); + if (typeof next == 'undefined') return; + + var src = next.attr('data-remote') || next.attr('href'); + if (next.attr('data-type') === 'image' || this._isImage(src)) this._preloadImage(src, false); + + if (numberOfTimes > 0) return this._preloadImageByIndex(startIndex + 1, numberOfTimes - 1); + } + }, { + key: '_preloadImage', + value: function _preloadImage(src, $containerForImage) { + var _this4 = this; + + $containerForImage = $containerForImage || false; + + var img = new Image(); + if ($containerForImage) { + (function () { + + // if loading takes > 200ms show a loader + var loadingTimeout = setTimeout(function () { + $containerForImage.append(_this4._config.loadingMessage); + }, 200); + + img.onload = function () { + if (loadingTimeout) clearTimeout(loadingTimeout); + loadingTimeout = null; + var image = $(''); + image.attr('src', img.src); + image.addClass('img-fluid'); + + // backward compatibility for bootstrap v3 + image.css('width', '100%'); + + $containerForImage.html(image); + if (_this4._$modalArrows) _this4._$modalArrows.css('display', ''); // remove display to default to css property + + _this4._resize(img.width, img.height); + _this4._toggleLoading(false); + return _this4._config.onContentLoaded.call(_this4); + }; + img.onerror = function () { + _this4._toggleLoading(false); + return _this4._error(_this4._config.strings.fail + (' ' + src)); + }; + })(); + } + + img.src = src; + return img; + } + }, { + key: '_swipeGesure', + value: function _swipeGesure() { + if (this._touchendX < this._touchstartX) { + return this.navigateRight(); + } + if (this._touchendX > this._touchstartX) { + return this.navigateLeft(); + } + } + }, { + key: '_resize', + value: function _resize(width, height) { + + height = height || width; + this._wantedWidth = width; + this._wantedHeight = height; + + var imageAspecRatio = width / height; + + // if width > the available space, scale down the expected width and height + var widthBorderAndPadding = this._padding.left + this._padding.right + this._border.left + this._border.right; + + // force 10px margin if window size > 575px + var addMargin = this._config.doc.body.clientWidth > 575 ? 20 : 0; + var discountMargin = this._config.doc.body.clientWidth > 575 ? 0 : 20; + + var maxWidth = Math.min(width + widthBorderAndPadding, this._config.doc.body.clientWidth - addMargin, this._config.maxWidth); + + if (width + widthBorderAndPadding > maxWidth) { + height = (maxWidth - widthBorderAndPadding - discountMargin) / imageAspecRatio; + width = maxWidth; + } else width = width + widthBorderAndPadding; + + var headerHeight = 0, + footerHeight = 0; + + // as the resize is performed the modal is show, the calculate might fail + // if so, default to the default sizes + if (this._footerIsShown) footerHeight = this._$modalFooter.outerHeight(true) || 55; + + if (this._titleIsShown) headerHeight = this._$modalHeader.outerHeight(true) || 67; + + var borderPadding = this._padding.top + this._padding.bottom + this._border.bottom + this._border.top; + + //calculated each time as resizing the window can cause them to change due to Bootstraps fluid margins + var margins = parseFloat(this._$modalDialog.css('margin-top')) + parseFloat(this._$modalDialog.css('margin-bottom')); + + var maxHeight = Math.min(height, $(window).height() - borderPadding - margins - headerHeight - footerHeight, this._config.maxHeight - borderPadding - headerHeight - footerHeight); + + if (height > maxHeight) { + // if height > the available height, scale down the width + width = Math.ceil(maxHeight * imageAspecRatio) + widthBorderAndPadding; + } + + this._$lightboxContainer.css('height', maxHeight); + this._$modalDialog.css('flex', 1).css('maxWidth', width); + + var modal = this._$modal.data('bs.modal'); + if (modal) { + // v4 method is mistakenly protected + try { + modal._handleUpdate(); + } catch (Exception) { + modal.handleUpdate(); + } + } + return this; + } + }], [{ + key: '_jQueryInterface', + value: function _jQueryInterface(config) { + var _this5 = this; + + config = config || {}; + return this.each(function () { + var $this = $(_this5); + var _config = $.extend({}, Lightbox.Default, $this.data(), typeof config === 'object' && config); + + new Lightbox(_this5, _config); + }); + } + }]); + + return Lightbox; + })(); + + $.fn[NAME] = Lightbox._jQueryInterface; + $.fn[NAME].Constructor = Lightbox; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Lightbox._jQueryInterface; + }; + + return Lightbox; +})(jQuery); +//# sourceMappingURL=ekko-lightbox.js.map + +}(jQuery); diff -r 951d11442e0b -r d462a5ced83e src/pyams_default_theme/resources/js/ext/ekko-lightbox.js.map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_default_theme/resources/js/ext/ekko-lightbox.js.map Mon Nov 19 15:16:47 2018 +0100 @@ -0,0 +1,1 @@ +{"version":3,"sources":["../ekko-lightbox.js"],"names":["Lightbox","$","NAME","JQUERY_NO_CONFLICT","fn","Default","title","footer","maxWidth","maxHeight","showArrows","wrapping","type","alwaysShowClose","loadingMessage","leftArrow","rightArrow","strings","close","fail","doc","document","onShow","onShown","onHide","onHidden","onNavigate","onContentLoaded","$element","config","_config","extend","_$modalArrows","_galleryIndex","_galleryName","_padding","_border","_titleIsShown","_footerIsShown","_wantedWidth","_wantedHeight","_touchstartX","_touchendX","_modalId","Math","floor","random","_$element","jQuery","_isBootstrap3","modal","Constructor","VERSION","h4","btn","header","body","dialog","append","_$modal","_$modalDialog","find","first","_$modalContent","_$modalBody","_$modalHeader","_$modalFooter","_$lightboxContainer","_$lightboxBodyOne","_$lightboxBodyTwo","_calculateBorders","_calculatePadding","data","_$galleryItems","index","on","_navigationalBinder","bind","length","event","preventDefault","navigateLeft","navigateRight","updateNavigation","undefined","_toggleLoading","_handle","call","off","window","remove","_resize","changedTouches","screenX","_swipeGesure","get","navigateTo","$nav","addClass","removeClass","keyCode","src","_isImage","_getYoutubeId","_getVimeoId","_getDailymotionId","_getInstagramId","_isMedia","indexOf","response","ajax","url","async","contentType","getResponseHeader","string","match","$toUse","$current","hasClass","setTimeout","empty","_containerToUse","_updateTitleAndFooter","currentRemote","attr","currentType","_detectRemoteType","_error","_preloadImage","_preloadImageByIndex","_showYoutubeVideo","_showVimeoVideo","_showDailymotionVideo","_showInstagramVideo","_showHtml5Media","_loadRemoteContent","matches","show","css","top","_totalCssByAttribute","right","bottom","left","attribute","parseInt","caption","html","remote","$containerForElement","id","query","substr","width","height","_showVideoIframe","_getRemoteContentType","mediaType","disableExternalCheck","_isExternal","load","proxy","trigger","toLowerCase","location","protocol","replace","RegExp","host","message","console","error","startIndex","numberOfTimes","next","$containerForImage","img","Image","loadingTimeout","onload","clearTimeout","image","onerror","imageAspecRatio","widthBorderAndPadding","addMargin","clientWidth","discountMargin","min","headerHeight","footerHeight","outerHeight","borderPadding","margins","parseFloat","ceil","_handleUpdate","Exception","handleUpdate","each","$this","_jQueryInterface","noConflict"],"mappings":";;;;;;;;;;;;AAAA,IAAMA,WAAY,UAACC,CAAD,EAAO;;AAExB,KAAMC,OAAO,cAAb;AACA,KAAMC,qBAAqBF,EAAEG,EAAF,CAAKF,IAAL,CAA3B;;AAEA,KAAMG,UAAU;AACfC,SAAO,EADQ;AAEfC,UAAQ,EAFO;AAGfC,YAAU,IAHK;AAIfC,aAAW,IAJI;AAKfC,cAAY,IALG,EAKG;AAClBC,YAAU,IANK,EAMC;AAChBC,QAAM,IAPS,EAOH;AACZC,mBAAiB,KARF,EAQS;AACxBC,kBAAgB,2EATD,EAS8E;AAC7FC,aAAW,uBAVI;AAWfC,cAAY,uBAXG;AAYfC,WAAS;AACRC,UAAO,OADC;AAERC,SAAM,uBAFE;AAGRP,SAAM;AAHE,GAZM;AAiBfQ,OAAKC,QAjBU,EAiBA;AACfC,QAlBe,oBAkBN,CAAE,CAlBI;AAmBfC,SAnBe,qBAmBL,CAAE,CAnBG;AAoBfC,QApBe,oBAoBN,CAAE,CApBI;AAqBfC,UArBe,sBAqBJ,CAAE,CArBE;AAsBfC,YAtBe,wBAsBF,CAAE,CAtBA;AAuBfC,iBAvBe,6BAuBG,CAAE;AAvBL,EAAhB;;AALwB,KA+BlB3B,QA/BkB;AAAA;AAAA;;;AAiCvB;;;;;;;;;;;;;;;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]\n\n\tconst Default = {\n\t\ttitle: '',\n\t\tfooter: '',\n\t\tmaxWidth: 9999,\n\t\tmaxHeight: 9999,\n\t\tshowArrows: true, //display the left / right arrows or not\n\t\twrapping: true, //if true, gallery loops infinitely\n\t\ttype: null, //force the lightbox into image / youtube mode. if null, or not image|youtube|vimeo|dailymotion; detect it\n\t\talwaysShowClose: false, //always show the close button, even if there is no title\n\t\tloadingMessage: '
', // http://tobiasahlin.com/spinkit/\n\t\tleftArrow: '',\n\t\trightArrow: '',\n\t\tstrings: {\n\t\t\tclose: 'Close',\n\t\t\tfail: 'Failed to load image:',\n\t\t\ttype: 'Could not detect remote target type. Force the type using data-type',\n\t\t},\n\t\tdoc: document, // if in an iframe can specify top.document\n\t\tonShow() {},\n\t\tonShown() {},\n\t\tonHide() {},\n\t\tonHidden() {},\n\t\tonNavigate() {},\n\t\tonContentLoaded() {}\n\t}\n\n\tclass Lightbox {\n\n\t\t/**\n\n\t Class properties:\n\n\t\t _$element: null -> the element currently being displayed\n\t\t _$modal: The bootstrap modal generated\n\t\t _$modalDialog: The .modal-dialog\n\t\t _$modalContent: The .modal-content\n\t\t _$modalBody: The .modal-body\n\t\t _$modalHeader: The .modal-header\n\t\t _$modalFooter: The .modal-footer\n\t\t _$lightboxContainerOne: Container of the first lightbox element\n\t\t _$lightboxContainerTwo: Container of the second lightbox element\n\t\t _$lightboxBody: First element in the container\n\t\t _$modalArrows: The overlayed arrows container\n\n\t\t _$galleryItems: Other 's available for this gallery\n\t\t _galleryName: Name of the current data('gallery') showing\n\t\t _galleryIndex: The current index of the _$galleryItems being shown\n\n\t\t _config: {} the options for the modal\n\t\t _modalId: unique id for the current lightbox\n\t\t _padding / _border: CSS properties for the modal container; these are used to calculate the available space for the content\n\n\t\t */\n\n\t\tstatic get Default() {\n\t\t\treturn Default\n\t\t}\n\n\t\tconstructor($element, config) {\n\t\t\tthis._config = $.extend({}, Default, config)\n\t\t\tthis._$modalArrows = null\n\t\t\tthis._galleryIndex = 0\n\t\t\tthis._galleryName = null\n\t\t\tthis._padding = null\n\t\t\tthis._border = null\n\t\t\tthis._titleIsShown = false\n\t\t\tthis._footerIsShown = false\n\t\t\tthis._wantedWidth = 0\n\t\t\tthis._wantedHeight = 0\n\t\t\tthis._touchstartX = 0\n\t\t\tthis._touchendX = 0\n\n\t\t\tthis._modalId = `ekkoLightbox-${Math.floor((Math.random() * 1000) + 1)}`;\n\t\t\tthis._$element = $element instanceof jQuery ? $element : $($element)\n\n\t\t\tthis._isBootstrap3 = $.fn.modal.Constructor.VERSION[0] == 3;\n\n\t\t\tlet h4 = `

${this._config.title || \" \"}

`;\n\t\t\tlet btn = ``;\n\n\t\t\tlet header = `
`+(this._isBootstrap3 ? btn+h4 : h4+btn)+`
`;\n\t\t\tlet footer = `
${this._config.footer || \" \"}
`;\n\t\t\tlet body = '
'\n\t\t\tlet dialog = `
${header}${body}${footer}
`\n\t\t\t$(this._config.doc.body).append(`
${dialog}
`)\n\n\t\t\tthis._$modal = $(`#${this._modalId}`, this._config.doc)\n\t\t\tthis._$modalDialog = this._$modal.find('.modal-dialog').first()\n\t\t\tthis._$modalContent = this._$modal.find('.modal-content').first()\n\t\t\tthis._$modalBody = this._$modal.find('.modal-body').first()\n\t\t\tthis._$modalHeader = this._$modal.find('.modal-header').first()\n\t\t\tthis._$modalFooter = this._$modal.find('.modal-footer').first()\n\n\t\t\tthis._$lightboxContainer = this._$modalBody.find('.ekko-lightbox-container').first()\n\t\t\tthis._$lightboxBodyOne = this._$lightboxContainer.find('> div:first-child').first()\n\t\t\tthis._$lightboxBodyTwo = this._$lightboxContainer.find('> div:last-child').first()\n\n\t\t\tthis._border = this._calculateBorders()\n\t\t\tthis._padding = this._calculatePadding()\n\n\t\t\tthis._galleryName = this._$element.data('gallery')\n\t\t\tif (this._galleryName) {\n\t\t\t\tthis._$galleryItems = $(document.body).find(`*[data-gallery=\"${this._galleryName}\"]`)\n\t\t\t\tthis._galleryIndex = this._$galleryItems.index(this._$element)\n\t\t\t\t$(document).on('keydown.ekkoLightbox', this._navigationalBinder.bind(this))\n\n\t\t\t\t// add the directional arrows to the modal\n\t\t\t\tif (this._config.showArrows && this._$galleryItems.length > 1) {\n\t\t\t\t\tthis._$lightboxContainer.append(`
${this._config.leftArrow}${this._config.rightArrow}
`)\n\t\t\t\t\tthis._$modalArrows = this._$lightboxContainer.find('div.ekko-lightbox-nav-overlay').first()\n\t\t\t\t\tthis._$lightboxContainer.on('click', 'a:first-child', event => {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\treturn this.navigateLeft()\n\t\t\t\t\t})\n\t\t\t\t\tthis._$lightboxContainer.on('click', 'a:last-child', event => {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\treturn this.navigateRight()\n\t\t\t\t\t})\n\t\t\t\t\tthis.updateNavigation()\n\t\t\t\t}\n\n\t\t\t\t// check for wrapping setting\n\t\t\t\tlet wrapping = this._$element.data('wrapping');\n\t\t\t\tif (wrapping !== undefined) {\n\t\t\t\t\tthis._config.wrapping = wrapping;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._$modal\n\t\t\t.on('show.bs.modal', this._config.onShow.bind(this))\n\t\t\t.on('shown.bs.modal', () => {\n\t\t\t\tthis._toggleLoading(true)\n\t\t\t\tthis._handle()\n\t\t\t\treturn this._config.onShown.call(this)\n\t\t\t})\n\t\t\t.on('hide.bs.modal', this._config.onHide.bind(this))\n\t\t\t.on('hidden.bs.modal', () => {\n\t\t\t\tif (this._galleryName) {\n\t\t\t\t\t$(document).off('keydown.ekkoLightbox')\n\t\t\t\t\t$(window).off('resize.ekkoLightbox')\n\t\t\t\t}\n\t\t\t\tthis._$modal.remove()\n\t\t\t\treturn this._config.onHidden.call(this)\n\t\t\t})\n\t\t\t.modal(this._config)\n\n\t\t\t$(window).on('resize.ekkoLightbox', () => {\n\t\t\t\tthis._resize(this._wantedWidth, this._wantedHeight)\n\t\t\t})\n\t\t\tthis._$lightboxContainer\n\t\t\t.on('touchstart', () => {\n\t\t\t\tthis._touchstartX = event.changedTouches[0].screenX;\n\n\t\t\t})\n\t\t\t.on('touchend', () => {\n\t\t\t\tthis._touchendX = event.changedTouches[0].screenX;\n\t\t\t this._swipeGesure();\n\t\t\t})\n\t\t}\n\n\t\telement() {\n\t\t\treturn this._$element;\n\t\t}\n\n\t\tmodal() {\n\t\t\treturn this._$modal;\n\t\t}\n\n\t\tnavigateTo(index) {\n\n\t\t\tif (index < 0 || index > this._$galleryItems.length-1)\n\t\t\t\treturn this\n\n\t\t\tthis._galleryIndex = index\n\n\t\t\tthis.updateNavigation()\n\n\t\t\tthis._$element = $(this._$galleryItems.get(this._galleryIndex))\n\t\t\tthis._handle();\n\t\t}\n\n\t\tnavigateLeft() {\n\n\t\t\tif(!this._$galleryItems)\n\t\t\t\treturn;\n\n\t\t\tif (this._$galleryItems.length === 1)\n\t\t\t\treturn\n\n\t\t\tif (this._galleryIndex === 0) {\n\t\t\t\tif (this._config.wrapping)\n\t\t\t\t\tthis._galleryIndex = this._$galleryItems.length - 1\n\t\t\t\telse\n\t\t\t\t\treturn\n\t\t\t}\n\t\t\telse //circular\n\t\t\t\tthis._galleryIndex--\n\n\t\t\tthis._config.onNavigate.call(this, 'left', this._galleryIndex)\n\t\t\treturn this.navigateTo(this._galleryIndex)\n\t\t}\n\n\t\tnavigateRight() {\n\n\t\t\tif(!this._$galleryItems)\n\t\t\t\treturn;\n\n\t\t\tif (this._$galleryItems.length === 1)\n\t\t\t\treturn\n\n\t\t\tif (this._galleryIndex === this._$galleryItems.length - 1) {\n\t\t\t\tif (this._config.wrapping)\n\t\t\t\t\tthis._galleryIndex = 0\n\t\t\t\telse\n\t\t\t\t\treturn\n\t\t\t}\n\t\t\telse //circular\n\t\t\t\tthis._galleryIndex++\n\n\t\t\tthis._config.onNavigate.call(this, 'right', this._galleryIndex)\n\t\t\treturn this.navigateTo(this._galleryIndex)\n\t\t}\n\n\t\tupdateNavigation() {\n\t\t\tif (!this._config.wrapping) {\n\t\t\t\tlet $nav = this._$lightboxContainer.find('div.ekko-lightbox-nav-overlay')\n\t\t\t\tif (this._galleryIndex === 0)\n\t\t\t\t\t$nav.find('a:first-child').addClass('disabled')\n\t\t\t\telse\n\t\t\t\t\t$nav.find('a:first-child').removeClass('disabled')\n\n\t\t\t\tif (this._galleryIndex === this._$galleryItems.length - 1)\n\t\t\t\t\t$nav.find('a:last-child').addClass('disabled')\n\t\t\t\telse\n\t\t\t\t\t$nav.find('a:last-child').removeClass('disabled')\n\t\t\t}\n\t\t}\n\n\t\tclose() {\n\t\t\treturn this._$modal.modal('hide');\n\t\t}\n\n\t\t// helper private methods\n\t\t_navigationalBinder(event) {\n\t\t\tevent = event || window.event;\n\t\t\tif (event.keyCode === 39)\n\t\t\t\treturn this.navigateRight()\n\t\t\tif (event.keyCode === 37)\n\t\t\t\treturn this.navigateLeft()\n\t\t}\n\n\t\t// type detection private methods\n\t\t_detectRemoteType(src, type) {\n\n\t\t\ttype = type || false;\n\n\t\t\tif(!type && this._isImage(src))\n\t\t\t\ttype = 'image';\n\t\t\tif(!type && this._getYoutubeId(src))\n\t\t\t\ttype = 'youtube';\n\t\t\tif(!type && this._getVimeoId(src))\n\t\t\t\ttype = 'vimeo';\n\t\t\tif(!type && this._getDailymotionId(src))\n\t\t\t\ttype = 'dailymotion';\n\t\t\tif(!type && this._getInstagramId(src))\n\t\t\t\ttype = 'instagram';\n\t\t\tif(type === 'audio' || type === 'video' || (!type && this._isMedia(src)))\n\t\t\t\ttype = 'media';\n\t\t\tif(!type || ['image', 'youtube', 'vimeo', 'dailymotion', 'instagram', 'media', 'url'].indexOf(type) < 0)\n\t\t\t\ttype = 'url';\n\n\t\t\treturn type;\n\t\t}\n\n\t\t_getRemoteContentType(src) {\n\t\t\tlet response = $.ajax({\n\t\t\t\ttype: 'HEAD',\n\t\t\t\turl: src,\n\t\t\t\tasync: false\n\t\t\t});\n\t\t\tlet contentType = response.getResponseHeader('Content-Type')\n\t\t\treturn contentType;\n\t\t}\n\n\t\t_isImage(string) {\n\t\t\treturn string && string.match(/(^data:image\\/.*,)|(\\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\\?|#).*)?$)/i)\n\t\t}\n\n\t\t_isMedia(string) {\n\t\t\treturn string && string.match(/(\\.(mp3|mp4|ogg|webm|wav)((\\?|#).*)?$)/i)\n\t\t}\n\n\t\t_containerToUse() {\n\t\t\t// if currently showing an image, fade it out and remove\n\t\t\tlet $toUse = this._$lightboxBodyTwo\n\t\t\tlet $current = this._$lightboxBodyOne\n\n\t\t\tif(this._$lightboxBodyTwo.hasClass('in')) {\n\t\t\t\t$toUse = this._$lightboxBodyOne\n\t\t\t\t$current = this._$lightboxBodyTwo\n\t\t\t}\n\n\t\t\t$current.removeClass('in show')\n\t\t\tsetTimeout(() => {\n\t\t\t\tif(!this._$lightboxBodyTwo.hasClass('in'))\n\t\t\t\t\tthis._$lightboxBodyTwo.empty()\n\t\t\t\tif(!this._$lightboxBodyOne.hasClass('in'))\n\t\t\t\t\tthis._$lightboxBodyOne.empty()\n\t\t\t}, 500)\n\n\t\t\t$toUse.addClass('in show')\n\t\t\treturn $toUse\n\t\t}\n\n\t\t_handle() {\n\n\t\t\tlet $toUse = this._containerToUse()\n\t\t\tthis._updateTitleAndFooter()\n\n\t\t\tlet currentRemote = this._$element.attr('data-remote') || this._$element.attr('href')\n\t\t\tlet currentType = this._detectRemoteType(currentRemote, this._$element.attr('data-type') || false)\n\n\t\t\tif(['image', 'youtube', 'vimeo', 'dailymotion', 'instagram', 'media', 'url'].indexOf(currentType) < 0)\n\t\t\t\treturn this._error(this._config.strings.type)\n\n\t\t\tswitch(currentType) {\n\t\t\t\tcase 'image':\n\t\t\t\t\tthis._preloadImage(currentRemote, $toUse)\n\t\t\t\t\tthis._preloadImageByIndex(this._galleryIndex, 3)\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'youtube':\n\t\t\t\t\tthis._showYoutubeVideo(currentRemote, $toUse);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'vimeo':\n\t\t\t\t\tthis._showVimeoVideo(this._getVimeoId(currentRemote), $toUse);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'dailymotion':\n\t\t\t\t\tthis._showDailymotionVideo(this._getDailymotionId(currentRemote), $toUse);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'instagram':\n\t\t\t\t\tthis._showInstagramVideo(this._getInstagramId(currentRemote), $toUse);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'media':\n\t\t\t\t\tthis._showHtml5Media(currentRemote, $toUse);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: // url\n\t\t\t\t\tthis._loadRemoteContent(currentRemote, $toUse);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\n\t\t_getYoutubeId(string) {\n\t\t\tif(!string)\n\t\t\t\treturn false;\n\t\t\tlet matches = string.match(/^.*(youtu.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=|\\&v=)([^#\\&\\?]*).*/)\n\t\t\treturn (matches && matches[2].length === 11) ? matches[2] : false\n\t\t}\n\n\t\t_getVimeoId(string) {\n\t\t\treturn string && string.indexOf('vimeo') > 0 ? string : false\n\t\t}\n\n\t\t_getDailymotionId(string) {\n\t\t\treturn string && string.indexOf('dailymotion') > 0 ? string : false\n\t\t}\n\n\t\t_getInstagramId(string) {\n\t\t\treturn string && string.indexOf('instagram') > 0 ? string : false\n\t\t}\n\n\t\t// layout private methods\n\t\t_toggleLoading(show) {\n\t\t\tshow = show || false\n\t\t\tif(show) {\n\t\t\t\tthis._$modalDialog.css('display', 'none')\n\t\t\t\tthis._$modal.removeClass('in show')\n\t\t\t\t$('.modal-backdrop').append(this._config.loadingMessage)\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._$modalDialog.css('display', 'block')\n\t\t\t\tthis._$modal.addClass('in show')\n\t\t\t\t$('.modal-backdrop').find('.ekko-lightbox-loader').remove()\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\n\t\t_calculateBorders() {\n\t\t\treturn {\n\t\t\t\ttop: this._totalCssByAttribute('border-top-width'),\n\t\t\t\tright: this._totalCssByAttribute('border-right-width'),\n\t\t\t\tbottom: this._totalCssByAttribute('border-bottom-width'),\n\t\t\t\tleft: this._totalCssByAttribute('border-left-width'),\n\t\t\t}\n\t\t}\n\n\t\t_calculatePadding() {\n\t\t\treturn {\n\t\t\t\ttop: this._totalCssByAttribute('padding-top'),\n\t\t\t\tright: this._totalCssByAttribute('padding-right'),\n\t\t\t\tbottom: this._totalCssByAttribute('padding-bottom'),\n\t\t\t\tleft: this._totalCssByAttribute('padding-left'),\n\t\t\t}\n\t\t}\n\n\t\t_totalCssByAttribute(attribute) {\n\t\t\treturn parseInt(this._$modalDialog.css(attribute), 10) +\n\t\t\t\tparseInt(this._$modalContent.css(attribute), 10) +\n\t\t\t\tparseInt(this._$modalBody.css(attribute), 10)\n\t\t}\n\n\t\t_updateTitleAndFooter() {\n\t\t\tlet title = this._$element.data('title') || \"\"\n\t\t\tlet caption = this._$element.data('footer') || \"\"\n\n\t\t\tthis._titleIsShown = false\n\t\t\tif (title || this._config.alwaysShowClose) {\n\t\t\t\tthis._titleIsShown = true\n\t\t\t\tthis._$modalHeader.css('display', '').find('.modal-title').html(title || \" \")\n\t\t\t}\n\t\t\telse\n\t\t\t\tthis._$modalHeader.css('display', 'none')\n\n\t\t\tthis._footerIsShown = false\n\t\t\tif (caption) {\n\t\t\t\tthis._footerIsShown = true\n\t\t\t\tthis._$modalFooter.css('display', '').html(caption)\n\t\t\t}\n\t\t\telse\n\t\t\t\tthis._$modalFooter.css('display', 'none')\n\n\t\t\treturn this;\n\t\t}\n\n\t\t_showYoutubeVideo(remote, $containerForElement) {\n\t\t\tlet id = this._getYoutubeId(remote)\n\t\t\tlet query = remote.indexOf('&') > 0 ? remote.substr(remote.indexOf('&')) : ''\n\t\t\tlet width = this._$element.data('width') || 560\n\t\t\tlet height = this._$element.data('height') || width / ( 560/315 )\n\t\t\treturn this._showVideoIframe(\n\t\t\t\t`//www.youtube.com/embed/${id}?badge=0&autoplay=1&html5=1${query}`,\n\t\t\t\twidth,\n\t\t\t\theight,\n\t\t\t\t$containerForElement\n\t\t\t);\n\t\t}\n\n\t\t_showVimeoVideo(id, $containerForElement) {\n\t\t\tlet width = this._$element.data('width') || 500\n\t\t\tlet height = this._$element.data('height') || width / ( 560/315 )\n\t\t\treturn this._showVideoIframe(id + '?autoplay=1', width, height, $containerForElement)\n\t\t}\n\n\t\t_showDailymotionVideo(id, $containerForElement) {\n\t\t\tlet width = this._$element.data('width') || 500\n\t\t\tlet height = this._$element.data('height') || width / ( 560/315 )\n\t\t\treturn this._showVideoIframe(id + '?autoplay=1', width, height, $containerForElement)\n\t\t}\n\n\t\t_showInstagramVideo(id, $containerForElement) {\n\t\t\t// instagram load their content into iframe's so this can be put straight into the element\n\t\t\tlet width = this._$element.data('width') || 612\n\t\t\tlet height = width + 80;\n\t\t\tid = id.substr(-1) !== '/' ? id + '/' : id; // ensure id has trailing slash\n\t\t\t$containerForElement.html(``);\n\t\t\tthis._resize(width, height);\n\t\t\tthis._config.onContentLoaded.call(this);\n\t\t\tif (this._$modalArrows) //hide the arrows when showing video\n\t\t\t\tthis._$modalArrows.css('display', 'none');\n\t\t\tthis._toggleLoading(false);\n\t\t\treturn this;\n\t\t}\n\n\t\t_showVideoIframe(url, width, height, $containerForElement) { // should be used for videos only. for remote content use loadRemoteContent (data-type=url)\n\t\t\theight = height || width; // default to square\n\t\t\t$containerForElement.html(`
`);\n\t\t\tthis._resize(width, height);\n\t\t\tthis._config.onContentLoaded.call(this);\n\t\t\tif (this._$modalArrows)\n\t\t\t\tthis._$modalArrows.css('display', 'none'); //hide the arrows when showing video\n\t\t\tthis._toggleLoading(false);\n\t\t\treturn this;\n\t\t}\n \n\t\t_showHtml5Media(url, $containerForElement) { // should be used for videos only. for remote content use loadRemoteContent (data-type=url)\n\t\t\tlet contentType = this._getRemoteContentType(url);\n\t\t\tif(!contentType){\n\t\t\t\treturn this._error(this._config.strings.type)\n\t\t\t}\n\t\t\tlet mediaType = '';\n\t\t\tif(contentType.indexOf('audio') > 0){\n\t\t\t\tmediaType = 'audio';\n\t\t\t}else{\n\t\t\t\tmediaType = 'video';\n\t\t\t}\n\t\t\tlet width = this._$element.data('width') || 560\n\t\t\tlet height = this._$element.data('height') || width / ( 560/315 )\n\t\t\t$containerForElement.html(`
<${mediaType} width=\"${width}\" height=\"${height}\" preload=\"auto\" autoplay controls class=\"embed-responsive-item\">${this._config.strings.type}
`);\n\t\t\tthis._resize(width, height);\n\t\t\tthis._config.onContentLoaded.call(this);\n\t\t\tif (this._$modalArrows)\n\t\t\t\tthis._$modalArrows.css('display', 'none'); //hide the arrows when showing video\n\t\t\tthis._toggleLoading(false);\n\t\t\treturn this;\n\t\t}\n\n\t\t_loadRemoteContent(url, $containerForElement) {\n\t\t\tlet width = this._$element.data('width') || 560;\n\t\t\tlet height = this._$element.data('height') || 560;\n\n\t\t\tlet disableExternalCheck = this._$element.data('disableExternalCheck') || false;\n\t\t\tthis._toggleLoading(false);\n\n\t\t\t// external urls are loading into an iframe\n\t\t\t// local ajax can be loaded into the container itself\n\t\t\tif (!disableExternalCheck && !this._isExternal(url)) {\n\t\t\t\t$containerForElement.load(url, $.proxy(() => {\n\t\t\t\t\treturn this._$element.trigger('loaded.bs.modal');\n\t\t\t\t}));\n\n\t\t\t} else {\n\t\t\t\t$containerForElement.html(``);\n\t\t\t\tthis._config.onContentLoaded.call(this);\n\t\t\t}\n\n\t\t\tif (this._$modalArrows) //hide the arrows when remote content\n\t\t\t\tthis._$modalArrows.css('display', 'none')\n\n\t\t\tthis._resize(width, height);\n\t\t\treturn this;\n\t\t}\n\n\t\t_isExternal(url) {\n\t\t\tlet match = url.match(/^([^:\\/?#]+:)?(?:\\/\\/([^\\/?#]*))?([^?#]+)?(\\?[^#]*)?(#.*)?/);\n\t\t\tif (typeof match[1] === \"string\" && match[1].length > 0 && match[1].toLowerCase() !== location.protocol)\n\t\t\t\treturn true;\n\n\t\t\tif (typeof match[2] === \"string\" && match[2].length > 0 && match[2].replace(new RegExp(`:(${{\n\t\t\t\t\t\"http:\": 80,\n\t\t\t\t\t\"https:\": 443\n\t\t\t\t}[location.protocol]})?$`), \"\") !== location.host)\n\t\t\t\treturn true;\n\n\t\t\treturn false;\n\t\t}\n\n\t\t_error( message ) {\n\t\t\tconsole.error(message);\n\t\t\tthis._containerToUse().html(message);\n\t\t\tthis._resize(300, 300);\n\t\t\treturn this;\n\t\t}\n\n\t\t_preloadImageByIndex(startIndex, numberOfTimes) {\n\n\t\t\tif(!this._$galleryItems)\n\t\t\t\treturn;\n\n\t\t\tlet next = $(this._$galleryItems.get(startIndex), false)\n\t\t\tif(typeof next == 'undefined')\n\t\t\t\treturn\n\n\t\t\tlet src = next.attr('data-remote') || next.attr('href')\n\t\t\tif (next.attr('data-type') === 'image' || this._isImage(src))\n\t\t\t\tthis._preloadImage(src, false)\n\n\t\t\tif(numberOfTimes > 0)\n\t\t\t\treturn this._preloadImageByIndex(startIndex + 1, numberOfTimes-1);\n\t\t}\n\n\t\t_preloadImage( src, $containerForImage) {\n\n\t\t\t$containerForImage = $containerForImage || false\n\n\t\t\tlet img = new Image();\n\t\t\tif ($containerForImage) {\n\n\t\t\t\t// if loading takes > 200ms show a loader\n\t\t\t\tlet loadingTimeout = setTimeout(() => {\n\t\t\t\t\t$containerForImage.append(this._config.loadingMessage)\n\t\t\t\t}, 200)\n\n\t\t\t\timg.onload = () => {\n\t\t\t\t\tif(loadingTimeout)\n\t\t\t\t\t\tclearTimeout(loadingTimeout)\n\t\t\t\t\tloadingTimeout = null;\n\t\t\t\t\tlet image = $('');\n\t\t\t\t\timage.attr('src', img.src);\n\t\t\t\t\timage.addClass('img-fluid');\n\n\t\t\t\t\t// backward compatibility for bootstrap v3\n\t\t\t\t\timage.css('width', '100%');\n\n\t\t\t\t\t$containerForImage.html(image);\n\t\t\t\t\tif (this._$modalArrows)\n\t\t\t\t\t\tthis._$modalArrows.css('display', '') // remove display to default to css property\n\n\t\t\t\t\tthis._resize(img.width, img.height);\n\t\t\t\t\tthis._toggleLoading(false);\n\t\t\t\t\treturn this._config.onContentLoaded.call(this);\n\t\t\t\t};\n\t\t\t\timg.onerror = () => {\n\t\t\t\t\tthis._toggleLoading(false);\n\t\t\t\t\treturn this._error(this._config.strings.fail+` ${src}`);\n\t\t\t\t};\n\t\t\t}\n\n\t\t\timg.src = src;\n\t\t\treturn img;\n\t\t}\n\n\t\t_swipeGesure() {\n\t\t if (this._touchendX < this._touchstartX) {\n\t\t return this.navigateRight();\n\t\t }\n\t\t if (this._touchendX > this._touchstartX) {\n\t\t return this.navigateLeft();\n\t\t }\n\t\t}\n\n\t\t_resize( width, height ) {\n\n\t\t\theight = height || width\n\t\t\tthis._wantedWidth = width\n\t\t\tthis._wantedHeight = height\n\n\t\t\tlet imageAspecRatio = width / height;\n\n\t\t\t// if width > the available space, scale down the expected width and height\n\t\t\tlet widthBorderAndPadding = this._padding.left + this._padding.right + this._border.left + this._border.right\n\n\t\t\t// force 10px margin if window size > 575px\n\t\t\tlet addMargin = this._config.doc.body.clientWidth > 575 ? 20 : 0\n\t\t\tlet discountMargin = this._config.doc.body.clientWidth > 575 ? 0 : 20\n\n\t\t\tlet maxWidth = Math.min(width + widthBorderAndPadding, this._config.doc.body.clientWidth - addMargin, this._config.maxWidth)\n\n\t\t\tif((width + widthBorderAndPadding) > maxWidth) {\n\t\t\t\theight = (maxWidth - widthBorderAndPadding - discountMargin) / imageAspecRatio;\n\t\t\t\twidth = maxWidth\n\t\t\t} else\n\t\t\t\twidth = (width + widthBorderAndPadding)\n\n\t\t\tlet headerHeight = 0,\n\t\t\t footerHeight = 0\n\n\t\t\t// as the resize is performed the modal is show, the calculate might fail\n\t\t\t// if so, default to the default sizes\n\t\t\tif (this._footerIsShown)\n\t\t\t\tfooterHeight = this._$modalFooter.outerHeight(true) || 55\n\n\t\t\tif (this._titleIsShown)\n\t\t\t\theaderHeight = this._$modalHeader.outerHeight(true) || 67\n\n\t\t\tlet borderPadding = this._padding.top + this._padding.bottom + this._border.bottom + this._border.top\n\n\t\t\t//calculated each time as resizing the window can cause them to change due to Bootstraps fluid margins\n\t\t\tlet margins = parseFloat(this._$modalDialog.css('margin-top')) + parseFloat(this._$modalDialog.css('margin-bottom'));\n\n\t\t\tlet maxHeight = Math.min(height, $(window).height() - borderPadding - margins - headerHeight - footerHeight, this._config.maxHeight - borderPadding - headerHeight - footerHeight);\n\n\t\t\tif(height > maxHeight) {\n\t\t\t\t// if height > the available height, scale down the width\n\t\t\t\twidth = Math.ceil(maxHeight * imageAspecRatio) + widthBorderAndPadding;\n\t\t\t}\n\n\t\t\tthis._$lightboxContainer.css('height', maxHeight)\n\t\t\tthis._$modalDialog.css('flex', 1).css('maxWidth', width);\n\n\t\t\tlet modal = this._$modal.data('bs.modal');\n\t\t\tif (modal) {\n\t\t\t\t// v4 method is mistakenly protected\n\t\t\t\ttry {\n\t\t\t\t\tmodal._handleUpdate();\n\t\t\t\t} catch(Exception) {\n\t\t\t\t\tmodal.handleUpdate();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\n\t\tstatic _jQueryInterface(config) {\n\t\t\tconfig = config || {}\n\t\t\treturn this.each(() => {\n\t\t\t\tlet $this = $(this)\n\t\t\t\tlet _config = $.extend(\n\t\t\t\t\t{},\n\t\t\t\t\tLightbox.Default,\n\t\t\t\t\t$this.data(),\n\t\t\t\t\ttypeof config === 'object' && config\n\t\t\t\t)\n\n\t\t\t\tnew Lightbox(this, _config)\n\t\t\t})\n\t\t}\n\t}\n\n\n\n\t$.fn[NAME] = Lightbox._jQueryInterface\n\t$.fn[NAME].Constructor = Lightbox\n\t$.fn[NAME].noConflict = () => {\n\t\t$.fn[NAME] = JQUERY_NO_CONFLICT\n\t\treturn Lightbox._jQueryInterface\n\t}\n\n\treturn Lightbox\n\n})(jQuery)\n\nexport default Lightbox\n"]} \ No newline at end of file diff -r 951d11442e0b -r d462a5ced83e src/pyams_default_theme/resources/js/ext/ekko-lightbox.min.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_default_theme/resources/js/ext/ekko-lightbox.min.js Mon Nov 19 15:16:47 2018 +0100 @@ -0,0 +1,1 @@ +!function(t){"use strict";var e=function(){function o(t,e){for(var i=0;i
',leftArrow:"",rightArrow:"",strings:{close:"Close",fail:"Failed to load image:",type:"Could not detect remote target type. Force the type using data-type"},doc:document,onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNavigate:function(){},onContentLoaded:function(){}},a=function(){function n(t,e){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this._config=c.extend({},l,e),this._$modalArrows=null,this._galleryIndex=0,this._galleryName=null,this._padding=null,this._border=null,this._titleIsShown=!1,this._footerIsShown=!1,this._wantedWidth=0,this._wantedHeight=0,this._touchstartX=0,this._touchendX=0,this._modalId="ekkoLightbox-"+Math.floor(1e3*Math.random()+1),this._$element=t instanceof jQuery?t:c(t),this._isBootstrap3=3==c.fn.modal.Constructor.VERSION[0];var o='",a='',s='";c(this._config.doc.body).append('"),this._$modal=c("#"+this._modalId,this._config.doc),this._$modalDialog=this._$modal.find(".modal-dialog").first(),this._$modalContent=this._$modal.find(".modal-content").first(),this._$modalBody=this._$modal.find(".modal-body").first(),this._$modalHeader=this._$modal.find(".modal-header").first(),this._$modalFooter=this._$modal.find(".modal-footer").first(),this._$lightboxContainer=this._$modalBody.find(".ekko-lightbox-container").first(),this._$lightboxBodyOne=this._$lightboxContainer.find("> div:first-child").first(),this._$lightboxBodyTwo=this._$lightboxContainer.find("> div:last-child").first(),this._border=this._calculateBorders(),this._padding=this._calculatePadding(),this._galleryName=this._$element.data("gallery"),this._galleryName&&(this._$galleryItems=c(document.body).find('*[data-gallery="'+this._galleryName+'"]'),this._galleryIndex=this._$galleryItems.index(this._$element),c(document).on("keydown.ekkoLightbox",this._navigationalBinder.bind(this)),this._config.showArrows&&1'+this._config.leftArrow+''+this._config.rightArrow+""),this._$modalArrows=this._$lightboxContainer.find("div.ekko-lightbox-nav-overlay").first(),this._$lightboxContainer.on("click","a:first-child",function(t){return t.preventDefault(),i.navigateLeft()}),this._$lightboxContainer.on("click","a:last-child",function(t){return t.preventDefault(),i.navigateRight()}),this.updateNavigation())),this._$modal.on("show.bs.modal",this._config.onShow.bind(this)).on("shown.bs.modal",function(){return i._toggleLoading(!0),i._handle(),i._config.onShown.call(i)}).on("hide.bs.modal",this._config.onHide.bind(this)).on("hidden.bs.modal",function(){return i._galleryName&&(c(document).off("keydown.ekkoLightbox"),c(window).off("resize.ekkoLightbox")),i._$modal.remove(),i._config.onHidden.call(i)}).modal(this._config),c(window).on("resize.ekkoLightbox",function(){i._resize(i._wantedWidth,i._wantedHeight)}),this._$lightboxContainer.on("touchstart",function(){i._touchstartX=event.changedTouches[0].screenX}).on("touchend",function(){i._touchendX=event.changedTouches[0].screenX,i._swipeGesure()})}return e(n,null,[{key:"Default",get:function(){return l}}]),e(n,[{key:"element",value:function(){return this._$element}},{key:"modal",value:function(){return this._$modal}},{key:"navigateTo",value:function(t){if(t<0||t>this._$galleryItems.length-1)return this;this._galleryIndex=t,this.updateNavigation(),this._$element=c(this._$galleryItems.get(this._galleryIndex)),this._handle()}},{key:"navigateLeft",value:function(){if(this._$galleryItems&&1!==this._$galleryItems.length){if(0===this._galleryIndex){if(!this._config.wrapping)return;this._galleryIndex=this._$galleryItems.length-1}else this._galleryIndex--;return this._config.onNavigate.call(this,"left",this._galleryIndex),this.navigateTo(this._galleryIndex)}}},{key:"navigateRight",value:function(){if(this._$galleryItems&&1!==this._$galleryItems.length){if(this._galleryIndex===this._$galleryItems.length-1){if(!this._config.wrapping)return;this._galleryIndex=0}else this._galleryIndex++;return this._config.onNavigate.call(this,"right",this._galleryIndex),this.navigateTo(this._galleryIndex)}}},{key:"updateNavigation",value:function(){if(!this._config.wrapping){var t=this._$lightboxContainer.find("div.ekko-lightbox-nav-overlay");0===this._galleryIndex?t.find("a:first-child").addClass("disabled"):t.find("a:first-child").removeClass("disabled"),this._galleryIndex===this._$galleryItems.length-1?t.find("a:last-child").addClass("disabled"):t.find("a:last-child").removeClass("disabled")}}},{key:"close",value:function(){return this._$modal.modal("hide")}},{key:"_navigationalBinder",value:function(t){return 39===(t=t||window.event).keyCode?this.navigateRight():37===t.keyCode?this.navigateLeft():void 0}},{key:"_detectRemoteType",value:function(t,e){return!(e=e||!1)&&this._isImage(t)&&(e="image"),!e&&this._getYoutubeId(t)&&(e="youtube"),!e&&this._getVimeoId(t)&&(e="vimeo"),!e&&this._getInstagramId(t)&&(e="instagram"),("audio"==e||"video"==e||!e&&this._isMedia(t))&&(e="media"),(!e||["image","youtube","vimeo","instagram","media","url"].indexOf(e)<0)&&(e="url"),e}},{key:"_getRemoteContentType",value:function(t){return c.ajax({type:"HEAD",url:t,async:!1}).getResponseHeader("Content-Type")}},{key:"_isImage",value:function(t){return t&&t.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)}},{key:"_isMedia",value:function(t){return t&&t.match(/(\.(mp3|mp4|ogg|webm|wav)((\?|#).*)?$)/i)}},{key:"_containerToUse",value:function(){var t=this,e=this._$lightboxBodyTwo,i=this._$lightboxBodyOne;return this._$lightboxBodyTwo.hasClass("in")&&(e=this._$lightboxBodyOne,i=this._$lightboxBodyTwo),i.removeClass("in show"),setTimeout(function(){t._$lightboxBodyTwo.hasClass("in")||t._$lightboxBodyTwo.empty(),t._$lightboxBodyOne.hasClass("in")||t._$lightboxBodyOne.empty()},500),e.addClass("in show"),e}},{key:"_handle",value:function(){var t=this._containerToUse();this._updateTitleAndFooter();var e=this._$element.attr("data-remote")||this._$element.attr("href"),i=this._detectRemoteType(e,this._$element.attr("data-type")||!1);if(["image","youtube","vimeo","instagram","media","url"].indexOf(i)<0)return this._error(this._config.strings.type);switch(i){case"image":this._preloadImage(e,t),this._preloadImageByIndex(this._galleryIndex,3);break;case"youtube":this._showYoutubeVideo(e,t);break;case"vimeo":this._showVimeoVideo(this._getVimeoId(e),t);break;case"instagram":this._showInstagramVideo(this._getInstagramId(e),t);break;case"media":this._showHtml5Media(e,t);break;default:this._loadRemoteContent(e,t)}return this}},{key:"_getYoutubeId",value:function(t){if(!t)return!1;var e=t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);return!(!e||11!==e[2].length)&&e[2]}},{key:"_getVimeoId",value:function(t){return!!(t&&0'),this._resize(i,o),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showVideoIframe",value:function(t,e,i,o){return i=i||e,o.html('
'),this._resize(e,i),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showHtml5Media",value:function(t,e){var i=this._getRemoteContentType(t);if(!i)return this._error(this._config.strings.type);var o="";o=0<'+o+' width="'+a+'" height="'+s+'" preload="auto" autoplay controls class="embed-responsive-item">'+this._config.strings.type+""),this._resize(a,s),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_loadRemoteContent",value:function(t,e){var i=this,o=this._$element.data("width")||560,a=this._$element.data("height")||560,s=this._$element.data("disableExternalCheck")||!1;return this._toggleLoading(!1),s||this._isExternal(t)?(e.html(''),this._config.onContentLoaded.call(this)):e.load(t,c.proxy(function(){return i._$element.trigger("loaded.bs.modal")})),this._$modalArrows&&this._$modalArrows.css("display","none"),this._resize(o,a),this}},{key:"_isExternal",value:function(t){var e=t.match(/^([^:\/?#]+:)?(?:\/\/([^\/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/);return"string"==typeof e[1]&&0");return t.attr("src",a.src),t.addClass("img-fluid"),t.css("width","100%"),e.html(t),i._$modalArrows&&i._$modalArrows.css("display",""),i._resize(a.width,a.height),i._toggleLoading(!1),i._config.onContentLoaded.call(i)},a.onerror=function(){return i._toggleLoading(!1),i._error(i._config.strings.fail+" "+t)}),a.src=t,a}},{key:"_swipeGesure",value:function(){return this._touchendXthis._touchstartX?this.navigateLeft():void 0}},{key:"_resize",value:function(t,e){e=e||t;var i=(this._wantedWidth=t)/(this._wantedHeight=e),o=this._padding.left+this._padding.right+this._border.left+this._border.right,a=575