From 5921272c8a07685e017e2a1c06609dbc0f81ed70 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Sat, 28 Jan 2017 22:35:27 +0000 Subject: [PATCH] Update jquery.cookie 1.0 (21349d9) to JS-Cookie 2.1.3 (c1aa987). --- CHANGES.md | 1 + gui/slick/js/lib/jquery.cookie.js | 47 ------------------------------- gui/slick/js/lib/js.cookie.min.js | 11 ++++++++ 3 files changed, 12 insertions(+), 47 deletions(-) delete mode 100644 gui/slick/js/lib/jquery.cookie.js create mode 100644 gui/slick/js/lib/js.cookie.min.js diff --git a/CHANGES.md b/CHANGES.md index f63d925f..931c931a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -28,6 +28,7 @@ * Update xmltodict library 0.9.2 (eac0031) to 0.10.2 (375d3a6) * Update Bootstrap 3.2.0 to 3.3.7 * Update Bootstrap Hover Dropdown 2.0.11 to 2.2.1 +* Update jquery.cookie 1.0 (21349d9) to JS-Cookie 2.1.3 (c1aa987) [develop changelog] diff --git a/gui/slick/js/lib/jquery.cookie.js b/gui/slick/js/lib/jquery.cookie.js deleted file mode 100644 index dc031611..00000000 --- a/gui/slick/js/lib/jquery.cookie.js +++ /dev/null @@ -1,47 +0,0 @@ -/** - * jQuery Cookie plugin - * - * Copyright (c) 2010 Klaus Hartl (stilbuero.de) - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - * - */ -(function($) { - $.cookie = function(key, value, options) { - - // key and at least value given, set cookie... - if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) { - options = $.extend({}, options); - - if (value === null || value === undefined) { - options.expires = -1; - } - - if (typeof options.expires === 'number') { - var days = options.expires, t = options.expires = new Date(); - t.setDate(t.getDate() + days); - } - - value = String(value); - - return (document.cookie = [ - encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(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('')); - } - - // key and possibly options given, get cookie... - options = value || {}; - var decode = options.raw ? function(s) { return s; } : decodeURIComponent; - - var pairs = document.cookie.split('; '); - for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) { - if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined - } - return null; - }; -})(jQuery); diff --git a/gui/slick/js/lib/js.cookie.min.js b/gui/slick/js/lib/js.cookie.min.js new file mode 100644 index 00000000..b09fd702 --- /dev/null +++ b/gui/slick/js/lib/js.cookie.min.js @@ -0,0 +1,11 @@ +/* + JavaScript Cookie v2.1.3 + https://github.com/js-cookie/js-cookie + + Copyright 2006, 2015 Klaus Hartl & Fagner Brack + Released under the MIT license +*/ +(function(m){var h=!1;"function"===typeof define&&define.amd&&(define(m),h=!0);"object"===typeof exports&&(module.exports=m(),h=!0);if(!h){var e=window.Cookies,a=window.Cookies=m();a.noConflict=function(){window.Cookies=e;return a}}})(function(){function m(){for(var e=0,a={};e