diff --git a/themes/grav/app/utils/tabs-memory.js b/themes/grav/app/utils/tabs-memory.js index 5aa560c5..e4f5f2e6 100644 --- a/themes/grav/app/utils/tabs-memory.js +++ b/themes/grav/app/utils/tabs-memory.js @@ -4,11 +4,11 @@ import { Instance as Editors } from '../forms/fields/editor'; let Data = JSON.parse(Cookies.get('grav-tabs-state') || '{}'); -$('body').on('touchstart click', '[name^="tab-"]', (event) => { +$('body').on('touchstart click', '[data-tabid]', (event) => { event && event.stopPropagation(); let target = $(event.currentTarget); - Data[target.attr('name')] = target.val(); + Data[target.data('tabkey')] = target.data('scope'); Cookies.set('grav-tabs-state', JSON.stringify(Data), { expires: Infinity }); Editors.editors.each((index, editor) => { @@ -18,4 +18,12 @@ $('body').on('touchstart click', '[name^="tab-"]', (event) => { codemirror.refresh(); } }); + + const panel = $(`[id="${target.data('tabid')}"]`); + + target.siblings('[data-tabid]').removeClass('active'); + target.addClass('active'); + + panel.siblings('[id]').removeClass('active'); + panel.addClass('active'); }); diff --git a/themes/grav/js/admin.min.js b/themes/grav/js/admin.min.js index d7aa6cdf..87fda88c 100644 --- a/themes/grav/js/admin.min.js +++ b/themes/grav/js/admin.min.js @@ -23,6 +23,6 @@ icons:{time:"fa fa-clock-o",date:"fa fa-calendar-o",up:"fa fa-chevron-up",down:" * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE * @version 4.1.0 */ -!function(e,n){t.exports=n()}(this,function(){"use strict";function t(t){return"function"==typeof t||"object"==typeof t&&null!==t}function r(t){return"function"==typeof t}function a(t){Y=t}function o(t){J=t}function s(){return function(){return e.nextTick(d)}}function c(){return"undefined"!=typeof $?function(){$(d)}:f()}function u(){var t=0,e=new Z(d),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function l(){var t=new MessageChannel;return t.port1.onmessage=d,function(){return t.port2.postMessage(0)}}function f(){var t=setTimeout;return function(){return t(d,1)}}function d(){for(var t=0;t-1&&(t=t.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),t}var i=n(307);t.exports=r},function(t,e,n){function r(t){return t=i(t),t.replace(a,"")}var i=n(307),a=/[^\x20\x2D0-9A-Z\x5Fa-z\xC0-\xD6\xD8-\xF6\xF8-\xFF]/g;t.exports=r},function(t,e,n){function r(t){return t=i(t),t.toUpperCase()}var i=n(307);t.exports=r},function(t,e,n){function r(t){return t=i(t),t.toLowerCase()}var i=n(307);t.exports=r},function(t,e,n){function r(t,e,n){return t=i(t),e=i(e),t.indexOf(e,n)!==-1}var i=n(307);t.exports=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(1),a=r(i),o=n(553),s=r(o);(0,a.default)(document).on("mousedown",'[data-remodal-target="theme-switch-warn"]',function(t){var e=(0,a.default)(t.target).closest("[data-gpm-theme]").find(".gpm-name a:first").text(),n=(0,a.default)(".remodal.theme-switcher");n.find("strong").text(e),n.find(".button.continue").attr("href",(0,a.default)(t.target).attr("href"))}),(0,a.default)(document).on("click",'[data-theme-action="remove-package"]',function(t){s.default.handleRemovingPackage("theme",t)}),(0,a.default)(document).on("click",'[data-theme-action="reinstall-package"]',function(t){s.default.handleReinstallPackage("theme",t)}),(0,a.default)(document).on("click",'[data-theme-action="remove-dependency-package"]',function(t){s.default.handleRemovingDependency("theme",t)}),(0,a.default)(document).on("click",'[data-theme-action="start-package-installation"]',function(t){s.default.handleGettingPackageDependencies("theme",t,"install")}),(0,a.default)(document).on("click",'[data-theme-action="start-packages-update"]',function(t){s.default.handleGettingPackageDependencies("theme",t)}),(0,a.default)(document).on("click",'[data-theme-action="install-dependencies-and-package"]',function(t){s.default.handleInstallingDependenciesAndPackage("theme",t)}),(0,a.default)(document).on("click",'[data-theme-action="install-package"]',function(t){s.default.handleInstallingPackage("theme",t)})},,,,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(1),a=r(i),o=n(567),s=r(o),c=n(359),u=JSON.parse(s.default.get("grav-tabs-state")||"{}");(0,a.default)("body").on("touchstart click",'[name^="tab-"]',function(t){t&&t.stopPropagation();var e=(0,a.default)(t.currentTarget);u[e.attr("name")]=e.val(),s.default.set("grav-tabs-state",JSON.stringify(u),{expires:1/0}),c.Instance.editors.each(function(t,e){var n=(0,a.default)(e).data("codemirror");n&&0===n.display.lastWrapWidth&&n.refresh()})})},function(t,e,n){var r;!function(i,a){"use strict";var o=function(t){if("object"!=typeof t.document)throw new Error("Cookies.js requires a `window` with a `document` object");var e=function(t,n,r){return 1===arguments.length?e.get(t):e.set(t,n,r)};return e._document=t.document,e._cacheKeyPrefix="cookey.",e._maxExpireDate=new Date("Fri, 31 Dec 9999 23:59:59 UTC"),e.defaults={path:"/",secure:!1},e.get=function(t){e._cachedDocumentCookie!==e._document.cookie&&e._renewCache();var n=e._cache[e._cacheKeyPrefix+t];return n===a?a:decodeURIComponent(n)},e.set=function(t,n,r){return r=e._getExtendedOptions(r),r.expires=e._getExpiresDate(n===a?-1:r.expires),e._document.cookie=e._generateCookieString(t,n,r),e},e.expire=function(t,n){return e.set(t,a,n)},e._getExtendedOptions=function(t){return{path:t&&t.path||e.defaults.path,domain:t&&t.domain||e.defaults.domain,expires:t&&t.expires||e.defaults.expires,secure:t&&t.secure!==a?t.secure:e.defaults.secure}},e._isValidDate=function(t){return"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t.getTime())},e._getExpiresDate=function(t,n){if(n=n||new Date,"number"==typeof t?t=t===1/0?e._maxExpireDate:new Date(n.getTime()+1e3*t):"string"==typeof t&&(t=new Date(t)),t&&!e._isValidDate(t))throw new Error("`expires` parameter cannot be converted to a valid Date instance");return t},e._generateCookieString=function(t,e,n){t=t.replace(/[^#$&+\^`|]/g,encodeURIComponent),t=t.replace(/\(/g,"%28").replace(/\)/g,"%29"),e=(e+"").replace(/[^!#$&-+\--:<-\[\]-~]/g,encodeURIComponent),n=n||{};var r=t+"="+e;return r+=n.path?";path="+n.path:"",r+=n.domain?";domain="+n.domain:"",r+=n.expires?";expires="+n.expires.toUTCString():"",r+=n.secure?";secure":""},e._getCacheFromString=function(t){for(var n={},r=t?t.split("; "):[],i=0;i=0?c(u):r(this.length)-c(s(u)),e=u;e0?1:-1}},function(t,e,n){"use strict";t.exports=n(581)()?Object.setPrototypeOf:n(582)},function(t,e){"use strict";var n=Object.create,r=Object.getPrototypeOf,i={};t.exports=function(){var t=Object.setPrototypeOf,e=arguments[0]||n;return"function"==typeof t&&r(t(e(null),i))===i}},function(t,e,n){"use strict";var r,i=n(583),a=n(573),o=Object.prototype.isPrototypeOf,s=Object.defineProperty,c={configurable:!0,enumerable:!1,writable:!0,value:void 0};r=function(t,e){if(a(t),null===e||i(e))return t;throw new TypeError("Prototype must be null or an object")},t.exports=function(t){var e,n;return t?(2===t.level?t.set?(n=t.set,e=function(t,e){return n.call(r(t,e),e),t}):e=function(t,e){return r(t,e).__proto__=e,t}:e=function t(e,n){var i;return r(e,n),i=o.call(t.nullPolyfill,e),i&&delete t.nullPolyfill.__proto__,null===n&&(n=t.nullPolyfill),e.__proto__=n,i&&s(t.nullPolyfill,"__proto__",c),e},Object.defineProperty(e,"level",{configurable:!1,enumerable:!1,writable:!1,value:t.level})):null}(function(){var t,e=Object.create(null),n={},r=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(r){try{t=r.set,t.call(e,n)}catch(t){}if(Object.getPrototypeOf(e)===n)return{set:t,level:2}}return e.__proto__=n,Object.getPrototypeOf(e)===n?{level:2}:(e={},e.__proto__=n,Object.getPrototypeOf(e)===n&&{level:1})}()),n(584)},function(t,e){"use strict";var n={function:!0,object:!0};t.exports=function(t){return null!=t&&n[typeof t]||!1}},function(t,e,n){"use strict";var r,i=Object.create;n(581)()||(r=n(582)),t.exports=function(){var t,e,n;return r?1!==r.level?i:(t={},e={},n={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(t){return"__proto__"===t?void(e[t]={configurable:!0,enumerable:!1,writable:!0,value:void 0}):void(e[t]=n)}),Object.defineProperties(t,e),Object.defineProperty(r,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:t}),function(e,n){return i(null===e?t:e,n)}):i}()},function(t,e){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,e,n){"use strict";var r,i=n(587),a=n(593),o=n(594),s=n(595);r=t.exports=function(t,e){var n,r,o,c,u;return arguments.length<2||"string"!=typeof t?(c=e,e=t,t=null):c=arguments[2],null==t?(n=o=!0,r=!1):(n=s.call(t,"c"),r=s.call(t,"e"),o=s.call(t,"w")),u={value:e,configurable:n,enumerable:r,writable:o},c?i(a(c),u):u},r.gs=function(t,e,n){var r,c,u,l;return"string"!=typeof t?(u=n,n=e,e=t,t=null):u=arguments[3],null==e?e=void 0:o(e)?null==n?n=void 0:o(n)||(u=n,n=void 0):(u=e,e=n=void 0),null==t?(r=!0,c=!1):(r=s.call(t,"c"),c=s.call(t,"e")),l={get:e,set:n,configurable:r,enumerable:c},u?i(a(u),l):l}},function(t,e,n){"use strict";t.exports=n(588)()?Object.assign:n(589)},function(t,e){"use strict";t.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},function(t,e,n){"use strict";var r=n(590),i=n(573),a=Math.max;t.exports=function(t,e){var n,o,s,c=a(arguments.length,2);for(t=Object(i(t)),s=function(r){try{t[r]=e[r]}catch(t){n||(n=t)}},o=1;o-1}},function(t,e,n){"use strict";var r,i,a,o,s,c,u,l=n(586),f=n(585),d=Function.prototype.apply,h=Function.prototype.call,p=Object.create,m=Object.defineProperty,v=Object.defineProperties,g=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};r=function(t,e){var n;return f(e),g.call(this,"__ee__")?n=this.__ee__:(n=y.value=p(null),m(this,"__ee__",y),y.value=null),n[t]?"object"==typeof n[t]?n[t].push(e):n[t]=[n[t],e]:n[t]=e,this},i=function(t,e){var n,i;return f(e),i=this,r.call(this,t,n=function(){a.call(i,t,n),d.call(e,this,arguments)}),n.__eeOnceListener__=e,this},a=function(t,e){var n,r,i,a;if(f(e),!g.call(this,"__ee__"))return this;if(n=this.__ee__,!n[t])return this;if(r=n[t],"object"==typeof r)for(a=0;i=r[a];++a)i!==e&&i.__eeOnceListener__!==e||(2===r.length?n[t]=r[a?0:1]:r.splice(a,1));else r!==e&&r.__eeOnceListener__!==e||delete n[t];return this},o=function(t){var e,n,r,i,a;if(g.call(this,"__ee__")&&(i=this.__ee__[t]))if("object"==typeof i){for(n=arguments.length,a=new Array(n-1),e=1;e=55296&&v<=56319&&(m+=t[++h])),c.call(e,g,m,f),!d);++h);}},function(t,e,n){"use strict";var r=n(606),i=n(607),a=n(610),o=n(617),s=n(604),c=n(599).iterator;t.exports=function(t){return"function"==typeof s(t)[c]?t[c]():r(t)?new a(t):i(t)?new o(t):new a(t)}},function(t,e,n){"use strict";var r,i=n(580),a=n(595),o=n(586),s=n(611),c=Object.defineProperty;r=t.exports=function(t,e){return this instanceof r?(s.call(this,t),e=e?a.call(e,"key+value")?"key+value":a.call(e,"key")?"key":"value":"value",void c(this,"__kind__",o("",e))):new r(t,e)},i&&i(r,s),r.prototype=Object.create(s.prototype,{constructor:o(r),_resolve:o(function(t){return"value"===this.__kind__?this.__list__[t]:"key+value"===this.__kind__?[t,this.__list__[t]]:t}),toString:o(function(){return"[object Array Iterator]"})})},function(t,e,n){"use strict";var r,i=n(572),a=n(587),o=n(585),s=n(573),c=n(586),u=n(612),l=n(599),f=Object.defineProperty,d=Object.defineProperties;t.exports=r=function(t,e){return this instanceof r?(d(this,{__list__:c("w",s(t)),__context__:c("w",e),__nextIndex__:c("w",0)}),void(e&&(o(e.on),e.on("_add",this._onAdd),e.on("_delete",this._onDelete),e.on("_clear",this._onClear)))):new r(t,e)},d(r.prototype,a({constructor:c(r),_next:c(function(){var t;if(this.__list__)return this.__redo__&&(t=this.__redo__.shift(),void 0!==t)?t:this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__)return void f(this,"__redo__",c("c",[t]));this.__redo__.forEach(function(e,n){e>=t&&(this.__redo__[n]=++e)},this),this.__redo__.push(t)}}),_onDelete:c(function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(e=this.__redo__.indexOf(t),e!==-1&&this.__redo__.splice(e,1),this.__redo__.forEach(function(e,n){e>t&&(this.__redo__[n]=--e)},this)))}),_onClear:c(function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0})}))),f(r.prototype,l.iterator,c(function(){return this})),f(r.prototype,l.toStringTag,c("","Iterator"))},function(t,e,n){"use strict";var r,i=n(613),a=n(614),o=n(585),s=n(573),c=Function.prototype.bind,u=Object.defineProperty,l=Object.prototype.hasOwnProperty;r=function(t,e,n){var r,a=s(e)&&o(e.value);return r=i(e),delete r.writable,delete r.value,r.get=function(){return l.call(this,t)?a:(e.value=c.call(a,null==n?this:this[n]),u(this,t,e),this[t])},r},t.exports=function(t){var e=arguments[1];return a(t,function(t,n){return r(n,t,e)})}},function(t,e,n){"use strict"; -var r=n(587),i=n(573);t.exports=function(t){var e=Object(i(t));return e!==t?e:r({},t)}},function(t,e,n){"use strict";var r=n(585),i=n(615),a=Function.prototype.call;t.exports=function(t,e){var n={},o=arguments[2];return r(e),i(t,function(t,r,i,s){n[r]=a.call(e,o,t,r,i,s)}),n}},function(t,e,n){"use strict";t.exports=n(616)("forEach")},function(t,e,n){"use strict";var r=n(585),i=n(573),a=Function.prototype.bind,o=Function.prototype.call,s=Object.keys,c=Object.prototype.propertyIsEnumerable;t.exports=function(t,e){return function(n,u){var l,f=arguments[2],d=arguments[3];return n=Object(i(n)),r(u),l=s(n),d&&l.sort("function"==typeof d?a.call(d,n):void 0),"function"!=typeof t&&(t=l[t]),o.call(t,l,function(t,r){return c.call(n,t)?o.call(u,f,n[t],t,n,r):e})}}},function(t,e,n){"use strict";var r,i=n(580),a=n(586),o=n(611),s=Object.defineProperty;r=t.exports=function(t){return this instanceof r?(t=String(t),o.call(this,t),void s(this,"__length__",a("",t.length))):new r(t)},i&&i(r,o),r.prototype=Object.create(o.prototype,{constructor:a(r),_next:a(function(){if(this.__list__)return this.__nextIndex__=55296&&e<=56319?n+this.__list__[this.__nextIndex__++]:n)}),toString:a(function(){return"[object String Iterator]"})})},function(t,e,n){"use strict";var r,i=n(580),a=n(586),o=n(611),s=n(599).toStringTag,c=n(619),u=Object.defineProperties,l=o.prototype._unBind;r=t.exports=function(t,e){return this instanceof r?(o.call(this,t.__mapKeysData__,t),e&&c[e]||(e="key+value"),void u(this,{__kind__:a("",e),__values__:a("w",t.__mapValuesData__)})):new r(t,e)},i&&i(r,o),r.prototype=Object.create(o.prototype,{constructor:a(r),_resolve:a(function(t){return"value"===this.__kind__?this.__values__[t]:"key"===this.__kind__?this.__list__[t]:[this.__list__[t],this.__values__[t]]}),_unBind:a(function(){this.__values__=null,l.call(this)}),toString:a(function(){return"[object Map Iterator]"})}),Object.defineProperty(r.prototype,s,a("c","Map Iterator"))},function(t,e,n){"use strict";t.exports=n(620)("key","value","key+value")},function(t,e){"use strict";var n=Array.prototype.forEach,r=Object.create;t.exports=function(t){var e=r(null);return n.call(arguments,function(t){e[t]=!0}),e}},function(t,e){"use strict";t.exports=function(){return"undefined"!=typeof Map&&"[object Map]"===Object.prototype.toString.call(new Map)}()}]); +!function(e,n){t.exports=n()}(this,function(){"use strict";function t(t){return"function"==typeof t||"object"==typeof t&&null!==t}function r(t){return"function"==typeof t}function a(t){Y=t}function o(t){J=t}function s(){return function(){return e.nextTick(d)}}function c(){return"undefined"!=typeof $?function(){$(d)}:f()}function u(){var t=0,e=new Z(d),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function l(){var t=new MessageChannel;return t.port1.onmessage=d,function(){return t.port2.postMessage(0)}}function f(){var t=setTimeout;return function(){return t(d,1)}}function d(){for(var t=0;t-1&&(t=t.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),t}var i=n(307);t.exports=r},function(t,e,n){function r(t){return t=i(t),t.replace(a,"")}var i=n(307),a=/[^\x20\x2D0-9A-Z\x5Fa-z\xC0-\xD6\xD8-\xF6\xF8-\xFF]/g;t.exports=r},function(t,e,n){function r(t){return t=i(t),t.toUpperCase()}var i=n(307);t.exports=r},function(t,e,n){function r(t){return t=i(t),t.toLowerCase()}var i=n(307);t.exports=r},function(t,e,n){function r(t,e,n){return t=i(t),e=i(e),t.indexOf(e,n)!==-1}var i=n(307);t.exports=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(1),a=r(i),o=n(553),s=r(o);(0,a.default)(document).on("mousedown",'[data-remodal-target="theme-switch-warn"]',function(t){var e=(0,a.default)(t.target).closest("[data-gpm-theme]").find(".gpm-name a:first").text(),n=(0,a.default)(".remodal.theme-switcher");n.find("strong").text(e),n.find(".button.continue").attr("href",(0,a.default)(t.target).attr("href"))}),(0,a.default)(document).on("click",'[data-theme-action="remove-package"]',function(t){s.default.handleRemovingPackage("theme",t)}),(0,a.default)(document).on("click",'[data-theme-action="reinstall-package"]',function(t){s.default.handleReinstallPackage("theme",t)}),(0,a.default)(document).on("click",'[data-theme-action="remove-dependency-package"]',function(t){s.default.handleRemovingDependency("theme",t)}),(0,a.default)(document).on("click",'[data-theme-action="start-package-installation"]',function(t){s.default.handleGettingPackageDependencies("theme",t,"install")}),(0,a.default)(document).on("click",'[data-theme-action="start-packages-update"]',function(t){s.default.handleGettingPackageDependencies("theme",t)}),(0,a.default)(document).on("click",'[data-theme-action="install-dependencies-and-package"]',function(t){s.default.handleInstallingDependenciesAndPackage("theme",t)}),(0,a.default)(document).on("click",'[data-theme-action="install-package"]',function(t){s.default.handleInstallingPackage("theme",t)})},,,,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=n(1),a=r(i),o=n(567),s=r(o),c=n(359),u=JSON.parse(s.default.get("grav-tabs-state")||"{}");(0,a.default)("body").on("touchstart click","[data-tabid]",function(t){t&&t.stopPropagation();var e=(0,a.default)(t.currentTarget);u[e.data("tabkey")]=e.data("scope"),s.default.set("grav-tabs-state",JSON.stringify(u),{expires:1/0}),c.Instance.editors.each(function(t,e){var n=(0,a.default)(e).data("codemirror");n&&0===n.display.lastWrapWidth&&n.refresh()});var n=(0,a.default)('[id="'+e.data("tabid")+'"]');e.siblings("[data-tabid]").removeClass("active"),e.addClass("active"),n.siblings("[id]").removeClass("active"),n.addClass("active")})},function(t,e,n){var r;!function(i,a){"use strict";var o=function(t){if("object"!=typeof t.document)throw new Error("Cookies.js requires a `window` with a `document` object");var e=function(t,n,r){return 1===arguments.length?e.get(t):e.set(t,n,r)};return e._document=t.document,e._cacheKeyPrefix="cookey.",e._maxExpireDate=new Date("Fri, 31 Dec 9999 23:59:59 UTC"),e.defaults={path:"/",secure:!1},e.get=function(t){e._cachedDocumentCookie!==e._document.cookie&&e._renewCache();var n=e._cache[e._cacheKeyPrefix+t];return n===a?a:decodeURIComponent(n)},e.set=function(t,n,r){return r=e._getExtendedOptions(r),r.expires=e._getExpiresDate(n===a?-1:r.expires),e._document.cookie=e._generateCookieString(t,n,r),e},e.expire=function(t,n){return e.set(t,a,n)},e._getExtendedOptions=function(t){return{path:t&&t.path||e.defaults.path,domain:t&&t.domain||e.defaults.domain,expires:t&&t.expires||e.defaults.expires,secure:t&&t.secure!==a?t.secure:e.defaults.secure}},e._isValidDate=function(t){return"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t.getTime())},e._getExpiresDate=function(t,n){if(n=n||new Date,"number"==typeof t?t=t===1/0?e._maxExpireDate:new Date(n.getTime()+1e3*t):"string"==typeof t&&(t=new Date(t)),t&&!e._isValidDate(t))throw new Error("`expires` parameter cannot be converted to a valid Date instance");return t},e._generateCookieString=function(t,e,n){t=t.replace(/[^#$&+\^`|]/g,encodeURIComponent),t=t.replace(/\(/g,"%28").replace(/\)/g,"%29"),e=(e+"").replace(/[^!#$&-+\--:<-\[\]-~]/g,encodeURIComponent),n=n||{};var r=t+"="+e;return r+=n.path?";path="+n.path:"",r+=n.domain?";domain="+n.domain:"",r+=n.expires?";expires="+n.expires.toUTCString():"",r+=n.secure?";secure":""},e._getCacheFromString=function(t){for(var n={},r=t?t.split("; "):[],i=0;i=0?c(u):r(this.length)-c(s(u)),e=u;e0?1:-1}},function(t,e,n){"use strict";t.exports=n(581)()?Object.setPrototypeOf:n(582)},function(t,e){"use strict";var n=Object.create,r=Object.getPrototypeOf,i={};t.exports=function(){var t=Object.setPrototypeOf,e=arguments[0]||n;return"function"==typeof t&&r(t(e(null),i))===i}},function(t,e,n){"use strict";var r,i=n(583),a=n(573),o=Object.prototype.isPrototypeOf,s=Object.defineProperty,c={configurable:!0,enumerable:!1,writable:!0,value:void 0};r=function(t,e){if(a(t),null===e||i(e))return t;throw new TypeError("Prototype must be null or an object")},t.exports=function(t){var e,n;return t?(2===t.level?t.set?(n=t.set,e=function(t,e){return n.call(r(t,e),e),t}):e=function(t,e){return r(t,e).__proto__=e,t}:e=function t(e,n){var i;return r(e,n),i=o.call(t.nullPolyfill,e),i&&delete t.nullPolyfill.__proto__,null===n&&(n=t.nullPolyfill),e.__proto__=n,i&&s(t.nullPolyfill,"__proto__",c),e},Object.defineProperty(e,"level",{configurable:!1,enumerable:!1,writable:!1,value:t.level})):null}(function(){var t,e=Object.create(null),n={},r=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(r){try{t=r.set,t.call(e,n)}catch(t){}if(Object.getPrototypeOf(e)===n)return{set:t,level:2}}return e.__proto__=n,Object.getPrototypeOf(e)===n?{level:2}:(e={},e.__proto__=n,Object.getPrototypeOf(e)===n&&{level:1})}()),n(584)},function(t,e){"use strict";var n={function:!0,object:!0};t.exports=function(t){return null!=t&&n[typeof t]||!1}},function(t,e,n){"use strict";var r,i=Object.create;n(581)()||(r=n(582)),t.exports=function(){var t,e,n;return r?1!==r.level?i:(t={},e={},n={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(t){return"__proto__"===t?void(e[t]={configurable:!0,enumerable:!1,writable:!0,value:void 0}):void(e[t]=n)}),Object.defineProperties(t,e),Object.defineProperty(r,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:t}),function(e,n){return i(null===e?t:e,n)}):i}()},function(t,e){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,e,n){"use strict";var r,i=n(587),a=n(593),o=n(594),s=n(595);r=t.exports=function(t,e){var n,r,o,c,u;return arguments.length<2||"string"!=typeof t?(c=e,e=t,t=null):c=arguments[2],null==t?(n=o=!0,r=!1):(n=s.call(t,"c"),r=s.call(t,"e"),o=s.call(t,"w")),u={value:e,configurable:n,enumerable:r,writable:o},c?i(a(c),u):u},r.gs=function(t,e,n){var r,c,u,l;return"string"!=typeof t?(u=n,n=e,e=t,t=null):u=arguments[3],null==e?e=void 0:o(e)?null==n?n=void 0:o(n)||(u=n,n=void 0):(u=e,e=n=void 0),null==t?(r=!0,c=!1):(r=s.call(t,"c"),c=s.call(t,"e")),l={get:e,set:n,configurable:r,enumerable:c},u?i(a(u),l):l}},function(t,e,n){"use strict";t.exports=n(588)()?Object.assign:n(589)},function(t,e){"use strict";t.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},function(t,e,n){"use strict";var r=n(590),i=n(573),a=Math.max;t.exports=function(t,e){var n,o,s,c=a(arguments.length,2);for(t=Object(i(t)),s=function(r){try{t[r]=e[r]}catch(t){n||(n=t)}},o=1;o-1}},function(t,e,n){"use strict";var r,i,a,o,s,c,u,l=n(586),f=n(585),d=Function.prototype.apply,h=Function.prototype.call,p=Object.create,m=Object.defineProperty,v=Object.defineProperties,g=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};r=function(t,e){var n;return f(e),g.call(this,"__ee__")?n=this.__ee__:(n=y.value=p(null),m(this,"__ee__",y),y.value=null),n[t]?"object"==typeof n[t]?n[t].push(e):n[t]=[n[t],e]:n[t]=e,this},i=function(t,e){var n,i;return f(e),i=this,r.call(this,t,n=function(){a.call(i,t,n),d.call(e,this,arguments)}),n.__eeOnceListener__=e,this},a=function(t,e){var n,r,i,a;if(f(e),!g.call(this,"__ee__"))return this;if(n=this.__ee__,!n[t])return this;if(r=n[t],"object"==typeof r)for(a=0;i=r[a];++a)i!==e&&i.__eeOnceListener__!==e||(2===r.length?n[t]=r[a?0:1]:r.splice(a,1));else r!==e&&r.__eeOnceListener__!==e||delete n[t];return this},o=function(t){var e,n,r,i,a;if(g.call(this,"__ee__")&&(i=this.__ee__[t]))if("object"==typeof i){for(n=arguments.length,a=new Array(n-1),e=1;e=55296&&v<=56319&&(m+=t[++h])),c.call(e,g,m,f),!d);++h);}},function(t,e,n){"use strict";var r=n(606),i=n(607),a=n(610),o=n(617),s=n(604),c=n(599).iterator;t.exports=function(t){return"function"==typeof s(t)[c]?t[c]():r(t)?new a(t):i(t)?new o(t):new a(t)}},function(t,e,n){"use strict";var r,i=n(580),a=n(595),o=n(586),s=n(611),c=Object.defineProperty;r=t.exports=function(t,e){return this instanceof r?(s.call(this,t),e=e?a.call(e,"key+value")?"key+value":a.call(e,"key")?"key":"value":"value",void c(this,"__kind__",o("",e))):new r(t,e)},i&&i(r,s),r.prototype=Object.create(s.prototype,{constructor:o(r),_resolve:o(function(t){return"value"===this.__kind__?this.__list__[t]:"key+value"===this.__kind__?[t,this.__list__[t]]:t}),toString:o(function(){return"[object Array Iterator]"})})},function(t,e,n){"use strict";var r,i=n(572),a=n(587),o=n(585),s=n(573),c=n(586),u=n(612),l=n(599),f=Object.defineProperty,d=Object.defineProperties;t.exports=r=function(t,e){return this instanceof r?(d(this,{__list__:c("w",s(t)),__context__:c("w",e),__nextIndex__:c("w",0)}),void(e&&(o(e.on),e.on("_add",this._onAdd),e.on("_delete",this._onDelete),e.on("_clear",this._onClear)))):new r(t,e)},d(r.prototype,a({constructor:c(r),_next:c(function(){var t;if(this.__list__)return this.__redo__&&(t=this.__redo__.shift(),void 0!==t)?t:this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__)return void f(this,"__redo__",c("c",[t]));this.__redo__.forEach(function(e,n){e>=t&&(this.__redo__[n]=++e)},this),this.__redo__.push(t)}}),_onDelete:c(function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(e=this.__redo__.indexOf(t),e!==-1&&this.__redo__.splice(e,1),this.__redo__.forEach(function(e,n){e>t&&(this.__redo__[n]=--e)},this)))}),_onClear:c(function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0})}))),f(r.prototype,l.iterator,c(function(){return this})),f(r.prototype,l.toStringTag,c("","Iterator"))},function(t,e,n){"use strict";var r,i=n(613),a=n(614),o=n(585),s=n(573),c=Function.prototype.bind,u=Object.defineProperty,l=Object.prototype.hasOwnProperty;r=function(t,e,n){var r,a=s(e)&&o(e.value);return r=i(e),delete r.writable,delete r.value,r.get=function(){return l.call(this,t)?a:(e.value=c.call(a,null==n?this:this[n]), +u(this,t,e),this[t])},r},t.exports=function(t){var e=arguments[1];return a(t,function(t,n){return r(n,t,e)})}},function(t,e,n){"use strict";var r=n(587),i=n(573);t.exports=function(t){var e=Object(i(t));return e!==t?e:r({},t)}},function(t,e,n){"use strict";var r=n(585),i=n(615),a=Function.prototype.call;t.exports=function(t,e){var n={},o=arguments[2];return r(e),i(t,function(t,r,i,s){n[r]=a.call(e,o,t,r,i,s)}),n}},function(t,e,n){"use strict";t.exports=n(616)("forEach")},function(t,e,n){"use strict";var r=n(585),i=n(573),a=Function.prototype.bind,o=Function.prototype.call,s=Object.keys,c=Object.prototype.propertyIsEnumerable;t.exports=function(t,e){return function(n,u){var l,f=arguments[2],d=arguments[3];return n=Object(i(n)),r(u),l=s(n),d&&l.sort("function"==typeof d?a.call(d,n):void 0),"function"!=typeof t&&(t=l[t]),o.call(t,l,function(t,r){return c.call(n,t)?o.call(u,f,n[t],t,n,r):e})}}},function(t,e,n){"use strict";var r,i=n(580),a=n(586),o=n(611),s=Object.defineProperty;r=t.exports=function(t){return this instanceof r?(t=String(t),o.call(this,t),void s(this,"__length__",a("",t.length))):new r(t)},i&&i(r,o),r.prototype=Object.create(o.prototype,{constructor:a(r),_next:a(function(){if(this.__list__)return this.__nextIndex__=55296&&e<=56319?n+this.__list__[this.__nextIndex__++]:n)}),toString:a(function(){return"[object String Iterator]"})})},function(t,e,n){"use strict";var r,i=n(580),a=n(586),o=n(611),s=n(599).toStringTag,c=n(619),u=Object.defineProperties,l=o.prototype._unBind;r=t.exports=function(t,e){return this instanceof r?(o.call(this,t.__mapKeysData__,t),e&&c[e]||(e="key+value"),void u(this,{__kind__:a("",e),__values__:a("w",t.__mapValuesData__)})):new r(t,e)},i&&i(r,o),r.prototype=Object.create(o.prototype,{constructor:a(r),_resolve:a(function(t){return"value"===this.__kind__?this.__values__[t]:"key"===this.__kind__?this.__list__[t]:[this.__list__[t],this.__values__[t]]}),_unBind:a(function(){this.__values__=null,l.call(this)}),toString:a(function(){return"[object Map Iterator]"})}),Object.defineProperty(r.prototype,s,a("c","Map Iterator"))},function(t,e,n){"use strict";t.exports=n(620)("key","value","key+value")},function(t,e){"use strict";var n=Array.prototype.forEach,r=Object.create;t.exports=function(t){var e=r(null);return n.call(arguments,function(t){e[t]=!0}),e}},function(t,e){"use strict";t.exports=function(){return"undefined"!=typeof Map&&"[object Map]"===Object.prototype.toString.call(new Map)}()}]); //# sourceMappingURL=admin.min.js.map \ No newline at end of file diff --git a/themes/grav/templates/forms/fields/tabs/tabs.html.twig b/themes/grav/templates/forms/fields/tabs/tabs.html.twig index 3ef1e034..4ac86212 100644 --- a/themes/grav/templates/forms/fields/tabs/tabs.html.twig +++ b/themes/grav/templates/forms/fields/tabs/tabs.html.twig @@ -19,7 +19,7 @@
{% for tab in field.fields %} {% if tab.type == 'tab' and (tab.security is empty or authorize(array(tab.security))) %} - + {% if grav.twig.twig.filters['tu'] is defined %}{{ tab.title|tu }}{% else %}{{ tab.title|t }}{% endif %} {% endif %}