This is an automated email from the ASF dual-hosted git repository.

gcruz pushed a commit to branch gc/8449
in repository https://gitbox.apache.org/repos/asf/allura.git

commit f54b0219c04fd8bbfb84a9d2d7c2b2218c278f1c
Author: Guillermo Cruz <[email protected]>
AuthorDate: Mon Aug 1 13:23:42 2022 -0600

    [#8449] added jQuery 3.6
---
 Allura/allura/public/nf/js/jquery-3.6.0.min.js     |   3 +
 Allura/allura/public/nf/js/jquery.cookie-1.4.1.js  | 117 +++++++++++++++++++++
 Allura/allura/templates/jinja_master/master.html   |   5 +-
 Allura/allura/templates/login_fragment.html        |   4 +-
 .../templates/phone_verification_fragment.html     |   4 +-
 .../templates_responsive/jinja_master/master.html  |   4 +-
 6 files changed, 133 insertions(+), 4 deletions(-)

diff --git a/Allura/allura/public/nf/js/jquery-3.6.0.min.js 
b/Allura/allura/public/nf/js/jquery-3.6.0.min.js
new file mode 100644
index 000000000..65d6e24d2
--- /dev/null
+++ b/Allura/allura/public/nf/js/jquery-3.6.0.min.js
@@ -0,0 +1,3 @@
+/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | 
jquery.org/license */
+!function(e,t){"use strict";"object"==typeof module&&"object"==typeof 
module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw
 new Error("jQuery requires a window with a document");return 
t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use 
strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return 
t.flat.call(e)}:function(e){return 
t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=
 [...]
+
diff --git a/Allura/allura/public/nf/js/jquery.cookie-1.4.1.js 
b/Allura/allura/public/nf/js/jquery.cookie-1.4.1.js
new file mode 100644
index 000000000..feb62e925
--- /dev/null
+++ b/Allura/allura/public/nf/js/jquery.cookie-1.4.1.js
@@ -0,0 +1,117 @@
+/*!
+ * jQuery Cookie Plugin v1.4.1
+ * https://github.com/carhartl/jquery-cookie
+ *
+ * Copyright 2006, 2014 Klaus Hartl
+ * Released under the MIT license
+ */
+(function (factory) {
+       if (typeof define === 'function' && define.amd) {
+               // AMD
+               define(['jquery'], factory);
+       } else if (typeof exports === 'object') {
+               // CommonJS
+               factory(require('jquery'));
+       } else {
+               // Browser globals
+               factory(jQuery);
+       }
+}(function ($) {
+
+       var pluses = /\+/g;
+
+       function encode(s) {
+               return config.raw ? s : encodeURIComponent(s);
+       }
+
+       function decode(s) {
+               return config.raw ? s : decodeURIComponent(s);
+       }
+
+       function stringifyCookieValue(value) {
+               return encode(config.json ? JSON.stringify(value) : 
String(value));
+       }
+
+       function parseCookieValue(s) {
+               if (s.indexOf('"') === 0) {
+                       // This is a quoted cookie as according to RFC2068, 
unescape...
+                       s = s.slice(1, -1).replace(/\\"/g, 
'"').replace(/\\\\/g, '\\');
+               }
+
+               try {
+                       // Replace server-side written pluses with spaces.
+                       // If we can't decode the cookie, ignore it, it's 
unusable.
+                       // If we can't parse the cookie, ignore it, it's 
unusable.
+                       s = decodeURIComponent(s.replace(pluses, ' '));
+                       return config.json ? JSON.parse(s) : s;
+               } catch(e) {}
+       }
+
+       function read(s, converter) {
+               var value = config.raw ? s : parseCookieValue(s);
+               return $.isFunction(converter) ? converter(value) : value;
+       }
+
+       var config = $.cookie = function (key, value, options) {
+
+               // Write
+
+               if (arguments.length > 1 && !$.isFunction(value)) {
+                       options = $.extend({}, config.defaults, options);
+
+                       if (typeof options.expires === 'number') {
+                               var days = options.expires, t = options.expires 
= new Date();
+                               t.setTime(+t + days * 864e+5);
+                       }
+
+                       return (document.cookie = [
+                               encode(key), '=', stringifyCookieValue(value),
+                               options.expires ? '; expires=' + 
options.expires.toUTCString() : '', // use expires attribute, max-age is not 
supported by IE
+                               options.path    ? '; path=' + options.path : '',
+                               options.domain  ? '; domain=' + options.domain 
: '',
+                               options.secure  ? '; secure' : ''
+                       ].join(''));
+               }
+
+               // Read
+
+               var result = key ? undefined : {};
+
+               // To prevent the for loop in the first place assign an empty 
array
+               // in case there are no cookies at all. Also prevents odd 
result when
+               // calling $.cookie().
+               var cookies = document.cookie ? document.cookie.split('; ') : 
[];
+
+               for (var i = 0, l = cookies.length; i < l; i++) {
+                       var parts = cookies[i].split('=');
+                       var name = decode(parts.shift());
+                       var cookie = parts.join('=');
+
+                       if (key && key === name) {
+                               // If second argument (value) is a function 
it's a converter...
+                               result = read(cookie, value);
+                               break;
+                       }
+
+                       // Prevent storing a cookie that we couldn't decode.
+                       if (!key && (cookie = read(cookie)) !== undefined) {
+                               result[name] = cookie;
+                       }
+               }
+
+               return result;
+       };
+
+       config.defaults = {};
+
+       $.removeCookie = function (key, options) {
+               if ($.cookie(key) === undefined) {
+                       return false;
+               }
+
+               // Must not alter options, thus extending a fresh object...
+               $.cookie(key, '', $.extend({}, options, { expires: -1 }));
+               return !$.cookie(key);
+       };
+
+}));
diff --git a/Allura/allura/templates/jinja_master/master.html 
b/Allura/allura/templates/jinja_master/master.html
index 5c2b15ac3..0e3149ba0 100644
--- a/Allura/allura/templates/jinja_master/master.html
+++ b/Allura/allura/templates/jinja_master/master.html
@@ -22,7 +22,10 @@
 {% if g.theme.jinja_macros %}
     {% import g.theme.jinja_macros as theme_macros with context %}
 {% endif %}
-{% do g.register_forge_js('js/jquery-base.js', location='head_js') %}
+{
+{% do g.register_forge_js('js/jquery-3.6.0.min.js', location='head_js') %}
+{% do g.register_forge_js('js/jquery-migrate-3.4.0.js', location='head_js') %}
+{% do g.register_forge_js('js/jquery.cookie-1.4.1.js', location='head_js') %}
 {% do g.register_forge_js('js/jquery.notify.js') %}
 {% do g.register_forge_js('js/jquery.tooltipster.js') %}
 {% do g.register_forge_js('js/sylvester.js') %}
diff --git a/Allura/allura/templates/login_fragment.html 
b/Allura/allura/templates/login_fragment.html
index 527f1dd6e..5122a91eb 100644
--- a/Allura/allura/templates/login_fragment.html
+++ b/Allura/allura/templates/login_fragment.html
@@ -22,7 +22,9 @@
 {% if g.theme.jinja_macros %}
   {% import g.theme.jinja_macros as theme_macros with context %}
 {% endif %}
-{% do g.register_forge_js('js/jquery-base.js') %}
+{% do g.register_forge_js('js/jquery-3.6.0.min.js', location='head_js') %}
+{% do g.register_forge_js('js/jquery-migrate-3.4.0.js', location='head_js') %}
+{% do g.register_forge_js('js/jquery.cookie-1.4.1.js', location='head_js') %}
 {% do g.register_forge_js('js/allura-base.js') %}
 {% do g.theme.require() %}
 {% do g.resource_manager.register_widgets(c) %}
diff --git a/Allura/allura/templates/phone_verification_fragment.html 
b/Allura/allura/templates/phone_verification_fragment.html
index 28bf7899b..26caacc83 100644
--- a/Allura/allura/templates/phone_verification_fragment.html
+++ b/Allura/allura/templates/phone_verification_fragment.html
@@ -23,7 +23,9 @@
   {% import g.theme.jinja_macros as theme_macros with context %}
 {% endif %}
 {% do lib.register_react_js_files(location='head_js') %}
-{% do g.register_forge_js('js/jquery-base.js', location='head_js') %}
+{% do g.register_forge_js('js/jquery-3.6.0.min.js', location='head_js') %}
+{% do g.register_forge_js('js/jquery-migrate-3.4.0.js', location='head_js') %}
+{% do g.register_forge_js('js/jquery.cookie-1.4.1.js', location='head_js') %}
 {% do g.register_forge_js('js/phone-verification.js', location='body_js_tail') 
%}
 {% do g.theme.require() %}
 {% do g.resource_manager.register_widgets(c) %}
diff --git a/Allura/allura/templates_responsive/jinja_master/master.html 
b/Allura/allura/templates_responsive/jinja_master/master.html
index ecb1290e2..80589d9a1 100644
--- a/Allura/allura/templates_responsive/jinja_master/master.html
+++ b/Allura/allura/templates_responsive/jinja_master/master.html
@@ -22,7 +22,9 @@
 {% if g.theme.jinja_macros %}
     {% import g.theme.jinja_macros as theme_macros with context %}
 {% endif %}
-{% do g.register_forge_js('js/jquery-base.js', location='head_js') %}{# TODO: 
upgrade #}
+{% do g.register_forge_js('js/jquery-3.6.0.min.js', location='head_js') %}
+{% do g.register_forge_js('js/jquery-migrate-3.4.0.js', location='head_js') %}
+{% do g.register_forge_js('js/jquery.cookie-1.4.1.js', location='head_js') %}
 {% do g.register_forge_js('js/foundation.min.js', location='head_js', 
compress=False) %}
 {% do g.register_forge_js('js/jquery.notify.js') %}
 {% do g.register_forge_js('js/jquery.tooltipster.js') %}{#  TODO: use 
foundation #}

Reply via email to