From a8fd61a781980b45029ebafd7b7ded8cec5109b6 Mon Sep 17 00:00:00 2001 From: nobody Date: Mon, 24 Oct 2022 06:21:44 +0200 Subject: [PATCH] Added: Colorbox v1.6.4 (#1181) --- THIRD_PARTY.txt | 1 + core/mappings.js | 1 + core/resources.js | 4 ++++ modules/internal/targets.js | 2 ++ pages/updates/updates.html | 4 ++++ resources/jquery.colorbox/1.6.4/jquery.colorbox-min.jsm | 6 ++++++ 6 files changed, 18 insertions(+) create mode 100644 resources/jquery.colorbox/1.6.4/jquery.colorbox-min.jsm diff --git a/THIRD_PARTY.txt b/THIRD_PARTY.txt index 3eb7d600..880bbb83 100644 --- a/THIRD_PARTY.txt +++ b/THIRD_PARTY.txt @@ -1176,6 +1176,7 @@ https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js https://cdnjs.cloudflare.com/ajax/libs/jquery-ajax-unobtrusive/3.2.6/jquery.unobtrusive-ajax.min.js https://cdnjs.cloudflare.com/ajax/libs/jquery.blockUI/2.70/jquery.blockUI.min.js +https://cdnjs.cloudflare.com/ajax/libs/jquery.colorbox/1.6.4/jquery.colorbox-min.js https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js https://cdnjs.cloudflare.com/ajax/libs/jquery-csv/1.0.21/jquery.csv.min.js https://cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/2.1.6/core/jquery.cycle2.autoheight.min.js diff --git a/core/mappings.js b/core/mappings.js index f1f79dc0..5302ff28 100644 --- a/core/mappings.js +++ b/core/mappings.js @@ -338,6 +338,7 @@ mappings.cdn = { 'jquery-ajax-unobtrusive/{version}/jquery.unobtrusive-ajax.': resources.jqueryAjaxUnobtrusive, 'jquery.devbridge-autocomplete/{version}/jquery.autocomplete.min.js': resources.jQueryAjaxAutoComplete, 'jquery.blockUI/{version}/jquery.blockUI.min.js': resources.jQueryBlockUI, + 'jquery.colorbox/{version}/jquery.colorbox': resources.jqueryColorbox, 'jquery-csv/{version}/jquery.csv.min.js': resources.jQueryCSV, 'jquery.cycle2/{version}/': resources.jqueryCycle2, 'jquery-easing/{version}/jquery.easing.': resources.jQueryEasing, diff --git a/core/resources.js b/core/resources.js index 92780ea0..402a9bb4 100644 --- a/core/resources.js +++ b/core/resources.js @@ -553,6 +553,10 @@ var resources = { 'jqueryCycle2': { 'path': 'resources/jquery.cycle2/{version}/' }, + // Colorbox + 'jqueryColorbox': { + 'path': 'resources/jquery.colorbox/{version}/jquery.colorbox-min.jsm' + }, // jquery.cookie [Deprecated] 'jqueryCookie': { 'path': 'resources/jquery-cookie/{version}/jquery.cookie.min.jsm' diff --git a/modules/internal/targets.js b/modules/internal/targets.js index 474245cf..df849667 100644 --- a/modules/internal/targets.js +++ b/modules/internal/targets.js @@ -267,6 +267,7 @@ targets.setLastVersion = function (type, version) { } if (type.startsWith('/jquery-ajax-unobtrusive/3.')) return '3.2.6'; if (type.startsWith('/jquery.blockUI/2.')) return '2.70'; + if (type.startsWith('/jquery.colorbox/1.')) return '1.6.4'; if (type.startsWith('/jquery-cookie/1.')) return '1.4.1'; if (type.startsWith('/jquery-csv/1.')) return '1.0.21'; if (type.startsWith('/jquery-easing/1.')) return '1.4.1'; @@ -485,6 +486,7 @@ targets.determineResourceName = function (filename) { }; const ListOfFiles = { + 'jquery.colorbox-min.jsm': 'Colorbox', 'rangeslider.min.css': 'rangeslider.js (CSS)', 'rangeslider.min.jsm': 'rangeslider.js (JS)', 'in-view.min.jsm': 'in-view', diff --git a/pages/updates/updates.html b/pages/updates/updates.html index 641d684b..6522ef9c 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -36,6 +36,10 @@ +

Added

+
diff --git a/resources/jquery.colorbox/1.6.4/jquery.colorbox-min.jsm b/resources/jquery.colorbox/1.6.4/jquery.colorbox-min.jsm new file mode 100644 index 00000000..b5109a26 --- /dev/null +++ b/resources/jquery.colorbox/1.6.4/jquery.colorbox-min.jsm @@ -0,0 +1,6 @@ +/*! + Colorbox 1.6.4 + license: MIT + http://www.jacklmoore.com/colorbox +*/ +(function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-cbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(A+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in x[0]&&!x[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),x.focus())}function c(t){c.str!==t&&(x.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){A=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+te).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),A=W.index(_.el),-1===A&&(W=W.add(_.el),A=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),ae.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!U){U=$=!0,c(_.get("className")),x.css({visibility:"hidden",display:"block",opacity:""}),I=n(se,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(I),j=T.height()+k.height()+b.outerHeight(!0)-b.height(),D=C.width()+H.width()+b.outerWidth(!0)-b.width(),N=I.outerHeight(!0),z=I.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=Math.max((l!==!1?Math.min(h,a(l,"x")):h)-z-D,0),_.h=Math.max((f!==!1?Math.min(s,a(f,"y")):s)-N-j,0),I.css({width:"",height:_.h}),J.position(),u(ee),_.get("onOpen"),O.add(F).hide(),x.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),ae.one(re,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&ae.one(re,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?B.html(_.get("close")).appendTo(b):B.appendTo("
"),w()}}function p(){x||(V=!1,E=t(i),x=n(se).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(se,"Overlay").hide(),L=t([n(se,"LoadingOverlay")[0],n(se,"LoadingGraphic")[0]]),y=n(se,"Wrapper"),b=n(se,"Content").append(F=n(se,"Title"),R=n(se,"Current"),P=t('