Added: jquery-ajax-unobtrusive v3.6.2 (#540)

This commit is contained in:
nobody 2021-06-25 06:34:26 +02:00
parent fa7026d411
commit 79648c2c59
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
6 changed files with 26 additions and 0 deletions

View File

@ -1127,6 +1127,7 @@ https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js
https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js
https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js
https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/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-cookie/1.4.1/jquery.cookie.min.js
https://cdnjs.cloudflare.com/ajax/libs/jquery-csv/1.0.21/jquery.csv.min.js

View File

@ -299,6 +299,7 @@ mappings.cdn = {
'jets/{version}/jets.': resources.jetsJS,
'jquery/{version}/jquery.': resources.jQuery,
'jquery/{version}/jquery.min.': resources.jQuery,
'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-csv/{version}/jquery.csv.min.js': resources.jQueryCSV,

View File

@ -456,6 +456,10 @@ var resources = {
'jQueryBlockUI': {
'path': 'resources/jquery.blockUI/{version}/jquery.blockUI.min.jsm'
},
// jquery-ajax-unobtrusive
'jqueryAjaxUnobtrusive': {
'path': 'resources/jquery-ajax-unobtrusive/{version}/jquery.unobtrusive-ajax.min.jsm'
},
// jquery.cookie [Deprecated]
'jqueryCookie': {
'path': 'resources/jquery-cookie/{version}/jquery.cookie.min.jsm'

View File

@ -344,6 +344,8 @@ targets.setLastVersion = function (type, version) {
if (helpers.compareVersion('1.8.24', version)) return '1.8.24'; // <= v1.8.24
if (helpers.compareVersion('1.10.0', version)) return '1.10.0'; // > v1.8.24 to <= v1.10.0
else return '1.12.1'; // >= 1.8.19
} else if (type.startsWith('/jquery-ajax-unobtrusive/3.')) {
return '3.2.6';
} else if (type.startsWith('/jquery.blockUI/2.')) {
return '2.70';
} else if (type.startsWith('/jquery-cookie/1.')) {
@ -641,6 +643,7 @@ targets.determineResourceName = function (filename) {
};
const ListOfFiles = {
'jquery-ajax-unobtrusive.min.jsm': 'jQuery Unobtrusive Ajax',
'vuex.min.jsm': 'vuex',
'alpine.jsm': 'alpinejs',
'ba-tiny-pubsub.min.jsm': 'jQuery Tiny Pub/Sub',

View File

@ -37,6 +37,7 @@
<li>Updated: bootstrap v5.0.1 -> v5.0.2 (<a href="https://codeberg.org/nobody/LocalCDN/issues/538">#538</a>)</li>
<li>Updated: findify-bundle v7.0.22 -> v7.0.23 (<a href="https://codeberg.org/nobody/LocalCDN/issues/539">#539</a>)</li>
<li>Added: vuex v3.6.2 and v4.0.2 (<a href="https://codeberg.org/nobody/LocalCDN/issues/540">#540</a>)</li>
<li>Added: jquery-ajax-unobtrusive v3.6.2 (<a href="https://codeberg.org/nobody/LocalCDN/issues/540">#540</a>)</li>
</ul>
<div id="generator-section">
<div class="topic-label">

View File

@ -0,0 +1,16 @@
// Unobtrusive Ajax support library for jQuery
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// @version v3.2.6
//
// Microsoft grants you the right to use these script files for the sole
// purpose of either: (i) interacting through your browser with the Microsoft
// website or online service, subject to the applicable licensing or use
// terms; or (ii) using the files as included with a Microsoft product subject
// to that product's license terms. Microsoft reserves all other rights to the
// files not expressly granted by Microsoft, whether by implication, estoppel
// or otherwise. Insofar as a script file is dual licensed under GPL,
// Microsoft neither took the code under GPL nor distributes it thereunder but
// under the terms set out in this paragraph. All notices and licenses
// below are for informational purposes only.
!function(t){function a(t,a){for(var e=window,r=(t||"").split(".");e&&r.length;)e=e[r.shift()];return"function"==typeof e?e:(a.push(t),Function.constructor.apply(null,a))}function e(t){return"GET"===t||"POST"===t}function r(t,a){e(a)||t.setRequestHeader("X-HTTP-Method-Override",a)}function n(a,e,r){var n;r.indexOf("application/x-javascript")===-1&&(n=(a.getAttribute("data-ajax-mode")||"").toUpperCase(),t(a.getAttribute("data-ajax-update")).each(function(a,r){switch(n){case"BEFORE":t(r).prepend(e);break;case"AFTER":t(r).append(e);break;case"REPLACE-WITH":t(r).replaceWith(e);break;default:t(r).html(e)}}))}function i(i,u){var o,c,d,s;if(o=i.getAttribute("data-ajax-confirm"),!o||window.confirm(o)){c=t(i.getAttribute("data-ajax-loading")),s=parseInt(i.getAttribute("data-ajax-loading-duration"),10)||0,t.extend(u,{type:i.getAttribute("data-ajax-method")||void 0,url:i.getAttribute("data-ajax-url")||void 0,cache:"true"===(i.getAttribute("data-ajax-cache")||"").toLowerCase(),beforeSend:function(t){var e;return r(t,d),e=a(i.getAttribute("data-ajax-begin"),["xhr"]).apply(i,arguments),e!==!1&&c.show(s),e},complete:function(){c.hide(s),a(i.getAttribute("data-ajax-complete"),["xhr","status"]).apply(i,arguments)},success:function(t,e,r){n(i,t,r.getResponseHeader("Content-Type")||"text/html"),a(i.getAttribute("data-ajax-success"),["data","status","xhr"]).apply(i,arguments)},error:function(){a(i.getAttribute("data-ajax-failure"),["xhr","status","error"]).apply(i,arguments)}}),u.data.push({name:"X-Requested-With",value:"XMLHttpRequest"}),d=u.type.toUpperCase(),e(d)||(u.type="POST",u.data.push({name:"X-HTTP-Method-Override",value:d}));var p=t(i);if(p.is("form")&&"multipart/form-data"==p.attr("enctype")){var f=new FormData;t.each(u.data,function(t,a){f.append(a.name,a.value)}),t("input[type=file]",p).each(function(){var a=this;t.each(a.files,function(t,e){f.append(a.name,e)})}),t.extend(u,{processData:!1,contentType:!1,data:f})}t.ajax(u)}}function u(a){var e=t(a).data(d);return!e||!e.validate||e.validate()}var o="unobtrusiveAjaxClick",c="unobtrusiveAjaxClickTarget",d="unobtrusiveValidation";t(document).on("click","a[data-ajax=true]",function(t){t.preventDefault(),i(this,{url:this.href,type:"GET",data:[]})}),t(document).on("click","form[data-ajax=true] input[type=image]",function(a){var e=a.target.name,r=t(a.target),n=t(r.parents("form")[0]),i=r.offset();n.data(o,[{name:e+".x",value:Math.round(a.pageX-i.left)},{name:e+".y",value:Math.round(a.pageY-i.top)}]),setTimeout(function(){n.removeData(o)},0)}),t(document).on("click","form[data-ajax=true] :submit",function(a){var e=a.currentTarget.name,r=t(a.target),n=t(r.parents("form")[0]);n.data(o,e?[{name:e,value:a.currentTarget.value}]:[]),n.data(c,r),setTimeout(function(){n.removeData(o),n.removeData(c)},0)}),t(document).on("submit","form[data-ajax=true]",function(a){var e=t(this).data(o)||[],r=t(this).data(c),n=r&&(r.hasClass("cancel")||void 0!==r.attr("formnovalidate"));a.preventDefault(),(n||u(this))&&i(this,{url:this.action,type:this.method||"GET",data:e.concat(t(this).serializeArray())})})}(jQuery);