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,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": "214a47"
},
{
"name": "com_content.admin-articles-batch",
"type": "script",
"uri": "com_content/admin-articles-default-batch-footer.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "f382dd"
},
{
"name": "com_content.admin-article-readmore",
"type": "script",
"uri": "com_content/admin-article-readmore.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "27b7c1"
},
{
"name": "com_content.admin-articles-stage",
"type": "script",
"uri": "com_content/admin-articles-default-stage-footer.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "09d5c2"
},
{
"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": "509ba1"
},
{
"name": "com_content.articles-list",
"type": "script",
"uri": "com_content/articles-list.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "f53819"
},
{
"name": "com_content.form-edit",
"type": "script",
"uri": "com_content/form-edit.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "ea6fb4"
},
{
"name": "com_content.articles-status",
"type": "script",
"uri": "com_content/articles-status.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "31fff5"
}
]
}

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,4 @@
/**
* @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=a=>{let e=document.getElementById("title").value;if(!window.parent.Joomla.getOptions("xtd-pagebreak"))return window.parent.Joomla.Modal.getCurrent().close(),!1;let t=document.getElementById("alt").value;e=e!==""?`title="${e}"`:"",t=t!==""?`alt="${t}"`:"";const l=`<hr class="system-pagebreak" ${e} ${t}>`;return window.parent.Joomla.editors.instances[a].replaceSelection(l),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,4 @@
import{JoomlaEditor as t,JoomlaEditorButton as i}from"editor-api";import a 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 r=e=>{const o=e.getValue();o?o&&!o.match(/<hr\s+id=("|')system-readmore("|')\s*\/*>/i)?e.replaceSelection('<hr id="system-readmore">'):a.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=t.getActive();if(!e)throw new Error("An active editor are not available");r(e)},i.registerAction("insert-readmore",r);

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,4 @@
/**
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/((n,o)=>{const a="data-submit-task",s="adminForm",i=t=>{const e=n.getElementById(s);e&&t==="article.batch"&&o(t,e)};n.addEventListener("DOMContentLoaded",()=>{const t=n.getElementById("batch-submit-button-id");t&&t.addEventListener("click",e=>{const r=e.target.getAttribute(a);return i(r),!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,4 @@
/**
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/((n,o)=>{const s="data-submit-task",a="adminForm",i=t=>{const e=n.getElementById(a);e&&o(t,e)};n.addEventListener("DOMContentLoaded",()=>{const t=n.getElementById("stage-submit-button-id");t&&t.addEventListener("click",e=>{const d=e.target.getAttribute(s);i(d)})})})(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,4 @@
/**
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/window.parent.JoomlaExpectingPostMessage||(window.jSelectArticle=(o,a,t,e,n,i)=>{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="${n}"${i!==""?` hreflang="${i}"`:""}>${a}</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(o=>{o.addEventListener("click",a=>{a.preventDefault();const{target:t}=a,e=t.getAttribute("data-function");e==="jSelectArticle"&&window[e]?window[e](t.getAttribute("data-id"),t.getAttribute("data-title"),t.getAttribute("data-cat-id"),null,t.getAttribute("data-uri"),t.getAttribute("data-language")):window.parent[e]&&window.parent[e](t.getAttribute("data-id"),t.getAttribute("data-title"),t.getAttribute("data-cat-id"),null,t.getAttribute("data-uri"),t.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,4 @@
/**
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/(e=>{const r=()=>{const n=e.getElementById("adminForm");e.getElementById("filter-search").value="",n.submit()},t=()=>{const o=e.getElementById("adminForm").querySelector('button[type="reset"]');o&&o.addEventListener("click",r),e.removeEventListener("DOMContentLoaded",t)};e.addEventListener("DOMContentLoaded",t)})(document);

Binary file not shown.

View File

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

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",()=>{document.querySelectorAll(".article-status").forEach(e=>{e.addEventListener("click",t=>t.stopPropagation())})});

Binary file not shown.

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 (task === 'article.cancel' || document.formvalidator.isValid(form)) {
submitForm(task, form);
}
};
// Register events
document.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll(`[${buttonDataSelector}]`).forEach(button => {
button.addEventListener('click', e => {
e.preventDefault();
const task = e.target.getAttribute(buttonDataSelector);
submitTask(task);
});
});
});
})(document, Joomla.submitform);

4
media/com_content/js/form-edit.min.js vendored Normal file
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,r)=>{const o="data-submit-task",n="adminForm",i=a=>{const t=e.getElementById(n);(a==="article.cancel"||e.formvalidator.isValid(t))&&r(a,t)};e.addEventListener("DOMContentLoaded",()=>{e.querySelectorAll(`[${o}]`).forEach(a=>{a.addEventListener("click",t=>{t.preventDefault();const s=t.target.getAttribute(o);i(s)})})})})(document,Joomla.submitform);

Binary file not shown.