Bugzilla – Attachment 133305 Details for
Bug 30523
Quiet console warning about missing shortcut-buttons map file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30523: Quiet console warning about missing shortcut-buttons map file
Bug-30523-Quiet-console-warning-about-missing-shor.patch (text/plain), 6.84 KB, created by
Owen Leonard
on 2022-04-14 12:05:18 UTC
(
hide
)
Description:
Bug 30523: Quiet console warning about missing shortcut-buttons map file
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2022-04-14 12:05:18 UTC
Size:
6.84 KB
patch
obsolete
>From a8aaa299e4ffd1c96b740acbd57bb30d52c75d2a Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 13 Apr 2022 12:18:13 +0000 >Subject: [PATCH] Bug 30523: Quiet console warning about missing > shortcut-buttons map file > >This patch updates the Flatpickr plugin shortcut-buttons which adds the >"Yesterday," "Today," and "Tomorrow" links to Flatpickr widgets. This >updates it to the latest version, 0.4.0. > >The file is modified in two ways: The version information is added to >the top of the file, and the sourceMappingURL line is removed from the >bottom. This quiets browser console warnings about a missing map file. > >To test, apply the patch and clear your browser cache. > >- Go to Circulation -> Check out and check out to a patron. >- Click "Checkout settings" and click the "Specify due date" field. >- In the pop-up calendar, test all controls, including the shortcut > links, to confirm that everything works as before. >- In the browser console there should be no warning related to > shortcut-buttons-flatpickr. >--- > .../lib/flatpickr/shortcut-buttons-flatpickr.min.js | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/lib/flatpickr/shortcut-buttons-flatpickr.min.js b/koha-tmpl/intranet-tmpl/lib/flatpickr/shortcut-buttons-flatpickr.min.js >index 55c5023eb9..2dea653f24 100644 >--- a/koha-tmpl/intranet-tmpl/lib/flatpickr/shortcut-buttons-flatpickr.min.js >+++ b/koha-tmpl/intranet-tmpl/lib/flatpickr/shortcut-buttons-flatpickr.min.js >@@ -1,2 +1,2 @@ >-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ShortcutButtonsPlugin=e():t.ShortcutButtonsPlugin=e()}(window,function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const o={theme:"light"};e.ShortcutButtonsPlugin=function(t){const e=Object.assign({},o,t);return t=>{let n;function o(n){n.stopPropagation(),n.preventDefault();const o=n.target;if("button"!==o.tagName.toLowerCase()||void 0===e.onClick)return;const r=parseInt(o.dataset.index,10),c=Array.isArray(e.onClick)?e.onClick:[e.onClick];for(const e of c)"function"==typeof e&&e(r,t)}return{onReady:()=>{if((n=document.createElement("div")).classList.add("shortcut-buttons-flatpickr-wrapper",e.theme),void 0!==e.label&&e.label.length){const t=document.createElement("div");t.classList.add("shortcut-buttons-flatpickr-label"),t.textContent=e.label,n.appendChild(t)}const r=document.createElement("div");r.classList.add("shortcut-buttons-flatpickr-buttons"),(Array.isArray(e.button)?e.button:[e.button]).forEach((t,e)=>{const n=document.createElement("button");n.classList.add("shortcut-buttons-flatpickr-button"),n.textContent=t.label,n.dataset.index=String(e),r.appendChild(n)}),n.appendChild(r),t.calendarContainer.appendChild(n),n.addEventListener("click",o)},onDestroy:()=>{n.removeEventListener("click",o),n=void 0}}}}}]).ShortcutButtonsPlugin}); >-//# sourceMappingURL=shortcut-buttons-flatpickr.min.js.map >\ No newline at end of file >+/* shortcut-buttons-flatpickr v0.4.0 https://cdn.jsdelivr.net/npm/shortcut-buttons-flatpickr@0.4.0/dist/shortcut-buttons-flatpickr.min.js */ >+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ShortcutButtonsPlugin=e():t.ShortcutButtonsPlugin=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.ShortcutButtonsPlugin=void 0;var o={theme:"light"},i=new Set(["accesskey","aria-label","class","tabindex"]);e.ShortcutButtonsPlugin=function(t){var e=r(r({},o),t);return function(t){var n;function r(n){n.stopPropagation(),n.preventDefault();var r=n.target;if("button"===r.tagName.toLowerCase()&&void 0!==e.onClick)for(var o=parseInt(r.dataset.index,10),i=0,a=Array.isArray(e.onClick)?e.onClick:[e.onClick];i<a.length;i++){var u=a[i];"function"==typeof u&&u(o,t)}}function o(e){var n=e.target;"Tab"===e.key&&"button"===n.tagName.toLowerCase()&&(e.shiftKey&&!n.previousSibling||!e.shiftKey&&!n.nextSibling)&&(e.preventDefault(),t.element.focus())}return{onReady:function(){if((n=document.createElement("div")).classList.add("shortcut-buttons-flatpickr-wrapper",e.theme),void 0!==e.label&&e.label.length){var a=document.createElement("div");a.classList.add("shortcut-buttons-flatpickr-label"),a.textContent=e.label,n.appendChild(a)}var u=document.createElement("div");u.classList.add("shortcut-buttons-flatpickr-buttons"),(Array.isArray(e.button)?e.button:[e.button]).forEach((function(e,n){var r=document.createElement("button");r.type="button",r.classList.add("shortcut-buttons-flatpickr-button"),r.textContent=e.label,r.dataset.index=String(n),void 0!==e.attributes&&function(t,e){Object.keys(e).filter((function(t){return i.has(t)})).forEach((function(n){var r;"class"!==n?t.setAttribute(n,e[n]):(r=t.classList).add.apply(r,e[n].split(" "))}))}(r,e.attributes),u.appendChild(r),t.pluginElements.push(r)})),n.appendChild(u),t.calendarContainer.appendChild(n),n.addEventListener("click",r),n.addEventListener("keydown",o)},onDestroy:function(){n.removeEventListener("keydown",o),n.removeEventListener("click",r),n=void 0}}}}}]).ShortcutButtonsPlugin})); >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30523
:
133305
|
135009
|
135012