Файловый менеджер - Редактировать - /home/harasnat/www/sommer/components/com_spsimpleportfolio/assets/js/featherlight.min.js
Назад
!function(e){"use strict";function t(e,n){if(!(this instanceof t)){var o=new t(e,n);return o.open(),o}this.id=t.id++,this.setup(e,n),this.chainCallbacks(t._callbackChain)}if(void 0!==e){var n=function(e){if(!e.isDefaultPrevented()){var n=t.current();n&&n.onKeyDown(e)}};t.prototype={constructor:t,namespace:"featherlight",targetAttr:"data-featherlight",variant:null,resetCss:!1,background:null,openTrigger:"click",closeTrigger:"click",filter:null,root:"body",openSpeed:250,closeSpeed:250,closeOnClick:"background",closeOnEsc:!0,closeIcon:"✕",otherClose:null,beforeOpen:e.noop,beforeContent:e.noop,beforeClose:e.noop,afterOpen:e.noop,afterContent:e.noop,afterClose:e.noop,onKeyDown:e.noop,type:null,contentFilters:["jquery","image","html","ajax","text"],setup:function(t,n){"object"!=typeof t||t instanceof e!=0||n||(n=t,t=void 0);var o=e.extend(this,n,{target:t}),r=o.resetCss?o.namespace+"-reset":o.namespace,a=e(o.background||['<div class="'+r+'">','<div class="'+r+'-content">','<span class="'+r+"-close-icon "+o.namespace+'-close">',o.closeIcon,"</span>",'<div class="'+o.namespace+'-inner"></div>',"</div>","</div>"].join("")),i="."+o.namespace+"-close"+(o.otherClose?","+o.otherClose:"");return o.$instance=a.clone().addClass(o.variant),o.$instance.on(o.closeTrigger+"."+o.namespace,(function(t){var n=e(t.target);("background"===o.closeOnClick&&n.is("."+o.namespace)||"anywhere"===o.closeOnClick||n.is(i))&&(t.preventDefault(),o.close())})),this},getContent:function(){var t=this,n=this.constructor.contentFilters,o=function(e){return t.$currentTarget&&t.$currentTarget.attr(e)},r=o(t.targetAttr),a=t.target||r||"",i=n[t.type];if(!i&&a in n&&(i=n[a],a=t.target&&r),a=a||o("href")||"",!i)for(var s in n)t[s]&&(i=n[s],a=t[s]);if(!i){var c=a;if(a=null,e.each(t.contentFilters,(function(){return(i=n[this]).test&&(a=i.test(c)),!a&&i.regex&&c.match&&c.match(i.regex)&&(a=c),!a})),!a)return"console"in window&&window.console.error("Featherlight: no content filter found "+(c?' for "'+c+'"':" (no target specified)")),!1}return i.process.call(t,a)},setContent:function(t){var n=this;return(t.is("iframe")||e("iframe",t).length>0)&&n.$instance.addClass(n.namespace+"-iframe"),n.$content=t.addClass(n.namespace+"-inner"),n.$instance.find("."+n.namespace+"-inner").slice(1).remove().end().replaceWith(n.$content),n},open:function(o){var r=this;if(!(o&&o.isDefaultPrevented()||!1===r.beforeOpen(o))){o&&o.preventDefault();var a=r.getContent();if(a)return r.constructor._opened.add(r._openedCallback=function(e,t){r instanceof e&&r.$instance.closest("body").length>0&&(t.currentFeatherlight=r)}),t._keyHandlerInstalled||(e(document).on("keyup."+t.prototype.namespace,n),t._keyHandlerInstalled=!0),r.$instance.appendTo(r.root).fadeIn(r.openSpeed),r.beforeContent(o),e.when(a).done((function(t){r.setContent(t),r.afterContent(o),e.when(r.$instance.promise()).done((function(){r.afterOpen(o)}))})),r}return!1},close:function(o){var r=this;return!1!==r.beforeClose(o)&&(r.constructor._opened.remove(r._openedCallback),t.current()||(e(document).off("keyup."+t.namespace,n),r.constructor._keyHandlerInstalled=!1),void r.$instance.fadeOut(r.closeSpeed,(function(){r.$instance.detach(),r.afterClose(o)})))},chainCallbacks:function(t){for(var n in t)this[n]=e.proxy(t[n],this,e.proxy(this[n],this))}},e.extend(t,{id:0,autoBind:"[data-featherlight]",defaults:t.prototype,contentFilters:{jquery:{regex:/^[#.]\w/,test:function(t){return t instanceof e&&t},process:function(t){return e(t).clone(!0)}},image:{regex:/\.(png|jpg|jpeg|gif|tiff|bmp)(\?\S*)?$/i,process:function(t){var n=this,o=e.Deferred(),r=new Image;return r.onload=function(){o.resolve(e('<img src="'+t+'" alt="" class="'+n.namespace+'-image" />'))},r.onerror=function(){o.reject()},r.src=t,o.promise()}},html:{regex:/^\s*<[\w!][^<]*>/,process:function(t){return e(t)}},ajax:{regex:/./,process:function(t){var n=e.Deferred(),o=e("<div></div>").load(t,(function(e,t){"error"!==t&&n.resolve(o.contents()),n.fail()}));return n.promise()}},text:{process:function(t){return e("<div>",{text:t})}}},functionAttributes:["beforeOpen","afterOpen","beforeContent","afterContent","beforeClose","afterClose"],readElementConfig:function(t){var n=this,o={};return t&&t.attributes&&e.each(t.attributes,(function(){var t=this.name.match(/^data-featherlight-(.*)/);if(t){var r=this.value,a=e.camelCase(t[1]);if(e.inArray(a,n.functionAttributes)>=0)r=new Function(r);else try{r=e.parseJSON(r)}catch(e){}o[a]=r}})),o},extend:function(t,n){var o=function(){this.constructor=t};return o.prototype=this.prototype,t.prototype=new o,t.__super__=this.prototype,e.extend(t,this,n),t.defaults=t.prototype,t},attach:function(t,n,o){var r=this;"object"!=typeof n||n instanceof e!=0||o||(o=n,n=void 0),o=e.extend({},o);var a=e.extend({},r.defaults,r.readElementConfig(t[0]),o);return t.on(a.openTrigger+"."+a.namespace,a.filter,(function(a){var i=e.extend({$source:t,$currentTarget:e(this)},r.readElementConfig(t[0]),r.readElementConfig(this),o);new r(n,i).open(a)})),t},current:function(){var e={};return this._opened.fire(this,e),e.currentFeatherlight},close:function(){var e=this.current();e&&e.close()},_onReady:function(){var t=this;t.autoBind&&(t.attach(e(document),{filter:t.autoBind}),e(t.autoBind).filter("[data-featherlight-filter]").each((function(){t.attach(e(this))})))},_callbackChain:{onKeyDown:function(e,t){return 27===t.keyCode&&this.closeOnEsc?(this.$instance.find("."+this.namespace+"-close:first").click(),void t.preventDefault()):(console.log("pass"),e(t))}},_opened:e.Callbacks()}),e.featherlight=t,e.fn.featherlight=function(e,n){return t.attach(this,e,n)},e(document).ready((function(){t._onReady()}))}else"console"in window&&window.console.info("Too much lightness, Featherlight needs jQuery.")}(jQuery);
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка