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,108 @@
{
"$schema": "https://developer.joomla.org/schemas/json-schema/web_assets.json",
"name": "com_content",
"version": "4.0.0",
"description": "Joomla CMS",
"license": "GPL-2.0-or-later",
"assets": [
{
"name": "com_content.admin-article-pagebreak",
"type": "script",
"uri": "com_content/admin-article-pagebreak.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module",
"defer": true
},
"version": "b6b30a"
},
{
"name": "com_content.admin-article-readmore",
"type": "script",
"uri": "com_content/admin-article-readmore.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "a38c94"
},
{
"name": "com_content.admin-articles-batch",
"type": "script",
"uri": "com_content/admin-articles-default-batch-footer.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "f06806"
},
{
"name": "com_content.admin-articles-modal",
"type": "script",
"uri": "com_content/admin-articles-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": "599bae"
},
{
"name": "com_content.admin-articles-stage",
"type": "script",
"uri": "com_content/admin-articles-default-stage-footer.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "479151"
},
{
"name": "com_content.form-edit",
"type": "script",
"uri": "com_content/form-edit.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "86b1be"
},
{
"name": "com_content.articles-list",
"type": "script",
"uri": "com_content/articles-list.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "c512d2"
},
{
"name": "com_content.articles-status",
"type": "script",
"uri": "com_content/articles-status.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "678d9a"
}
]
}

View File

@ -0,0 +1,26 @@
/**
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
(() => {
window.insertPagebreak = editor => {
// Get the pagebreak title
let title = document.getElementById('title').value;
if (!window.parent.Joomla.getOptions('xtd-pagebreak')) {
// Something went wrong!
window.parent.Joomla.Modal.getCurrent().close();
return false;
}
// Get the pagebreak toc alias -- not inserting for now don't know which attribute to use..
let alt = document.getElementById('alt').value;
title = title !== '' ? `title="${title}"` : '';
alt = alt !== '' ? `alt="${alt}"` : '';
const tag = `<hr class="system-pagebreak" ${title} ${alt}>`;
window.parent.Joomla.editors.instances[editor].replaceSelection(tag);
window.parent.Joomla.Modal.getCurrent().close();
return false;
};
})();

View File

@ -0,0 +1 @@
window.insertPagebreak=e=>{let t=document.getElementById("title").value;if(!window.parent.Joomla.getOptions("xtd-pagebreak"))return window.parent.Joomla.Modal.getCurrent().close(),!1;let a=document.getElementById("alt").value;t=""!==t?`title="${t}"`:"",a=""!==a?`alt="${a}"`:"";const n=`<hr class="system-pagebreak" ${t} ${a}>`;return window.parent.Joomla.editors.instances[e].replaceSelection(n),window.parent.Joomla.Modal.getCurrent().close(),!1};

Binary file not shown.

View File

@ -0,0 +1,29 @@
import { JoomlaEditor, JoomlaEditorButton } from 'editor-api';
import JoomlaDialog from 'joomla.dialog';
/**
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
const insertReadmoreHandler = editor => {
const content = editor.getValue();
if (!content) {
editor.replaceSelection('<hr id="system-readmore">');
} else if (content && !content.match(/<hr\s+id=("|')system-readmore("|')\s*\/*>/i)) {
editor.replaceSelection('<hr id="system-readmore">');
} else {
JoomlaDialog.alert(Joomla.Text._('PLG_READMORE_ALREADY_EXISTS'));
}
};
// @TODO: Remove in Joomla 6
window.insertReadmore = () => {
// eslint-disable-next-line no-console
console.warn('Method window.insertReadmore() is deprecated, use button action "insert-readmore."');
const editor = JoomlaEditor.getActive();
if (!editor) {
throw new Error('An active editor are not available');
}
insertReadmoreHandler(editor);
};
JoomlaEditorButton.registerAction('insert-readmore', insertReadmoreHandler);

View File

@ -0,0 +1 @@
import{JoomlaEditor,JoomlaEditorButton}from"editor-api";import JoomlaDialog from"joomla.dialog";const insertReadmoreHandler=e=>{const o=e.getValue();o?o&&!o.match(/<hr\s+id=("|')system-readmore("|')\s*\/*>/i)?e.replaceSelection('<hr id="system-readmore">'):JoomlaDialog.alert(Joomla.Text._("PLG_READMORE_ALREADY_EXISTS")):e.replaceSelection('<hr id="system-readmore">')};window.insertReadmore=()=>{console.warn('Method window.insertReadmore() is deprecated, use button action "insert-readmore."');const e=JoomlaEditor.getActive();if(!e)throw new Error("An active editor are not available");insertReadmoreHandler(e)},JoomlaEditorButton.registerAction("insert-readmore",insertReadmoreHandler);

Binary file not shown.

View File

@ -0,0 +1,33 @@
/**
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
((document, submitForm) => {
// Selectors used by this script
const buttonDataSelector = 'data-submit-task';
const formId = 'adminForm';
/**
* Submit the task
* @param task
*/
const submitTask = task => {
const form = document.getElementById(formId);
if (form && task === 'article.batch') {
submitForm(task, form);
}
};
// Register events
document.addEventListener('DOMContentLoaded', () => {
const button = document.getElementById('batch-submit-button-id');
if (button) {
button.addEventListener('click', e => {
const task = e.target.getAttribute(buttonDataSelector);
submitTask(task);
return false;
});
}
});
})(document, Joomla.submitform);

View File

@ -0,0 +1 @@
((t,e)=>{t.addEventListener("DOMContentLoaded",(()=>{const n=t.getElementById("batch-submit-button-id");n&&n.addEventListener("click",(n=>((n=>{const a=t.getElementById("adminForm");a&&"article.batch"===n&&e(n,a)})(n.target.getAttribute("data-submit-task")),!1)))}))})(document,Joomla.submitform);

View File

@ -0,0 +1,32 @@
/**
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
((document, submitForm) => {
// Selectors used by this script
const buttonDataSelector = 'data-submit-task';
const formId = 'adminForm';
/**
* Submit the task
* @param task
*/
const submitTask = task => {
const form = document.getElementById(formId);
if (form) {
submitForm(task, form);
}
};
// Register events
document.addEventListener('DOMContentLoaded', () => {
const button = document.getElementById('stage-submit-button-id');
if (button) {
button.addEventListener('click', e => {
const task = e.target.getAttribute(buttonDataSelector);
submitTask(task);
});
}
});
})(document, Joomla.submitform);

View File

@ -0,0 +1 @@
((t,e)=>{t.addEventListener("DOMContentLoaded",(()=>{const n=t.getElementById("stage-submit-button-id");n&&n.addEventListener("click",(n=>{(n=>{const d=t.getElementById("adminForm");d&&e(n,d)})(n.target.getAttribute("data-submit-task"))}))}))})(document,Joomla.submitform);

View File

@ -0,0 +1,53 @@
/**
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
(() => {
// Use a JoomlaExpectingPostMessage flag to be able to distinct legacy methods
if (window.parent.JoomlaExpectingPostMessage) {
return;
}
/**
* Javascript to insert the link
* View element calls jSelectArticle when an article is clicked
* jSelectArticle creates the link tag, sends it to the editor,
* and closes the select frame.
* */
window.jSelectArticle = (id, title, catid, object, link, lang) => {
// eslint-disable-next-line no-console
console.warn('Method jSelectArticle() is deprecated. Use postMessage() instead.');
if (!Joomla.getOptions('xtd-articles')) {
return;
}
const {
editor
} = Joomla.getOptions('xtd-articles');
const tag = `<a href="${link}"${lang !== '' ? ` hreflang="${lang}"` : ''}>${title}</a>`;
window.parent.Joomla.editors.instances[editor].replaceSelection(tag);
if (window.parent.Joomla.Modal && window.parent.Joomla.Modal.getCurrent()) {
window.parent.Joomla.Modal.getCurrent().close();
}
};
document.querySelectorAll('.select-link').forEach(element => {
// Listen for click event
element.addEventListener('click', event => {
event.preventDefault();
const {
target
} = event;
const functionName = target.getAttribute('data-function');
if (functionName === 'jSelectArticle' && window[functionName]) {
// Used in xtd_contacts
window[functionName](target.getAttribute('data-id'), target.getAttribute('data-title'), target.getAttribute('data-cat-id'), null, target.getAttribute('data-uri'), target.getAttribute('data-language'));
} else if (window.parent[functionName]) {
// Used in com_menus
window.parent[functionName](target.getAttribute('data-id'), target.getAttribute('data-title'), target.getAttribute('data-cat-id'), null, target.getAttribute('data-uri'), target.getAttribute('data-language'));
}
if (window.parent.Joomla.Modal && window.parent.Joomla.Modal.getCurrent()) {
window.parent.Joomla.Modal.getCurrent().close();
}
});
});
})();

View File

@ -0,0 +1 @@
window.parent.JoomlaExpectingPostMessage||(window.jSelectArticle=(t,e,a,o,i,n)=>{if(console.warn("Method jSelectArticle() is deprecated. Use postMessage() instead."),!Joomla.getOptions("xtd-articles"))return;const{editor:r}=Joomla.getOptions("xtd-articles"),d=`<a href="${i}"${""!==n?` hreflang="${n}"`:""}>${e}</a>`;window.parent.Joomla.editors.instances[r].replaceSelection(d),window.parent.Joomla.Modal&&window.parent.Joomla.Modal.getCurrent()&&window.parent.Joomla.Modal.getCurrent().close()},document.querySelectorAll(".select-link").forEach((t=>{t.addEventListener("click",(t=>{t.preventDefault();const{target:e}=t,a=e.getAttribute("data-function");"jSelectArticle"===a&&window[a]?window[a](e.getAttribute("data-id"),e.getAttribute("data-title"),e.getAttribute("data-cat-id"),null,e.getAttribute("data-uri"),e.getAttribute("data-language")):window.parent[a]&&window.parent[a](e.getAttribute("data-id"),e.getAttribute("data-title"),e.getAttribute("data-cat-id"),null,e.getAttribute("data-uri"),e.getAttribute("data-language")),window.parent.Joomla.Modal&&window.parent.Joomla.Modal.getCurrent()&&window.parent.Joomla.Modal.getCurrent().close()}))})));

Binary file not shown.

View File

@ -0,0 +1,21 @@
/**
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
(document => {
const onClick = () => {
const form = document.getElementById('adminForm');
document.getElementById('filter-search').value = '';
form.submit();
};
const onBoot = () => {
const form = document.getElementById('adminForm');
const element = form.querySelector('button[type="reset"]');
if (element) {
element.addEventListener('click', onClick);
}
document.removeEventListener('DOMContentLoaded', onBoot);
};
document.addEventListener('DOMContentLoaded', onBoot);
})(document);

View File

@ -0,0 +1 @@
(e=>{const t=()=>{const t=e.getElementById("adminForm");e.getElementById("filter-search").value="",t.submit()},n=()=>{const d=e.getElementById("adminForm").querySelector('button[type="reset"]');d&&d.addEventListener("click",t),e.removeEventListener("DOMContentLoaded",n)};e.addEventListener("DOMContentLoaded",n)})(document);

Binary file not shown.

View File

@ -0,0 +1,16 @@
/**
* @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', () => {
const elements = [].slice.call(document.querySelectorAll('.article-status'));
elements.forEach(element => {
element.addEventListener('click', event => {
event.stopPropagation();
});
});
});
})();

View File

@ -0,0 +1 @@
document.addEventListener("DOMContentLoaded",(()=>{[].slice.call(document.querySelectorAll(".article-status")).forEach((e=>{e.addEventListener("click",(e=>{e.stopPropagation()}))}))}));

Binary file not shown.

View File

@ -0,0 +1,33 @@
/**
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
((document, submitForm) => {
// Selectors used by this script
const buttonDataSelector = 'data-submit-task';
const formId = 'adminForm';
/**
* Submit the task
* @param task
*/
const submitTask = task => {
const form = document.getElementById(formId);
if (task === 'article.cancel' || document.formvalidator.isValid(form)) {
submitForm(task, form);
}
};
// Register events
document.addEventListener('DOMContentLoaded', () => {
const buttons = [].slice.call(document.querySelectorAll(`[${buttonDataSelector}]`));
buttons.forEach(button => {
button.addEventListener('click', e => {
e.preventDefault();
const task = e.target.getAttribute(buttonDataSelector);
submitTask(task);
});
});
});
})(document, Joomla.submitform);

1
media/com_content/js/form-edit.min.js vendored Normal file
View File

@ -0,0 +1 @@
((t,e)=>{const a="data-submit-task";t.addEventListener("DOMContentLoaded",(()=>{[].slice.call(t.querySelectorAll(`[${a}]`)).forEach((l=>{l.addEventListener("click",(l=>{l.preventDefault();(a=>{const l=t.getElementById("adminForm");("article.cancel"===a||t.formvalidator.isValid(l))&&e(a,l)})(l.target.getAttribute(a))}))}))}))})(document,Joomla.submitform);

Binary file not shown.