primo commit

This commit is contained in:
2024-12-17 17:34:10 +01:00
commit e650f8df99
16435 changed files with 2451012 additions and 0 deletions

View File

@ -0,0 +1,45 @@
{
"$schema": "https://developer.joomla.org/schemas/json-schema/web_assets.json",
"name": "com_users",
"version": "4.0.0",
"description": "Joomla CMS",
"license": "GPL-2.0-or-later",
"assets": [
{
"name": "com_users.admin-users-groups",
"type": "script",
"uri": "com_users/admin-users-groups.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "44aa77"
},
{
"name": "com_users.two-factor-focus",
"type": "script",
"uri": "com_users/two-factor-focus.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "bcc78d"
},
{
"name": "com_users.two-factor-list",
"type": "script",
"uri": "com_users/two-factor-list.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "7fa9d4"
}
]
}

View File

@ -0,0 +1,27 @@
/**
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
Joomla = window.Joomla || {};
(Joomla => {
document.addEventListener('DOMContentLoaded', () => {
Joomla.submitbutton = task => {
if (task === 'groups.delete') {
const cids = document.getElementsByName('cid[]');
for (let i = 0; i < cids.length; i += 1) {
if (cids[i].checked && cids[i].parentNode.getAttribute('data-usercount') !== '0') {
// @todo replace with joomla-alert
if (window.confirm(Joomla.Text._('COM_USERS_GROUPS_CONFIRM_DELETE'))) {
Joomla.submitform(task);
}
return false;
}
}
}
Joomla.submitform(task);
return false;
};
});
})(Joomla);

View File

@ -0,0 +1,4 @@
/**
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/Joomla=window.Joomla||{},(e=>{document.addEventListener("DOMContentLoaded",()=>{e.submitbutton=n=>{if(n==="groups.delete"){const o=document.getElementsByName("cid[]");for(let t=0;t<o.length;t+=1)if(o[t].checked&&o[t].parentNode.getAttribute("data-usercount")!=="0")return window.confirm(e.Text._("COM_USERS_GROUPS_CONFIRM_DELETE"))&&e.submitform(n),!1}return e.submitform(n),!1}})})(Joomla);

Binary file not shown.

View File

@ -0,0 +1,52 @@
/**
* @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
(() => {
document.addEventListener('DOMContentLoaded', () => {
var _document$getElementB;
const elCodeField = document.getElementById('users-mfa-code');
const elValidateButton = document.getElementById('users-mfa-captive-button-submit');
const elToolbarButton = (_document$getElementB = document.getElementById('toolbar-user-mfa-submit')) == null ? void 0 : _document$getElementB.querySelector('button');
// Focus the code field. If the code field is hidden, focus the submit button (useful e.g. for WebAuthn)
if (elCodeField && elCodeField.style.display !== 'none' && !elCodeField.classList.contains('visually-hidden') && elCodeField.type !== 'hidden') {
elCodeField.focus();
} else {
if (elValidateButton) {
elValidateButton.focus();
}
if (elToolbarButton) {
elToolbarButton.focus();
}
}
// Capture the admin toolbar buttons, make them click the inline buttons
document.querySelectorAll('.button-user-mfa-submit').forEach(elButton => {
elButton.addEventListener('click', e => {
e.preventDefault();
elValidateButton.click();
});
});
document.querySelectorAll('.button-user-mfa-logout').forEach(elButton => {
elButton.addEventListener('click', e => {
e.preventDefault();
const elLogout = document.getElementById('users-mfa-captive-button-logout');
if (elLogout) {
elLogout.click();
}
});
});
document.querySelectorAll('.button-user-mfa-choose-another').forEach(elButton => {
elButton.addEventListener('click', e => {
e.preventDefault();
const elChooseAnother = document.getElementById('users-mfa-captive-form-choose-another');
if (elChooseAnother) {
elChooseAnother.click();
}
});
});
});
})();

View File

@ -0,0 +1,4 @@
/**
* @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/document.addEventListener("DOMContentLoaded",()=>{var l;const e=document.getElementById("users-mfa-code"),c=document.getElementById("users-mfa-captive-button-submit"),u=(l=document.getElementById("toolbar-user-mfa-submit"))==null?void 0:l.querySelector("button");e&&e.style.display!=="none"&&!e.classList.contains("visually-hidden")&&e.type!=="hidden"?e.focus():(c&&c.focus(),u&&u.focus()),document.querySelectorAll(".button-user-mfa-submit").forEach(t=>{t.addEventListener("click",o=>{o.preventDefault(),c.click()})}),document.querySelectorAll(".button-user-mfa-logout").forEach(t=>{t.addEventListener("click",o=>{o.preventDefault();const n=document.getElementById("users-mfa-captive-button-logout");n&&n.click()})}),document.querySelectorAll(".button-user-mfa-choose-another").forEach(t=>{t.addEventListener("click",o=>{o.preventDefault();const n=document.getElementById("users-mfa-captive-form-choose-another");n&&n.click()})})});

Binary file not shown.

View File

@ -0,0 +1,17 @@
/**
* @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
((Joomla, window) => {
document.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll('.com-users-methods-list-method-record-delete').forEach(el => {
el.addEventListener('click', event => {
if (!window.confirm(Joomla.Text._('JGLOBAL_CONFIRM_DELETE'))) {
event.preventDefault();
}
});
});
});
})(Joomla, window);

View File

@ -0,0 +1,4 @@
/**
* @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/((e,t)=>{document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".com-users-methods-list-method-record-delete").forEach(o=>{o.addEventListener("click",d=>{t.confirm(e.Text._("JGLOBAL_CONFIRM_DELETE"))||d.preventDefault()})})})})(Joomla,window);

Binary file not shown.