[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/media/plg_system_shortcut/js/ -> shortcut-es5.min.js (source)

   1  !function(){"use strict";!function(t,o){if(!o)throw new Error("Joomla API is not properly initialised");o.addShortcut=function(t,o){hotkeys(t,"joomla",(function(t){t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),o.call()}))},o.addClickShortcut=function(e,n){o.addShortcut(e,(function(){var o=t.querySelector(n);o&&o.click()}))},o.addFocusShortcut=function(e,n){o.addShortcut(e,(function(){var o=t.querySelector(n);o&&o.focus()}))},o.addLinkShortcut=function(t,e){o.addShortcut(t,(function(){window.location.href=e}))};t.addEventListener("DOMContentLoaded",(function(){var e=o.getOptions("plg_system_shortcut.shortcuts");Object.values(e).forEach((function(t){t.shortcut&&t.selector&&(t.selector.startsWith("/")||t.selector.startsWith("http://")||t.selector.startsWith("www.")?o.addLinkShortcut(t.shortcut,t.selector):t.selector.includes("input")?o.addFocusShortcut(t.shortcut,t.selector):o.addClickShortcut(t.shortcut,t.selector))})),t.querySelector("nav")&&(function(e){var n=new Map;Object.values(e).forEach((function(t){if(t.shortcut&&t.title){var o=[];n.has(t.shortcut)?(o=n.get(t.shortcut)).push(t.title):o=[t.title],n.set(t.shortcut,o)}}));var a="<dl>";n.forEach((function(t,o){a+="<dt><kbd>J</kbd>",o.split("+").forEach((function(t){a+=" <kbd>"+t.trim()+"</kbd>"})),a+="</dt>",t.forEach((function(t){a+="<dd>"+t+"</dd>"}))})),a+="</dl>";var c='\n      <div class="modal fade" id="shortcutOverviewModal" tabindex="-1" role="dialog" data-bs-backdrop="static" aria-labelledby="shortcutOverviewModalLabel" aria-hidden="true">\n        <div class="modal-dialog" role="document">\n          <div class="modal-content">\n            <div class="modal-header">\n              <h3 id="shortcutOverviewModalLabel" class="modal-title">\n                '+o.Text._("PLG_SYSTEM_SHORTCUT_OVERVIEW_TITLE")+'\n              </h3>\n              <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="'+o.Text._("JCLOSE")+'"></button>\n            </div>\n            <div class="modal-body p-3">\n              <p>'+o.Text._("PLG_SYSTEM_SHORTCUT_OVERVIEW_DESC")+'</p>\n              <div class="mb-3">\n                '+a+"\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    ";t.body.insertAdjacentHTML("beforeend",c);var r=new bootstrap.Modal(t.getElementById("shortcutOverviewModal"),{keyboard:!0,backdrop:!0});hotkeys("X","joomla",(function(){return r.show()}))}(e),function(){var e=t.querySelector(".com_cpanel .container-main");if(e){var n=t.createElement("section");n.className="content pt-4",n.insertAdjacentHTML("beforeend",o.Text._("PLG_SYSTEM_SHORTCUT_OVERVIEW_HINT")),e.appendChild(n)}}()),hotkeys.filter=function(t){var o=t.target||t.srcElement,e=o.tagName;return"checkbox"===o.type||!(o.isContentEditable||"INPUT"===e||"SELECT"===e||"TEXTAREA"===e)},hotkeys("J",(function(t){"joomla"!==hotkeys.getScope()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),hotkeys.setScope("joomla"),setTimeout((function(){hotkeys.setScope(!1)}),o.getOptions("plg_system_shortcut.timeout",2e3)))}))}))}(document,Joomla)}();


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer