first commit

This commit is contained in:
2025-06-17 11:53:18 +02:00
commit 9f0f7ba12b
8804 changed files with 1369176 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": "1ec584"
},
{
"name": "com_fields.admin-field-edit",
"type": "script",
"uri": "com_fields/admin-field-edit.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "5abbb6"
},
{
"name": "com_fields.admin-field-typehaschanged",
"type": "script",
"uri": "com_fields/admin-field-typehaschanged.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "48b415"
},
{
"name": "com_fields.admin-fields-batch",
"type": "script",
"uri": "com_fields/admin-fields-default-batch.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "19a4b6"
},
{
"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": "c7c2dd"
}
]
}

View File

@ -0,0 +1,8 @@
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 @@
Joomla.fieldsChangeContext=e=>{const o=window.location.href.replace(/([?;&])context[^&;]*[;&]?/,"$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 @@
document.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById("jform_title");e.dpOldValue=e.value,e.addEventListener("change",(({currentTarget:e})=>{const t=document.getElementById("jform_label"),d=e;d.dpOldValue===t.value&&(t.value=d.value),d.dpOldValue=d.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 @@
(e=>{e.typeHasChanged=e=>{document.body.appendChild(document.createElement("joomla-core-loader")),document.querySelector("input[name=task]").value="field.reload",e.form.submit()}})(Joomla);

View File

@ -0,0 +1,17 @@
/**
* @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 batchSelector = document.getElementById('batch-group-id');
const batchCopyMove = document.getElementById('batch-copy-move');
batchCopyMove.classList.add('hidden');
batchSelector.addEventListener('change', () => {
if (batchSelector.value === 'nogroup' || batchSelector.value !== '') {
batchCopyMove.classList.remove('hidden');
} else {
batchCopyMove.classList.add('hidden');
}
}, false);
});

View File

@ -0,0 +1 @@
document.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById("batch-group-id"),d=document.getElementById("batch-copy-move");d.classList.add("hidden"),e.addEventListener("change",(()=>{"nogroup"===e.value||""!==e.value?d.classList.remove("hidden"):d.classList.add("hidden")}),!1)}));

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 @@
(o=>{if(!window.parent.Joomla)throw new Error("core.js was not properly initialised");o||(window.Joomla={}),o.fieldIns=(o,e)=>{window.parent.JoomlaExpectingPostMessage||(console.warn("Method Joomla.fieldIns() is deprecated. Use postMessage() instead."),window.parent.Joomla.editors.instances[e].replaceSelection(`{field ${o}}`),window.parent.Joomla.Modal&&window.parent.Joomla.Modal.getCurrent().close())},o.fieldgroupIns=(o,e)=>{window.parent.JoomlaExpectingPostMessage||(console.warn("Method Joomla.fieldgroupIns() is deprecated. Use postMessage() instead."),window.parent.Joomla.editors.instances[e].replaceSelection(`{fieldgroup ${o}}`),window.parent.Joomla.Modal&&window.parent.Joomla.Modal.getCurrent().close())}})(Joomla);

Binary file not shown.