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,71 @@
{
"$schema": "https://developer.joomla.org/schemas/json-schema/web_assets.json",
"name": "com_fields",
"version": "4.0.0",
"description": "Joomla CMS",
"license": "GPL-2.0-or-later",
"assets": [
{
"name": "com_fields.admin-field-changecontext",
"type": "script",
"uri": "com_fields/admin-field-changecontext.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "8abe08"
},
{
"name": "com_fields.admin-field-edit",
"type": "script",
"uri": "com_fields/admin-field-edit.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "f3c19c"
},
{
"name": "com_fields.admin-field-typehaschanged",
"type": "script",
"uri": "com_fields/admin-field-typehaschanged.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "1fbf0a"
},
{
"name": "com_fields.admin-fields-modal",
"type": "script",
"uri": "com_fields/admin-fields-modal.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"deprecated": true,
"deprecatedMsg": "Use postMessage() directly or with help of [modal-content-select] asset. To post the modal selection.",
"version": "be088f"
},
{
"name": "com_fields.admin-fields-batch",
"type": "script",
"uri": "com_fields/admin-fields-default-batch.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "eebfc6"
}
]
}

View File

@ -0,0 +1,13 @@
/**
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
Joomla.fieldsChangeContext = context => {
const regex = /([?;&])context[^&;]*[;&]?/;
const url = window.location.href;
const query = url.replace(regex, '$1').replace(/&$/, '');
// eslint-disable-next-line
window.location.href = (query.length > 2 ? query + '&' : '?') + (context ? 'context=' + context : '');
};

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.fieldsChangeContext=e=>{const n=/([?;&])context[^&;]*[;&]?/,o=window.location.href.replace(n,"$1").replace(/&$/,"");window.location.href=(o.length>2?o+"&":"?")+(e?"context="+e:"")};

View File

@ -0,0 +1,20 @@
/**
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
document.addEventListener('DOMContentLoaded', () => {
const title = document.getElementById('jform_title');
title.dpOldValue = title.value;
title.addEventListener('change', ({
currentTarget
}) => {
const label = document.getElementById('jform_label');
const changedTitle = currentTarget;
if (changedTitle.dpOldValue === label.value) {
label.value = changedTitle.value;
}
changedTitle.dpOldValue = changedTitle.value;
});
});

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
*/document.addEventListener("DOMContentLoaded",()=>{const t=document.getElementById("jform_title");t.dpOldValue=t.value,t.addEventListener("change",({currentTarget:d})=>{const l=document.getElementById("jform_label"),e=d;e.dpOldValue===l.value&&(l.value=e.value),e.dpOldValue=e.value})});

Binary file not shown.

View File

@ -0,0 +1,13 @@
/**
* @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
(Joomla => {
Joomla.typeHasChanged = element => {
// Display the loading indication
document.body.appendChild(document.createElement('joomla-core-loader'));
document.querySelector('input[name=task]').value = 'field.reload';
element.form.submit();
};
})(Joomla);

View File

@ -0,0 +1,4 @@
/**
* @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/(e=>{e.typeHasChanged=o=>{document.body.appendChild(document.createElement("joomla-core-loader")),document.querySelector("input[name=task]").value="field.reload",o.form.submit()}})(Joomla);

View File

@ -0,0 +1,23 @@
/**
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
const setUp = container => {
const batchSelector = container.getElementById('batch-group-id');
const batchCopyMove = container.getElementById('batch-copy-move');
if (!container || !batchCopyMove) {
return;
}
batchCopyMove.classList.add('hidden');
batchSelector.addEventListener('change', () => {
if (batchSelector.value === 'nogroup' || batchSelector.value !== '') {
batchCopyMove.classList.remove('hidden');
} else {
batchCopyMove.classList.add('hidden');
}
}, false);
};
setUp(document);
document.addEventListener('joomla:loaded', ({
target
}) => setUp(target));

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
*/const setUp=e=>{const t=e.getElementById("batch-group-id"),d=e.getElementById("batch-copy-move");!e||!d||(d.classList.add("hidden"),t.addEventListener("change",()=>{t.value==="nogroup"||t.value!==""?d.classList.remove("hidden"):d.classList.add("hidden")},!1))};setUp(document),document.addEventListener("joomla:loaded",({target:e})=>setUp(e));

View File

@ -0,0 +1,37 @@
/**
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
(Joomla => {
if (!window.parent.Joomla) {
throw new Error('core.js was not properly initialised');
}
if (!Joomla) {
window.Joomla = {};
}
Joomla.fieldIns = (id, editor) => {
// Use a JoomlaExpectingPostMessage flag to be able to distinct legacy methods
if (window.parent.JoomlaExpectingPostMessage) {
return;
}
// eslint-disable-next-line no-console
console.warn('Method Joomla.fieldIns() is deprecated. Use postMessage() instead.');
window.parent.Joomla.editors.instances[editor].replaceSelection(`{field ${id}}`);
if (window.parent.Joomla.Modal) {
window.parent.Joomla.Modal.getCurrent().close();
}
};
Joomla.fieldgroupIns = (id, editor) => {
// Use a JoomlaExpectingPostMessage flag to be able to distinct legacy methods
if (window.parent.JoomlaExpectingPostMessage) {
return;
}
// eslint-disable-next-line no-console
console.warn('Method Joomla.fieldgroupIns() is deprecated. Use postMessage() instead.');
window.parent.Joomla.editors.instances[editor].replaceSelection(`{fieldgroup ${id}}`);
if (window.parent.Joomla.Modal) {
window.parent.Joomla.Modal.getCurrent().close();
}
};
})(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
*/(e=>{if(!window.parent.Joomla)throw new Error("core.js was not properly initialised");e||(window.Joomla={}),e.fieldIns=(o,n)=>{window.parent.JoomlaExpectingPostMessage||(console.warn("Method Joomla.fieldIns() is deprecated. Use postMessage() instead."),window.parent.Joomla.editors.instances[n].replaceSelection(`{field ${o}}`),window.parent.Joomla.Modal&&window.parent.Joomla.Modal.getCurrent().close())},e.fieldgroupIns=(o,n)=>{window.parent.JoomlaExpectingPostMessage||(console.warn("Method Joomla.fieldgroupIns() is deprecated. Use postMessage() instead."),window.parent.Joomla.editors.instances[n].replaceSelection(`{fieldgroup ${o}}`),window.parent.Joomla.Modal&&window.parent.Joomla.Modal.getCurrent().close())}})(Joomla);

Binary file not shown.