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

1
media/cache/index.html vendored Normal file
View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,21 @@
{
"$schema": "https://developer.joomla.org/schemas/json-schema/web_assets.json",
"name": "com_actionlogs",
"version": "4.0.0",
"description": "Joomla CMS",
"license": "GPL-2.0-or-later",
"assets": [
{
"name": "com_actionlogs.admin-actionlogs",
"type": "script",
"uri": "com_actionlogs/admin-actionlogs-default.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "3205a4"
}
]
}

View File

@ -0,0 +1,20 @@
/**
* @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
Joomla.submitbutton = task => {
if (task === 'actionlogs.exportLogs') {
Joomla.submitform(task, document.getElementById('exportForm'));
return;
}
if (task === 'actionlogs.exportSelectedLogs') {
// Get id of selected action logs item and pass it to export form hidden input
const cids = [];
document.querySelectorAll("input[name='cid[]']:checked").forEach(element => cids.push(element.value));
document.exportForm.cids.value = cids.join(',');
Joomla.submitform(task, document.getElementById('exportForm'));
return;
}
Joomla.submitform(task);
};

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
*/Joomla.submitbutton=o=>{if(o==="actionlogs.exportLogs"){Joomla.submitform(o,document.getElementById("exportForm"));return}if(o==="actionlogs.exportSelectedLogs"){const e=[];document.querySelectorAll("input[name='cid[]']:checked").forEach(t=>e.push(t.value)),document.exportForm.cids.value=e.join(","),Joomla.submitform(o,document.getElementById("exportForm"));return}Joomla.submitform(o)};

View File

@ -0,0 +1,21 @@
{
"$schema": "https://developer.joomla.org/schemas/json-schema/web_assets.json",
"name": "com_admin",
"version": "4.0.0",
"description": "Joomla CMS",
"license": "GPL-2.0-or-later",
"assets": [
{
"name": "com_admin.admin-help",
"type": "script",
"uri": "com_admin/admin-help.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "54d1ad"
}
]
}

View File

@ -0,0 +1,9 @@
/**
* @copyright (C) 2021 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
const helpIndex = document.getElementById('help-index');
if (helpIndex) {
helpIndex.querySelectorAll('a').forEach(element => element.addEventListener('click', () => window.scroll(0, 0)));
}

4
media/com_admin/js/admin-help.min.js vendored Normal file
View File

@ -0,0 +1,4 @@
/**
* @copyright (C) 2021 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/const helpIndex=document.getElementById("help-index");helpIndex&&helpIndex.querySelectorAll("a").forEach(e=>e.addEventListener("click",()=>window.scroll(0,0)));

Binary file not shown.

View File

@ -0,0 +1,66 @@
@charset "UTF-8";
.sidebyside .outer-panel {
float: left;
width: 50%;
}
.sidebyside #left-panel .inner-panel, .sidebyside #right-panel .inner-panel {
padding-inline-end: 10px;
}
.sidebyside .full-width {
float: none !important;
width: 100% !important;
}
.sidebyside .full-width .inner-panel {
padding: 0 !important;
}
#reference-association, #target-association {
width: 100%;
height: 1500px;
overflow-y: auto;
border: 0 !important;
}
.sidebyside .langtarget {
float: left;
}
.sidebyside .modaltarget {
float: left;
margin-inline-start: .5rem;
}
.sidebyside #target-association {
margin-top: .5rem;
}
.sidebyside #reference-association {
margin-top: 3.35rem;
}
.target-text {
float: left;
width: auto;
}
[dir="rtl"] .sidebyside .outer-panel, [dir="rtl"] .sidebyside .langtarget, [dir="rtl"] .sidebyside .modaltarget, [dir="rtl"] .target-text {
float: right;
}
@media (width <= 767.98px) {
.sidebyside .outer-panel {
float: none;
width: 100%;
}
.sidebyside #reference-association {
margin-top: 0;
}
.sidebyside #left-panel .inner-panel, .sidebyside #right-panel .inner-panel {
padding: 0;
}
}

View File

@ -0,0 +1 @@
@charset "UTF-8";.sidebyside .outer-panel{float:left;width:50%}.sidebyside #left-panel .inner-panel,.sidebyside #right-panel .inner-panel{padding-inline-end:10px}.sidebyside .full-width{float:none!important;width:100%!important}.sidebyside .full-width .inner-panel{padding:0!important}#reference-association,#target-association{width:100%;height:1500px;overflow-y:auto;border:0!important}.sidebyside .langtarget{float:left}.sidebyside .modaltarget{float:left;margin-inline-start:.5rem}.sidebyside #target-association{margin-top:.5rem}.sidebyside #reference-association{margin-top:3.35rem}.target-text{float:left;width:auto}[dir=rtl] .sidebyside .outer-panel,[dir=rtl] .sidebyside .langtarget,[dir=rtl] .sidebyside .modaltarget,[dir=rtl] .target-text{float:right}@media (width<=767.98px){.sidebyside .outer-panel{float:none;width:100%}.sidebyside #reference-association{margin-top:0}.sidebyside #left-panel .inner-panel,.sidebyside #right-panel .inner-panel{padding:0}}

Binary file not shown.

View File

@ -0,0 +1,72 @@
{
"$schema": "https://developer.joomla.org/schemas/json-schema/web_assets.json",
"name": "com_associations",
"version": "4.0.0",
"description": "Joomla CMS",
"license": "GPL-2.0-or-later",
"assets": [
{
"name": "com_associations.sidebyside",
"type": "preset",
"dependencies": [
"com_associations.sidebyside#style",
"com_associations.sidebyside#script"
]
},
{
"name": "com_associations.admin-associations-default",
"type": "script",
"uri": "com_associations/admin-associations-default.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "72d110"
},
{
"name": "com_associations.admin-associations-modal",
"type": "script",
"uri": "com_associations/admin-associations-modal.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "14d673"
},
{
"name": "com_associations.sidebyside",
"type": "style",
"uri": "com_associations/sidebyside.min.css",
"version": "579941"
},
{
"name": "com_associations.associations-edit",
"type": "script",
"uri": "com_associations/associations-edit.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module",
"defer": true
},
"version": "00d001"
},
{
"name": "com_associations.sidebyside",
"type": "script",
"uri": "com_associations/sidebyside.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "d3a446"
}
]
}

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
*/
Joomla.submitbutton = pressbutton => {
if (pressbutton === 'associations.purge') {
// eslint-disable-next-line no-restricted-globals
if (confirm(Joomla.Text._('COM_ASSOCIATIONS_PURGE_CONFIRM_PROMPT'))) {
Joomla.submitform(pressbutton);
} else {
return false;
}
} else {
Joomla.submitform(pressbutton);
}
return true;
};

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.submitbutton=o=>{if(o==="associations.purge")if(confirm(Joomla.Text._("COM_ASSOCIATIONS_PURGE_CONFIRM_PROMPT")))Joomla.submitform(o);else return!1;else Joomla.submitform(o);return!0};

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
*/
Joomla = window.Joomla || {};
((Joomla, document) => {
document.addEventListener('DOMContentLoaded', () => {
const targetAssociation = window.parent.document.getElementById('target-association');
const links = [].slice.call(document.querySelectorAll('.select-link'));
links.forEach(item => {
item.addEventListener('click', ({
target
}) => {
targetAssociation.src = `${targetAssociation.getAttribute('data-editurl')}&task=${targetAssociation.getAttribute('data-item')}.edit&id=${parseInt(target.getAttribute('data-id'), 10)}`;
window.parent.Joomla.Modal.getCurrent().close();
});
});
});
})(Joomla, document);

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||{},((i,e)=>{e.addEventListener("DOMContentLoaded",()=>{const t=window.parent.document.getElementById("target-association");[].slice.call(e.querySelectorAll(".select-link")).forEach(a=>{a.addEventListener("click",({target:o})=>{t.src=`${t.getAttribute("data-editurl")}&task=${t.getAttribute("data-item")}.edit&id=${parseInt(o.getAttribute("data-id"),10)}`,window.parent.Joomla.Modal.getCurrent().close()})})})})(Joomla,document);

View File

@ -0,0 +1,198 @@
/**
* @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) => {
Joomla.hideAssociation = (formControl, languageCode) => {
document.querySelectorAll('#associations .control-group').forEach(element => {
// Current selected language. Hide it
const el = element.querySelector('.control-label label');
if (el) {
const attribute = el.getAttribute('for');
if (attribute.replace(/_name$/, '') === `${formControl}_associations_${languageCode.replace('-', '_')}`) {
element.classList.add('hidden');
}
}
});
};
Joomla.showAssociationMessage = () => {
const associations = document.getElementById('associations');
if (associations) {
const html = document.createElement('joomla-alert');
html.innerText = Joomla.Text._('JGLOBAL_ASSOC_NOT_POSSIBLE');
associations.insertAdjacentElement('afterbegin', html);
}
document.querySelectorAll('#associations .control-group').forEach(element => {
element.classList.add('hidden');
});
};
/**
* Inject associations into other association fields
*
* This function is called whenever the Ajax request within propagateAssociation() completes
* successfully.
* Its purpose is to inject the associations which have been returned in the Ajax response into
* the other association fields in the form.
* It does this by invoking the various callback functions of those association fields (i.e. the
* function which gets called whenever the administrator selects an association via the modal),
* and passing the appropriate associated record details.
*
* @param result The response from the Ajax request.
* Its structure is that generated by the JResponseJson class,
* with the data field containing the associations
* @param callbackFunctionPrefix The name of the callback function which the modal window uses
* to set the selected item as the association, but minus the
* language tag at the end
*
* @return boolean
*
* @since 3.9.0
*/
Joomla.injectAssociations = (result, callbackFunctionPrefix) => {
let functionName;
if (result.success) {
if (result.data.length !== 0) {
Object.keys(result.data).forEach(lang => {
functionName = callbackFunctionPrefix + lang.replace('-', '_');
window[functionName](result.data[lang].id, result.data[lang].title, result.data[lang].catid, null, null, lang);
});
}
if (result.message) {
Joomla.renderMessages({
notice: [result.message]
});
}
} else {
Joomla.renderMessages({
warning: [Joomla.Text._('JGLOBAL_ASSOCIATIONS_PROPAGATE_FAILED')]
});
}
};
/**
* Propagate associations from this field into other association fields
*
* This function is called whenever an administrator populates an association (in the association
* modal field) and then clicks on the Propagate button.
* The purpose of this function is to find what other records (if any) are associated with the
* one which the administrator has selected, and populate the other association fields with these
* records. (Otherwise, if the administrator just clicks on Save without clicking on Propagate,
* those other associations will be deleted). It does this by finding the id of the selected
* associated record (from a hidden field) and makes an Ajax call to the server to find the other
* associations, also passing up the language of the record currently being edited, as it should
* be excluded. Once it has received from the server the other associations it calls
* injectAssociations to inject them into the other association fields within the form.
*
* @param fieldPrefix The stem of the html ids for the elements comprising the
* modal field
* @param callbackFunctionPrefix The name of the callback function which the modal window uses
* to set the selected item as the association, but minus the
* language tag at the end
*
* @return boolean
*
* @since 3.9.0
*/
Joomla.propagateAssociation = (fieldPrefix, callbackFunctionPrefix) => {
// Find the id of the record which has been set as an association
const assocId = document.getElementById(`${fieldPrefix}_id`).value;
// Find the language of the record being edited
const languageField = document.getElementById('jform_language');
const currentLang = languageField.options[languageField.selectedIndex].value;
const data = {
task: 'ajax.fetchAssociations',
format: 'json',
assocId,
excludeLang: currentLang
};
data[Joomla.getOptions('csrf.token', '')] = 1;
const queryString = Object.keys(data).reduce((a, k) => {
a.push(`${k}=${encodeURIComponent(data[k])}`);
return a;
}, []).join('&');
const url = `${document.forms.adminForm.action}&${queryString}`;
Joomla.request({
// Find the action url associated with the form - we need to add the token to this
url,
method: 'GET',
data: JSON.stringify(data),
headers: {
'Content-Type': 'application/json'
},
onSuccess: response => {
Joomla.injectAssociations(JSON.parse(response), callbackFunctionPrefix);
},
onError: () => {
Joomla.renderMessages({
warning: [Joomla.Text._('JGLOBAL_ASSOCIATIONS_PROPAGATE_FAILED')]
});
}
});
return false;
};
document.addEventListener('DOMContentLoaded', () => {
const associationsEditOptions = Joomla.getOptions('system.associations.edit');
const formControl = associationsEditOptions.formControl || 'jform';
const formControlLanguage = document.getElementById(`${formControl}_language`);
// Hide the associations tab if needed
if (parseInt(associationsEditOptions.hidden, 10) === 1) {
Joomla.showAssociationMessage();
} else if (formControlLanguage) {
// Hide only the associations for the current language
Joomla.hideAssociation(formControl, formControlLanguage.value);
}
// When changing the language
if (formControlLanguage) {
formControlLanguage.addEventListener('change', ({
target
}) => {
// Remove message if any
Joomla.removeMessages();
let existsAssociations = false;
/** For each language, remove the associations, ie,
* empty the associations fields and reset the buttons to Select/Create
*/
document.querySelectorAll('#associations .control-group').forEach(element => {
const attribute = element.querySelector('.control-label label').getAttribute('for');
const languageCode = attribute.replace('_name', '').replace('jform_associations_', '');
// Show the association fields
element.classList.remove('hidden');
// Check if there was an association selected for this language
if (!existsAssociations && document.getElementById(`${formControl}_associations_${languageCode}_id`).value !== '') {
existsAssociations = true;
}
// Call the modal clear button
let clear = document.getElementById(`${formControl}_associations_${languageCode}_clear`);
clear = clear || element.querySelector('[data-button-action="clear"]');
clear.click();
});
// If associations existed, send a warning to the user
if (existsAssociations) {
Joomla.renderMessages({
warning: [Joomla.Text._('JGLOBAL_ASSOCIATIONS_RESET_WARNING')]
});
}
// If the selected language is All hide the fields and add a message
const selectedLanguage = target.value;
if (selectedLanguage === '*') {
Joomla.showAssociationMessage();
} else {
// Else show the associations fields/buttons and hide the current selected language
Joomla.hideAssociation(formControl, selectedLanguage);
}
});
}
});
})(Joomla, document);

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,n)=>{e.hideAssociation=(s,t)=>{n.querySelectorAll("#associations .control-group").forEach(i=>{const a=i.querySelector(".control-label label");a&&a.getAttribute("for").replace(/_name$/,"")===`${s}_associations_${t.replace("-","_")}`&&i.classList.add("hidden")})},e.showAssociationMessage=()=>{const s=n.getElementById("associations");if(s){const t=n.createElement("joomla-alert");t.innerText=e.Text._("JGLOBAL_ASSOC_NOT_POSSIBLE"),s.insertAdjacentElement("afterbegin",t)}n.querySelectorAll("#associations .control-group").forEach(t=>{t.classList.add("hidden")})},e.injectAssociations=(s,t)=>{let i;s.success?(s.data.length!==0&&Object.keys(s.data).forEach(a=>{i=t+a.replace("-","_"),window[i](s.data[a].id,s.data[a].title,s.data[a].catid,null,null,a)}),s.message&&e.renderMessages({notice:[s.message]})):e.renderMessages({warning:[e.Text._("JGLOBAL_ASSOCIATIONS_PROPAGATE_FAILED")]})},e.propagateAssociation=(s,t)=>{const i=n.getElementById(`${s}_id`).value,a=n.getElementById("jform_language"),c=a.options[a.selectedIndex].value,o={task:"ajax.fetchAssociations",format:"json",assocId:i,excludeLang:c};o[e.getOptions("csrf.token","")]=1;const l=Object.keys(o).reduce((r,d)=>(r.push(`${d}=${encodeURIComponent(o[d])}`),r),[]).join("&"),g=`${n.forms.adminForm.action}&${l}`;return e.request({url:g,method:"GET",data:JSON.stringify(o),headers:{"Content-Type":"application/json"},onSuccess:r=>{e.injectAssociations(JSON.parse(r),t)},onError:()=>{e.renderMessages({warning:[e.Text._("JGLOBAL_ASSOCIATIONS_PROPAGATE_FAILED")]})}}),!1},n.addEventListener("DOMContentLoaded",()=>{const s=e.getOptions("system.associations.edit"),t=s.formControl||"jform",i=n.getElementById(`${t}_language`);parseInt(s.hidden,10)===1?e.showAssociationMessage():i&&e.hideAssociation(t,i.value),i&&i.addEventListener("change",({target:a})=>{e.removeMessages();let c=!1;n.querySelectorAll("#associations .control-group").forEach(l=>{const r=l.querySelector(".control-label label").getAttribute("for").replace("_name","").replace("jform_associations_","");l.classList.remove("hidden"),!c&&n.getElementById(`${t}_associations_${r}_id`).value!==""&&(c=!0);let d=n.getElementById(`${t}_associations_${r}_clear`);d=d||l.querySelector('[data-button-action="clear"]'),d.click()}),c&&e.renderMessages({warning:[e.Text._("JGLOBAL_ASSOCIATIONS_RESET_WARNING")]});const o=a.value;o==="*"?e.showAssociationMessage():e.hideAssociation(t,o)})})})(Joomla,document);

Binary file not shown.

View File

@ -0,0 +1,372 @@
/**
* @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
if (!Joomla) {
throw new Error('Joomla API is not properly initialised');
}
const hideElements = ids => {
ids.forEach(id => {
const element = document.getElementById(id);
if (element) {
element.classList.add('hidden');
}
});
};
const createOption = (value, text) => {
const option = document.createElement('option');
option.value = value;
option.innerText = text;
return option;
};
// Attach behaviour to toggle button.
document.body.addEventListener('click', ({
target
}) => {
if (target.id === 'toggle-left-panel') {
const referenceHide = target.getAttribute('data-hide-reference');
const referenceShow = target.getAttribute('data-show-reference');
if (target.innerText === referenceHide) {
target.innerText = referenceShow;
} else {
target.innerText = referenceHide;
}
document.getElementById('left-panel').classList.toggle('hidden');
document.getElementById('right-panel').classList.toggle('full-width');
}
});
// Attach behaviour to language selector change event.
document.body.addEventListener('change', ({
target
}) => {
if (target.id === 'jform_itemlanguage') {
const targetIframe = document.getElementById('target-association');
const selected = target.value;
// Populate the data attributes and load the the edit page in target frame.
if (selected !== '' && typeof selected !== 'undefined') {
targetIframe.setAttribute('data-action', selected.split(':')[2]);
targetIframe.setAttribute('data-id', selected.split(':')[1]);
targetIframe.setAttribute('data-language', selected.split(':')[0]);
// Iframe load start, show Joomla loading layer.
document.body.appendChild(document.createElement('joomla-core-loader'));
// Load the target frame.
targetIframe.src = `${targetIframe.getAttribute('data-editurl')}&task=${targetIframe.getAttribute('data-item')}.${targetIframe.getAttribute('data-action')}&id=${targetIframe.getAttribute('data-id')}`;
} else {
// Reset the data attributes and no item to load.
hideElements(['toolbar-target', 'toolbar-copy', 'select-change', 'remove-assoc']);
targetIframe.setAttribute('data-action', '');
targetIframe.setAttribute('data-id', '0');
targetIframe.setAttribute('data-language', '');
targetIframe.src = '';
}
}
});
// Attach behaviour to reference frame load event.
document.getElementById('reference-association').addEventListener('load', ({
target
}) => {
// Waiting until the reference has loaded before loading the target to avoid race conditions
let targetURL = Joomla.getOptions('targetSrc', false);
if (targetURL) {
targetURL = targetURL.split('&amp;').join('&');
document.getElementById('target-association').setAttribute('src', targetURL);
Joomla.loadOptions({
targetSrc: false
});
return;
}
// Load Target Pane AFTER reference pane has loaded to prevent session conflict with checkout
document.getElementById('target-association').setAttribute('src', document.getElementById('target-association').getAttribute('src'));
const content = target.contentDocument.body || target.contentWindow.document.body;
// If copy button used
if (content.querySelector('#jform_id') && content.querySelector('#jform_id').value !== target.getAttribute('data-id')) {
const targetAssociation = document.getElementById('target-association');
targetAssociation.src = `${targetAssociation.getAttribute('data-editurl')}&task=${targetAssociation.getAttribute('data-item')}.edit&id=${content.querySelector('#jform_id').value}`;
target.src = `${target.getAttribute('data-editurl')}&task=${target.getAttribute('data-item')}.edit&id=${target.getAttribute('data-id')}`;
}
// Disable language field.
if (content.querySelector('#jform_language')) {
content.querySelector('#jform_language').setAttribute('disabled', 'disabled');
}
// Remove modal buttons on the reference
const associationBtn = content.querySelector('#associations .btn');
if (associationBtn) {
associationBtn.remove();
}
const itemLanguageOptions = document.querySelectorAll('#jform_itemlanguage option');
if (itemLanguageOptions) {
itemLanguageOptions.forEach(option => {
const parse = option.value.split(':');
if (typeof parse[0] !== 'undefined') {
// - For modal association selectors.
const langAssociation = parse[0].replace(/-/, '_');
const langAssociationId = content.querySelector(`#jform_associations_${langAssociation}_id`);
if (langAssociationId && langAssociationId.value === '') {
const referenceAssociation = document.getElementById('reference-association');
if (referenceAssociation.hasAttribute('data-no-assoc')) {
content.querySelector(`#jform_associations_${langAssociation}_name`).value = referenceAssociation.getAttribute('data-no-assoc');
}
}
}
});
}
// Iframe load finished, hide Joomla loading layer.
const spinner = document.querySelector('joomla-core-loader');
if (spinner) {
spinner.parentNode.removeChild(spinner);
}
});
// Attach behaviour to target frame load event.
document.getElementById('target-association').addEventListener('load', ({
target
}) => {
// We need to check if we are not loading a blank iframe.
if (target.getAttribute('src') !== '') {
document.getElementById('toolbar-target').classList.remove('hidden');
document.getElementById('toolbar-copy').classList.remove('hidden');
document.getElementById('select-change').classList.remove('hidden');
const targetLanguage = target.getAttribute('data-language');
const targetId = target.getAttribute('data-id');
const content = target.contentDocument.body || target.contentWindow.document.body;
const targetLoadedId = content.querySelector('#jform_id').value || '0';
const reference = document.getElementById('reference-association');
// Remove modal buttons on the target
// content.querySelector('a[href="#associations"]').parentNode.querySelector('.btn').forEach(btn => btn.remove());
// content.querySelector('#associations .btn').forEach(btn => btn.remove());
// Always show General tab first if associations tab is selected on the reference
const associations = content.querySelector('#associations');
if (associations && associations.classList.contains('active')) {
content.querySelector('a[href="#associations"]').parentNode.classList.remove('active');
associations.classList.remove('active');
content.querySelector('.nav-tabs li').classList.add('active');
content.querySelector('.tab-content .tab-pane').classList.add('active');
}
// Update language field with the selected language and them disable it.
if (content.querySelector('#jform_language')) {
content.querySelector('#jform_language').value = targetLanguage;
content.querySelector('#jform_language').setAttribute('disabled', 'disabled');
}
// If we are creating a new association (before save) we need to add the new association.
if (targetLoadedId === '0') {
document.getElementById('select-change-text').innerHTML = Joomla.sanitizeHtml(document.getElementById('select-change').getAttribute('data-select'));
} else {
// If we are editing an association.
// Show change language button
document.getElementById('select-change-text').innerHTML = Joomla.sanitizeHtml(document.getElementById('select-change').getAttribute('data-change'));
document.getElementById('remove-assoc').classList.remove('hidden');
document.getElementById('remove-assoc').classList.add('toolbar-copy');
// Add the id to list of items to check in on close.
const currentIdList = document.getElementById('target-id').value;
const updatedList = currentIdList === '' ? targetLoadedId : `${currentIdList},${targetLoadedId}`;
document.getElementById('target-id').value = updatedList;
// If we created a new association (after save).
if (targetLoadedId !== targetId) {
// Refresh the language selector with the new id (used after save).
const languageSelector = document.querySelector(`#jform_itemlanguage option[value^="${targetLanguage}:${targetId}:add"]`);
if (languageSelector) {
languageSelector.value = `${targetLanguage}:${targetLoadedId}:edit`;
}
// Update main frame data-id attribute (used after save).
target.setAttribute('data-id', targetLoadedId);
target.setAttribute('data-action', 'edit');
}
// Update the reference item associations tab.
const referenceContent = reference.contentDocument.body || reference.contentWindow.document.body;
const languageCode = targetLanguage.replace(/-/, '_');
const title = content.querySelector(`#jform_${reference.getAttribute('data-title')}`).value;
// - For modal association selectors.
const referenceContentId = referenceContent.querySelector(`#jform_associations_${languageCode}_id`);
if (referenceContentId) {
referenceContentId.value = targetLoadedId;
}
const referenceContentName = referenceContent.querySelector(`#jform_associations_${languageCode}_name`);
if (referenceContentName) {
referenceContentName.value = title;
}
// - For chosen association selectors (menus).
const referenceContentDropdown = referenceContent.querySelector(`#jform_associations_${languageCode}`);
if (referenceContentDropdown) {
referenceContentDropdown.appendChild(createOption(targetLoadedId, title));
referenceContentDropdown.value = targetLoadedId;
}
}
// Update the target item associations tab.
const referenceId = reference.getAttribute('data-id');
const referenceLanguageCode = reference.getAttribute('data-language').replace(/-/, '_');
const referenceTitle = reference.getAttribute('data-title-value');
// - For modal association selectors.
const targetContentId = content.querySelector(`#jform_associations_${referenceLanguageCode}_id`);
if (targetContentId) {
targetContentId.value = referenceId;
}
const targetContentName = content.querySelector(`#jform_associations_${referenceLanguageCode}_name`);
if (targetContentName) {
targetContentName.value = referenceTitle;
}
// - For chosen association selectors (menus).
let chosenField = content.querySelector(`#jform_associations_${referenceLanguageCode}`);
if (chosenField) {
chosenField.appendChild(createOption(referenceId, referenceTitle));
chosenField.value = referenceId;
}
document.querySelectorAll('#jform_itemlanguage option').forEach(option => {
const parse = option.value.split(':');
if (typeof parse[1] !== 'undefined' && parse[1] !== '0') {
// - For modal association selectors.
const langAssociation = parse[0].replace(/-/, '_');
const formAssociationId = content.querySelector(`#jform_associations_${langAssociation}_id`);
if (formAssociationId) {
// eslint-disable-next-line prefer-destructuring
content.querySelector(`#jform_associations_${langAssociation}_id`).value = parse[1];
}
// - For chosen association selectors (menus).
chosenField = content.querySelector(`#jform_associations_${langAssociation}`);
if (chosenField) {
chosenField.appendChild(createOption(parse[1], ''));
// eslint-disable-next-line prefer-destructuring
chosenField.value = parse[1];
}
}
});
// Iframe load finished, hide Joomla loading layer.
const spinner = document.querySelector('joomla-core-loader');
if (spinner) {
spinner.parentNode.removeChild(spinner);
}
}
});
// Save button actions, replacing the default Joomla.submitbutton() with custom function.
Joomla.submitbutton = task => {
// Using close button, normal joomla submit.
if (task === 'association.cancel') {
Joomla.submitform(task);
} else if (task === 'copy') {
document.body.appendChild(document.createElement('joomla-core-loader'));
const targetLang = document.getElementById('target-association').getAttribute('data-language');
const referlangInput = window.frames['reference-association'].document.getElementById('jform_language');
// Set target language, to get correct content language in the copy
referlangInput.removeAttribute('disabled');
referlangInput.value = targetLang;
window.frames['reference-association'].Joomla.submitbutton(`${document.getElementById('adminForm').getAttribute('data-associatedview')}.save2copy`);
} else if (task === 'undo-association') {
// Undo association
const referenceEl = document.getElementById('reference-association');
const targetEl = document.getElementById('target-association');
const referenceLang = referenceEl.getAttribute('data-language').replace(/-/, '_');
const targetLang = targetEl.getAttribute('data-language').replace(/-/, '_');
const reference = referenceEl.contentDocument.body || referenceEl.contentWindow.document.body;
const target = targetEl.contentDocument.body || targetEl.contentWindow.document.body;
// Remove it on the reference
// - For modal association selectors.
const referenceAssocId = reference.querySelector(`#jform_associations_${targetLang}_id`);
if (referenceAssocId) {
referenceAssocId.value = '';
}
const referenceAssocName = reference.querySelector(`#jform_associations_${targetLang}_name`);
if (referenceAssocName) {
referenceAssocName.value = '';
}
// - For chosen association selectors (menus).
const referenceAssoc = reference.querySelector(`#jform_associations_${targetLang}`);
if (referenceAssoc) {
referenceAssoc.value = '';
}
// Remove it on the target
document.querySelectorAll('#jform_itemlanguage option').forEach(option => {
let lang = option.value.split(':')[0];
if (lang) {
lang = lang.replace(/-/, '_');
const formAssociationId = target.querySelector(`#jform_associations_${lang}_id`);
if (formAssociationId) {
// - For modal association selectors.
formAssociationId.value = '';
}
const formAssociation = target.querySelector(`#jform_associations_${lang}`);
if (formAssociation) {
// - For chosen association selectors (menus).
formAssociation.value = '';
}
}
});
// Same as above but reference language is not in the selector
// - For modal association selectors.
const targetAssocId = target.querySelector(`#jform_associations_${referenceLang}_id`);
if (targetAssocId) {
targetAssocId.value = '';
}
const targetAssocName = target.querySelector(`#jform_associations_${referenceLang}_name`);
if (targetAssocName) {
targetAssocName.value = '';
}
// - For chosen association selectors (menus).
const targetAssoc = target.querySelector(`#jform_associations_${referenceLang}`);
if (targetAssoc) {
targetAssoc.value = '';
}
// Reset switcher after removing association
const currentLangSelect = document.getElementById('jform_itemlanguage');
const currentSwitcher = currentLangSelect.value;
const currentLang = targetLang.replace(/_/, '-');
const itemLanguageItem = document.querySelector(`#jform_itemlanguage option[value="${currentSwitcher}"]`);
if (itemLanguageItem) {
itemLanguageItem.value = `${currentLang}:0:add`;
}
currentLangSelect.value = '';
currentLangSelect.dispatchEvent(new CustomEvent('change', {
bubbles: true,
cancelable: true
}));
// Save one of the items to confirm action
Joomla.submitbutton('reference');
} else {
// Saving target or reference, send the save action to the target/reference iframe.
// We need to re-enable the language field to save.
const el = document.getElementById(`${task}-association`);
const content = el.contentDocument.body || el.contentWindow.document.body;
const languageButton = content.querySelector('#jform_language');
if (languageButton) {
languageButton.removeAttribute('disabled');
}
window.frames[`${task}-association`].Joomla.submitbutton(`${document.getElementById('adminForm').getAttribute('data-associatedview')}.apply`);
}
return false;
};
hideElements(['toolbar-target', 'toolbar-copy']);

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1,20 @@
div.button2-left > div.add_attachment
{
background: url(../images/add_attachment_button.png) no-repeat scroll 100% 0;
}
div#editor-xtd-buttons i.icon-add_attachment
{
background: url(../images/add_attachment_button_small.png) no-repeat scroll 100% 0;
vertical-align: middle;
height: 16px;
width: 16px;
}
div#editor-xtd-buttons i.icon-add_attachment_frontend
{
background: url(../images/add_attachment_button_small.png) no-repeat scroll 100% 0;
vertical-align: middle;
height: 16px;
width: 16px;
}

View File

@ -0,0 +1,10 @@
.button2-left .add_attachment {
background: url(../images/add_attachment_button_rtl.png) 0 0 no-repeat;
}
div#editor-xtd-buttons div.btn-toolbar i.icon-add_attachment {
background: url(../images/add_attachment_button_small_rtl.png) 0 0 no-repeat;
vertical-align: middle;
height: 16px;
width: 16px;
}

View File

@ -0,0 +1,395 @@
/* Styles for the main list of attachments in the administrative back end */
body.component {
padding-top: 0;
margin-right: 10px;
}
form.attachmentsBackend * {
float: none;
}
form.attachmentsBackend,
form#adminForm
{
font-size: 1.2em;
}
form.attachmentsBackend th,
form#adminForm th
{
font-size: 1em;
}
div#element-box div.m form#adminForm table#attachmentsList tr td a {
font-size: 85%;
}
form#adminForm div.attachments_filter label.filter-search-lbl {
display: inline;
font-size: 100%;
}
form#adminForm div.attachments_filter {
padding: 0 0 2px 6px;
margin: 0 0 6px 0;
}
form#adminForm button#reset_order {
margin: 0 0 0 3em;
}
form#adminForm div.attachments_filter table,
form#adminForm div.attachments_filter tbody,
form#adminForm div.attachments_filter tr,
form#adminForm div.attachments_filter td {
padding: 0;
margin: 0;
}
form#adminForm div.attachments_filter td {
vertical-align: middle;
}
form#adminForm div.attachments_filter td select,
form#adminForm div.attachments_filter td option,
form#adminForm div.attachments_filter td input {
vertical-align: middle;
padding: 0;
margin: 0;
}
form#adminForm div.attachments_filter td select {
height: 1.6em;
}
form#adminForm input[type=checkbox] {
vertical-align: middle;
}
table.adminlist th {
text-align: left;
border-bottom: 0;
/* padding: 4px 0 4px 8px; */
}
table.adminlist th.at_checked {
padding: 0;
text-align: center;
width: 20px;
}
table.adminlist th.at_published { text-align: center; }
table.adminlist th.at_filename { text-align: left; }
table.adminlist th.at_description { text-align: left; }
table.adminlist th.at_access { text-align: center; }
table.adminlist th.at_user_field { text-align: left; }
table.adminlist th.at_file_type { text-align: center; }
table.adminlist th.at_file_size { text-align: center; }
table.adminlist th.at_creator_name { text-align: left; }
table.adminlist th.at_created_date { text-align: left; }
table.adminlist th.at_mod_date { text-align: left; }
table.adminlist th.at_downloads { text-align: center; }
table.adminlist td {
text-align: left;
border-bottom: 0;
}
table.adminlist img.link_overlay {
margin-left: -16px;
}
table.adminlist td.at_filename {
text-align: left;
padding: 4px 0 4px 8px;
}
table.adminlist td.at_filename {
font-size: 120%;
}
div.container-fluid table.adminlist td.at_filename {
font-size: 100%;
}
table.adminlist td.at_filename a img {
vertical-align: top;
}
table.adminlist td.at_checked {
text-align: center;
width: 20px;
padding: 0;
}
table.adminlist td.at_published { text-align: center; padding: 4px 0 4px 8px;}
table.adminlist td.at_description { text-align: left; padding: 4px 0 4px 8px;}
table.adminlist td.at_access { text-align: center; padding: 4px 0 4px 8px;}
table.adminlist td.at_user_field { text-align: left; padding: 4px 0 4px 8px;}
table.adminlist td.at_file_type { text-align: center; padding: 4px 0 4px 8px;}
table.adminlist td.at_file_size { text-align: center; padding: 4px 0 4px 8px;}
table.adminlist td.at_creator_name { text-align: left; padding: 4px 0 4px 8px;}
table.adminlist td.at_created_date { text-align: left; padding: 4px 0 4px 8px;}
table.adminlist td.at_mod_date { text-align: left; padding: 4px 0 4px 8px;}
table.adminlist td.at_downloads { text-align: center; padding: 4px 0 4px 8px;}
table.adminlist td.at_parentsep {
height: 0.8em;
background-color: #DDD;
border-top: 1px solid #999;
border-bottom: 1px solid #BBB;
font-weight: bold;
}
table.adminlist tr.row1 {
background-color: #F0F0F0;
}
table.adminlist span.error {
color: #FF0000;
font-style: italic;
font-size: 110%;
}
table.adminlist td.showlinks a {
font-size: 110%;
font-weight: bold;
text-align: center;
}
/* For the link to download a file */
table.adminlist a.downloadAttach {
margin-left: 0px;
font-size: 80%;
color : #F00;
text-decoration: none;
}
table.adminlist a.downloadAttach:link { color : #F00; text-decoration: none; }
table.adminlist a.downloadAttach:visited { color : #F00; text-decoration: none; }
table.adminlist a.downloadAttach:hover { color : #F00; text-decoration: underline; }
table.adminlist a.downloadAttach:active { color : #F00; text-decoration: none; }
/* For the link to add another attachment to an parent */
table.adminlist a.addAttach {
font-weight: normal;
color: #F00;
text-decoration: none;
}
table.adminlist a.addAttach:link { color : #F00; text-decoration: none; }
table.adminlist a.addAttach:visited { color : #F00; text-decoration: none; }
table.adminlist a.addAttach:hover { color : #F00; text-decoration: underline; }
table.adminlist a.addAttach:active { color : #F00; text-decoration: none; }
table.adminlist a.addAttach img {
vertical-align: text-bottom;
}
/* Styles for attachments admin */
div.attachmentsAdmin {
margin-left: 20px;
margin-top: 20px;
}
div.attachmentsAdmin h1 {
line-height: normal;
font-size: 200%;
font-weight: bold;
color: #000088;
}
div.attachmentsAdmin h2 {
line-height: normal;
font-size: 150%;
font-weight: bold;
}
div.attachmentsAdmin li a { padding: 2px; }
div.attachmentsAdmin li a:link { color: #0000FF; text-decoration: none; }
div.attachmentsAdmin li a:hover {
color: #0000FF; text-decoration: none;
background-color: #DDDDDD;
}
div.attachmentsAdmin li a:visited { color: #0000FF; text-decoration: none; }
div.attachmentsAdmin li a:active { color: #0000FF; text-decoration: none; }
div#componentVersion {
font-style: italic;
font-size: 1em;
float: right;
}
##F00border {
border: 1px solid #F00;
}
/* For the link to change the article */
td#key_article {
padding-top: 8px;
padding-bottom: 8px;
}
a.changeButton {
padding: 1px 4px 1px 4px;
margin-left: 12px;
font-size: 95%;
color : #333333;
text-decoration: none;
background-color: #CCCCCC;
border: 1px solid #888888;
}
a.changeButton:link { color : #333333; text-decoration: none; }
a.changeButton:visited { color : #333333; text-decoration: none; }
a.changeButton:hover { color : #333333; text-decoration: none; background-color: #DDDDDD; }
a.changeButton:active { color : #333333; text-decoration: none; }
a.modal-button {
padding-top: 1px;
padding-top: 1px;
padding-left: 4px;
padding-right: 4px;
color: #333333;
background-color: #CCCCCC;
border: 1px solid #888888;
font-weight: bold;
}
a.modal-button:link { color: #333333; text-decoration: none; }
a.modal-button:hover { color: #333333; text-decoration: none; background-color: #DDDDDD; }
a.modal-button:visited { color: #333333; text-decoration: none; }
a.modal-button:active { color: #333333; text-decoration: none; }
input#upload, input#upload_warning {
margin-top: 4px;
}
div#attachmentsPotentialParents {
margin: 2em 0 0 0;
font-size: 1.2em;
}
div.attachmentsList {
margin-top: 0;
font-size: 1.1em;
}
.form-horizontal .control-group .controls {
margin-left: 300px;
}
.form-horizontal .control-group .control-label {
width: 285px;
padding-left: 4px;
background-color: #F9F9F9;
}
.form-horizontal .control-group .radio.btn-group {
padding-top: 0;
}
/* For warning dialog */
div.attachmentsWarning {
padding: 10px;
margin: 20px;
}
div.attachmentsWarning h1 {
line-height: normal;
font-size: 250%;
font-weight: bold;
text-align: center;
color: #F00;
border-bottom: 1px solid #DDD;
}
div.attachmentsWarning h2 {
line-height: normal;
font-size: 175%;
font-weight: bold;
text-align: center;
margin: 1em 0 1em 0;
}
*
div.attachmentsWarning input[type="button"],
div.attachmentsWarning input[type="submit"]
{
font-size: 1.3em;
font-weight: bold;
border: 1px solid #666;
background-color: #DDD;
}
div.attachmentsWarning span.left {
width: 8em;
float: left;
}
div.attachmentsWarning span.right {
width: 8em;
float: right;
}
/* For utils command list */
div#modal-adminUtils {
width: 700px;
}
div#modal-adminUtils div.modal-header {
/* Copied from 3.0 .subheader */
background: -moz-linear-gradient(center top , #FFFFFF 0%, #EDEDED 100%) repeat scroll 0 0 transparent;
border-bottom: 1px solid #D3D3D3;
color: #0C192E;
margin-bottom: 10px;
text-shadow: 0 1px 0 #FFFFFF;
}
div#utilsList {
margin-left: 0;
}
div#utilsList h1 {
font-size: 150%;
}
div#utilsList h2 {
font-size: 125%;
}
/* For icons */
.icon-48-attachments { background-image: url(../images/attachments_logo48.png); }
.icon-32-adminUtils { background-image: url(../images/attachments_utils32.png); }
.icon-16-attachments { background-image: url(../images/attachments.png); }
/* for Joomla 3.x */
div.container-fluid form#adminForm
{
font-size: 1em;
}
/* for Joomla 3 page logo */
body.com_attachments h1.page-title
{
padding-left: 40px;
background-image: url(../images/attachments_logo32.png);
background-repeat:no-repeat;
}

View File

@ -0,0 +1,660 @@
/* Styles for the main list of attachments in the administrative back end */
body.component {
padding-top: 0;
margin: 4px 6px 0 6px;
}
form.attachmentsBackend * {
float: none;
}
form.attachmentsBackend,
form#adminForm
{
font-size: 1.2em;
}
form.attachmentsBackend th,
form#adminForm th
{
font-size: 1em;
}
form.attachmentsBackend div.right,
form#adminForm div.right {
display: inline-block;
float: right;
padding-right: 10px;
}
/* for Joomla 3.x */
div.container-fluid form#adminForm
{
font-size: 1em;
}
div#element-box div.m form#adminForm table#attachmentsList tr td a {
font-size: 85%;
}
form#adminForm div.attachments_filter label.filter-search-lbl {
display: inline;
font-size: 100%;
}
form#adminForm div.attachments_filter {
padding: 0 0 2px 6px;
margin: 0 0 6px 0;
}
form#adminForm button#reset_order {
margin: 0 0 0 3em;
}
form#adminForm div.attachments_filter table,
form#adminForm div.attachments_filter tbody,
form#adminForm div.attachments_filter tr,
form#adminForm div.attachments_filter td {
padding: 0;
margin: 0;
}
form#adminForm div.attachments_filter td {
vertical-align: middle;
}
form#adminForm div.attachments_filter td select,
form#adminForm div.attachments_filter td option,
form#adminForm div.attachments_filter td input {
vertical-align: middle;
padding: 0;
margin: 0;
}
form#adminForm div.attachments_filter td select {
height: 1.6em;
}
form#adminForm input[type=checkbox] {
vertical-align: middle;
}
table.adminlist th {
text-align: left;
border-bottom: 0;
padding: 4px 0 4px 8px;
}
table.adminlist th.at_checked {
padding: 0;
text-align: center;
width: 20px;
}
table.adminlist th.at_published { text-align: center; }
table.adminlist th.at_filename { text-align: left; }
table.adminlist th.at_description { text-align: left; }
table.adminlist th.at_access { text-align: center; }
table.adminlist th.at_user_field { text-align: left; }
table.adminlist th.at_file_type { text-align: center; }
table.adminlist th.at_file_size { text-align: center; }
table.adminlist th.at_creator_name { text-align: left; }
table.adminlist th.at_created_date { text-align: left; }
table.adminlist th.at_mod_date { text-align: left; }
table.adminlist th.at_downloads { text-align: center; }
table.adminlist td {
text-align: left;
border-bottom: 0;
}
table.adminlist img#link {
margin-left: -16px;
}
table.adminlist td.at_filename {
text-align: left;
padding: 4px 0 4px 8px;
}
table.adminlist td.at_filename {
font-size: 120%;
}
div.container-fluid table.adminlist td.at_filename {
font-size: 100%;
}
table.adminlist td.at_filename a img {
vertical-align: top;
}
table.adminlist td.at_checked {
text-align: center;
width: 20px;
padding: 0;
}
table.adminlist td.at_published { text-align: center; padding: 4px 0 4px 8px;}
table.adminlist td.at_description { text-align: left; padding: 4px 0 4px 8px;}
table.adminlist td.at_access { text-align: center; padding: 4px 0 4px 8px;}
table.adminlist td.at_user_field { text-align: left; padding: 4px 0 4px 8px;}
table.adminlist td.at_file_type { text-align: center; padding: 4px 0 4px 8px;}
table.adminlist td.at_file_size { text-align: center; padding: 4px 0 4px 8px;}
table.adminlist td.at_creator_name { text-align: left; padding: 4px 0 4px 8px;}
table.adminlist td.at_created_date { text-align: left; padding: 4px 0 4px 8px;}
table.adminlist td.at_mod_date { text-align: left; padding: 4px 0 4px 8px;}
table.adminlist td.at_downloads { text-align: center; padding: 4px 0 4px 8px;}
table.adminlist td.at_parentsep {
height: 0.8em;
background-color: #DDD;
border-top: 1px solid #999;
border-bottom: 1px solid #BBB;
font-weight: bold;
}
table.adminlist tr.row1 {
background-color: #F0F0F0;
}
span.error {
color: #FF0000;
font-style: italic;
font-size: 110%;
}
table.adminlist td.showlinks a {
font-size: 110%;
font-weight: bold;
text-align: center;
}
/* For the link to download a file */
a.downloadAttach {
margin-left: 0px;
font-size: 80%;
color : #F00;
text-decoration: none;
}
a.downloadAttach:link { color : #F00; text-decoration: none; }
a.downloadAttach:visited { color : #F00; text-decoration: none; }
a.downloadAttach:hover { color : #F00; text-decoration: underline; }
a.downloadAttach:active { color : #F00; text-decoration: none; }
/* For the link to add another attachment to an parent */
a.addAttach {
font-weight: normal;
color: #F00;
text-decoration: none;
}
a.addAttach:link { color : #F00; text-decoration: none; }
a.addAttach:visited { color : #F00; text-decoration: none; }
a.addAttach:hover { color : #F00; text-decoration: underline; }
a.addAttach:active { color : #F00; text-decoration: none; }
a.addAttach img {
vertical-align: text-bottom;
}
/* Styles for attachments admin */
div.attachmentsAdmin {
margin-left: 20px;
margin-top: 20px;
}
div.attachmentsAdmin h1 {
line-height: normal;
font-size: 200%;
font-weight: bold;
color: #000088;
}
div.attachmentsAdmin h2 {
line-height: normal;
font-size: 150%;
font-weight: bold;
}
div.attachmentsAdmin li a { padding: 2px; }
div.attachmentsAdmin li a:link { color: #0000FF; text-decoration: none; }
div.attachmentsAdmin li a:hover {
color: #0000FF; text-decoration: none;
background-color: #DDDDDD;
}
div.attachmentsAdmin li a:visited { color: #0000FF; text-decoration: none; }
div.attachmentsAdmin li a:active { color: #0000FF; text-decoration: none; }
div#componentVersion {
font-style: italic;
font-size: 1em;
float: right;
}
##F00border {
border: 1px solid #F00;
}
/* For the link to change the article */
td#key_article {
padding-top: 8px;
padding-bottom: 8px;
}
a.changeButton {
padding: 1px 4px 1px 4px;
margin-left: 12px;
font-size: 95%;
color : #333333;
text-decoration: none;
background-color: #CCCCCC;
border: 1px solid #888888;
}
a.changeButton:link { color : #333333; text-decoration: none; }
a.changeButton:visited { color : #333333; text-decoration: none; }
a.changeButton:hover { color : #333333; text-decoration: none; background-color: #DDDDDD; }
a.changeButton:active { color : #333333; text-decoration: none; }
a.modal-button {
padding-top: 1px;
padding-top: 1px;
padding-left: 4px;
padding-right: 4px;
color: #333333;
background-color: #CCCCCC;
border: 1px solid #888888;
font-weight: bold;
}
a.modal-button:link { color: #333333; text-decoration: none; }
a.modal-button:hover { color: #333333; text-decoration: none; background-color: #DDDDDD; }
a.modal-button:visited { color: #333333; text-decoration: none; }
a.modal-button:active { color: #333333; text-decoration: none; }
/* For the upload attachment form */
form.attachmentsBackend {
margin: 0 0 8px 0;
}
form.attachmentsBackend fieldset,
form.attachmentsBackend td > fieldset.radio {
margin: 0;
}
form.attachmentsBackend fieldset.adminform table.admintable td label,
form.attachmentsBackend fieldset.adminform table.admintable td input[type="radio"],
form.attachmentsBackend fieldset.adminform table.admintable td input[type="checkbox"]
{
float: none;
padding: 0;
margin: 0 0 0 0.5em;
display: inline;
}
form.attachmentsBackend fieldset.adminform table.admintable tr {
margin: 4px 0 4px 0;
border: 1px solid #FFF;
}
form.attachmentsBackend fieldset.adminform table.admintable td select.inputbox {
background-color: #DDD;
margin: 0 8px 0 1px;
}
form.attachmentsBackend fieldset.adminform table.admintable td input[type="checkbox"] {
margin: 0 0 0 0.25em;
}
form.attachmentsBackend fieldset.adminform table.admintable td label {
font-size: 1em;
}
form.attachmentsBackend fieldset.adminform table.admintable td label.radiobtn {
float: none;
min-width: 0em;
padding: 0;
margin: 0 1em 0 0;
display: inline;
}
form.attachmentsBackend legend {
font-size: 140%;
font-weight: bold;
}
form.attachmentsBackend input {
float: none;
border: 1px solid #888;
color : #333333;
background-color: #CCC;
margin: 2px;
}
form.attachmentsBackend input[type="text"] {
background-color: transparent;
}
form.attachmentsBackend input#parent_title {
background-color: #BBB;
color: #555;
width: 45%;
}
form.attachmentsBackend input[type="button"],
form.attachmentsBackend input[type="submit"],
{
font-size: 1.3em;
font-weight: bold;
border: 1px solid #666;
}
div.attachmentsWarning div.form_buttons,
form.attachmentsBackend div.form_buttons {
background-color: #F4F4F4;
margin-top: 4px;
padding: 8px 20px 8px 20px;
text-align: center;
}
form.attachmentsBackend span.right {
float: right;
}
form.attachmentsBackend table.admintable {
padding: 4px;
border: 1px solid #CCC;
}
form.attachmentsBackend table.admintable td {
padding: 3px 8px 3px 3px;
vertical-align: middle;
font-size: 1.0em;
}
form.attachmentsBackend table.admintable td span {
float: none;
display: inline-block;
vertical-align: middle;
}
form.attachmentsBackend table.admintable td span.optional {
vertical-align: inherit;
margin-left: 10px;
}
form.attachmentsBackend table.admintable td.key,
form.attachmentsBackend table.admintable td.key2 {
background-color: #DADAF0;
color: #444;
width: 8em;
padding: 0 4px 0 4px;
margin: 2px 0 2px 0;
vertical-align: middle;
text-align: right;
}
form.attachmentsBackend table.admintable td.key2 {
width: 8em;
}
form.attachmentsBackend table.admintable td.switch {
padding: 0 4px 0 10px;
border: 1px solid #CCC;
}
form.attachmentsBackend table.admintable td.at_title {
-- max-width: 18em;
}
form.attachmentsBackend fieldset.adminform label {
vertical-align: middle;
text-align: right;
}
form.attachmentsBackend fieldset.adminform label#upload_file_label {
display: inline-block;
margin-top: 1.2em;
}
div.attachmentsBackendTitle h1 {
font-size: 1.5em;
color: #05B;
margin: 0;
padding: 0 0 4px 0;
}
div.attachmentsBackendTitle h2 {
font-size: 1.25em;
color: #05B;
margin: 0;
padding: 0 0 6px 0;
}
input#upload, input#upload_warning {
margin-top: 4px;
}
div#attachmentsPotentialParents {
font-size: 1.0em;
line-height: 1.5em;
padding: 0 0 6px 0;
float: right;
max-width: 40%;
}
div#attachmentsPotentialParents p {
padding-left: 2em;
}
div#attachmentsPotentialParents span:first-letter
{
margin-left: -2em;
}
div#attachmentsPotentialParents span {
font-weight: bold;
font-size: 1.1em;
margin: 0;
}
div#attachmentsPotentialParents a.changeButton {
margin-left: 0;
margin-right: 0;
}
/* Small fixes for form to edit parameters */
input#paramsregister_url {
width: 100%;
}
input#paramshide_attachments_for {
width: 100%;
}
dl#config-tabs-com_attachments_configuration h3 {
font-size: 1.4em;
}
dl#config-tabs-com_attachments_configuration > dt {
background-color: #CACACA;
}
dl#config-tabs-com_attachments_configuration > dt.open {
background-color: transparent;
}
dl#config-tabs-com_attachments_configuration > dt.open h3 {
font-weight: bold;
}
ul#attachments-options {
font-size: 1.2em;
}
ul#attachments-options > li label,
ul#attachments-options > li select,
ul#attachments-options > li textarea,
ul#attachments-options > li input,
ul#attachments-options > li > fieldset.radio
{
float: none;
display: inline-block;
min-width: 2.75em;
}
ul#attachments-options > li {
background-color: #E0E0E0;
margin: 3px 0 3px 0;
}
ul#attachments-options > li textarea,
ul#attachments-options > li select {
vertical-align: middle;
}
ul#attachments-options > li > label {
min-width: 21em;
width: 21em;
text-align: right;
padding: 0 8px 0 0;
margin: 0 2px 4px 0;
}
ul#attachments-options > li > label#jform_rules-lbl {
display: none;
}
ul#attachments-options div#permissions-sliders {
margin: 4px 0 0 0;
}
form#component-form p.tab-description {
font-size: 150%;
margin: 0 0 0 0;
}
ul#attachments-options div.pane-sliders p {
margin: 0 0 4px 0;
}
/* fieldset#jform_download_mode label { width: 5em; } */
.form-horizontal .control-group .controls {
margin-left: 300px;
}
.form-horizontal .control-group .control-label {
width: 285px;
padding-left: 4px;
background-color: #F9F9F9;
}
.form-horizontal .control-group .radio.btn-group {
padding-top: 0;
}
form.attachmentsBackend > fieldset.adminform > table.admintable {
border: 0;
width: 100%;
}
/* For warning dialog */
div.attachmentsWarning {
padding: 10px;
margin: 20px;
}
div.attachmentsWarning h1 {
line-height: normal;
font-size: 250%;
font-weight: bold;
text-align: center;
color: #F00;
border-bottom: 1px solid #DDD;
}
div.attachmentsWarning h2 {
line-height: normal;
font-size: 175%;
font-weight: bold;
text-align: center;
margin: 1em 0 1em 0;
}
*
div.attachmentsWarning input[type="button"],
div.attachmentsWarning input[type="submit"]
{
font-size: 1.3em;
font-weight: bold;
border: 1px solid #666;
background-color: #DDD;
}
div.attachmentsWarning span.left {
width: 8em;
float: left;
}
div.attachmentsWarning span.right {
width: 8em;
float: right;
}
/* For utils command list */
div#modal-adminUtils div.modal-header {
/* Copied from 3.0 .subheader */
background: -moz-linear-gradient(center top , #FFFFFF 0%, #EDEDED 100%) repeat scroll 0 0 transparent;
border-bottom: 1px solid #D3D3D3;
color: #0C192E;
margin-bottom: 10px;
text-shadow: 0 1px 0 #FFFFFF;
}
div#utilsList {
margin-left: 0;
}
div#utilsList h1 {
font-size: 150%;
}
div#utilsList h2 {
font-size: 125%;
}
/* For icons */
.icon-48-attachments { background-image: url(../images/attachments_logo48.png); }
.icon-16-attachments { background-image: url(../images/attachments.png); }
.icon-32-adminUtils { background-image: url(../images/attachments_utils32.png); }

View File

@ -0,0 +1,71 @@
/* Styles for the main list of attachments in the administrative back end */
table.adminlist th {
text-align: right;
}
table.adminlist th.at_filename { text-align: right; }
table.adminlist th.at_description { text-align: right; }
table.adminlist th.at_user_field { text-align: right; }
table.adminlist td {
text-align: right;
}
table.adminlist td.at_filename {
text-align: right;
/*font-size: 125%; */
}
.at_filename a
{
font-size: 80%;
}
td.at_filename {
white-space:nowrap;
}
table.adminlist img#link {
margin-right: -16px;
padding-left: 16px;
}
table.adminlist td.at_description { text-align: right; }
table.adminlist td.at_user_field { text-align: right; }
/* For the link to download a file */
a.downloadAttach {
margin-left: auto;
margin-right: 0px;
}
/* For the upload attachment form */
form.attachmentsBackend {
margin-left: auto;
margin-right: -8px;
}
/* Styles for attachments admin */
div.attachmentsAdmin {
margin-left: auto;
margin-right: 20px;
}
/* For icons */
.icon-48-attachments
{
background-position:right;
}
.icon-16-attachments
{
background-position:right;
}
.icon-32-admin
{
background-position:right;
}

View File

@ -0,0 +1,71 @@
/* Styles for the main list of attachments in the administrative back end */
table.adminlist th {
text-align: right;
}
table.adminlist th.at_filename { text-align: right; }
table.adminlist th.at_description { text-align: right; }
table.adminlist th.at_user_field { text-align: right; }
table.adminlist td {
text-align: right;
}
table.adminlist td.at_filename {
text-align: right;
/*font-size: 125%; */
}
.at_filename a
{
font-size: 80%;
}
td.at_filename {
white-space:nowrap;
}
table.adminlist img#link {
margin-right: -16px;
padding-left: 16px;
}
table.adminlist td.at_description { text-align: right; }
table.adminlist td.at_user_field { text-align: right; }
/* For the link to download a file */
a.downloadAttach {
margin-left: auto;
margin-right: 0px;
}
/* For the upload attachment form */
form.attachmentsBackend {
margin-left: auto;
margin-right: -8px;
}
/* Styles for attachments admin */
div.attachmentsAdmin {
margin-left: auto;
margin-right: 20px;
}
/* For icons */
.icon-48-attachments
{
background-position:right;
}
.icon-16-attachments
{
background-position:right;
}
.icon-32-admin
{
background-position:right;
}

View File

@ -0,0 +1,625 @@
/* Styles for the main list of attachments in the administrative back end */
body.component {
padding-top: 0;
margin-right: 10px;
}
form.attachmentsBackend * {
float: none;
}
form.attachmentsBackend,
form#adminForm
{
font-size: 1.2em;
}
form.attachmentsBackend th,
form#adminForm th
{
font-size: 1em;
}
/* for Joomla 3.x */
div.container-fluid form#adminForm
{
font-size: 1em;
}
div#element-box div.m form#adminForm table#attachmentsList tr td a {
font-size: 85%;
}
form#adminForm div.attachments_filter label.filter-search-lbl {
display: inline;
font-size: 100%;
}
form#adminForm div.attachments_filter {
padding: 0 0 2px 6px;
margin: 0 0 6px 0;
}
form#adminForm button#reset_order {
margin: 0 0 0 3em;
}
form#adminForm div.attachments_filter table,
form#adminForm div.attachments_filter tbody,
form#adminForm div.attachments_filter tr,
form#adminForm div.attachments_filter td {
padding: 0;
margin: 0;
}
form#adminForm div.attachments_filter td {
vertical-align: middle;
}
form#adminForm div.attachments_filter td select,
form#adminForm div.attachments_filter td option,
form#adminForm div.attachments_filter td input {
vertical-align: middle;
padding: 0;
margin: 0;
}
form#adminForm div.attachments_filter td select {
height: 1.6em;
}
form#adminForm input[type=checkbox] {
vertical-align: middle;
}
table.adminlist th {
text-align: left;
border-bottom: 0;
padding: 4px 0 4px 8px;
}
table.adminlist th.at_checked {
padding: 0;
text-align: center;
width: 20px;
}
table.adminlist th.at_published { text-align: center; }
table.adminlist th.at_filename { text-align: left; }
table.adminlist th.at_description { text-align: left; }
table.adminlist th.at_access { text-align: center; }
table.adminlist th.at_user_field { text-align: left; }
table.adminlist th.at_file_type { text-align: center; }
table.adminlist th.at_file_size { text-align: center; }
table.adminlist th.at_creator_name { text-align: left; }
table.adminlist th.at_created_date { text-align: left; }
table.adminlist th.at_mod_date { text-align: left; }
table.adminlist th.at_downloads { text-align: center; }
table.adminlist td {
text-align: left;
border-bottom: 0;
}
table.adminlist img#link {
margin-left: -16px;
}
table.adminlist td.at_filename {
text-align: left;
padding: 4px 0 4px 8px;
}
table.adminlist td.at_filename {
font-size: 120%;
}
div.container-fluid table.adminlist td.at_filename {
font-size: 100%;
}
table.adminlist td.at_filename a img {
vertical-align: top;
}
table.adminlist td.at_checked {
text-align: center;
width: 20px;
padding: 0;
}
table.adminlist td.at_published { text-align: center; padding: 4px 0 4px 8px;}
table.adminlist td.at_description { text-align: left; padding: 4px 0 4px 8px;}
table.adminlist td.at_access { text-align: center; padding: 4px 0 4px 8px;}
table.adminlist td.at_user_field { text-align: left; padding: 4px 0 4px 8px;}
table.adminlist td.at_file_type { text-align: center; padding: 4px 0 4px 8px;}
table.adminlist td.at_file_size { text-align: center; padding: 4px 0 4px 8px;}
table.adminlist td.at_creator_name { text-align: left; padding: 4px 0 4px 8px;}
table.adminlist td.at_created_date { text-align: left; padding: 4px 0 4px 8px;}
table.adminlist td.at_mod_date { text-align: left; padding: 4px 0 4px 8px;}
table.adminlist td.at_downloads { text-align: center; padding: 4px 0 4px 8px;}
table.adminlist td.at_parentsep {
height: 0.8em;
background-color: #DDD;
border-top: 1px solid #999;
border-bottom: 1px solid #BBB;
font-weight: bold;
}
table.adminlist tr.row1 {
background-color: #F0F0F0;
}
span.error {
color: #FF0000;
font-style: italic;
font-size: 110%;
}
table.adminlist td.showlinks a {
font-size: 110%;
font-weight: bold;
text-align: center;
}
/* For the link to download a file */
a.downloadAttach {
margin-left: 0px;
font-size: 80%;
color : #F00;
text-decoration: none;
}
a.downloadAttach:link { color : #F00; text-decoration: none; }
a.downloadAttach:visited { color : #F00; text-decoration: none; }
a.downloadAttach:hover { color : #F00; text-decoration: underline; }
a.downloadAttach:active { color : #F00; text-decoration: none; }
/* For the link to add another attachment to an parent */
a.addAttach {
font-weight: normal;
color: #F00;
text-decoration: none;
}
a.addAttach:link { color : #F00; text-decoration: none; }
a.addAttach:visited { color : #F00; text-decoration: none; }
a.addAttach:hover { color : #F00; text-decoration: underline; }
a.addAttach:active { color : #F00; text-decoration: none; }
a.addAttach img {
vertical-align: text-bottom;
}
/* Styles for attachments admin */
div.attachmentsAdmin {
margin-left: 20px;
margin-top: 20px;
}
div.attachmentsAdmin h1 {
line-height: normal;
font-size: 200%;
font-weight: bold;
color: #000088;
}
div.attachmentsAdmin h2 {
line-height: normal;
font-size: 150%;
font-weight: bold;
}
div.attachmentsAdmin li a { padding: 2px; }
div.attachmentsAdmin li a:link { color: #0000FF; text-decoration: none; }
div.attachmentsAdmin li a:hover {
color: #0000FF; text-decoration: none;
background-color: #DDDDDD;
}
div.attachmentsAdmin li a:visited { color: #0000FF; text-decoration: none; }
div.attachmentsAdmin li a:active { color: #0000FF; text-decoration: none; }
div#componentVersion {
font-style: italic;
font-size: 1em;
float: right;
}
##F00border {
border: 1px solid #F00;
}
/* For the link to change the article */
td#key_article {
padding-top: 8px;
padding-bottom: 8px;
}
a.changeButton {
padding: 1px 4px 1px 4px;
margin-left: 12px;
font-size: 95%;
color : #333333;
text-decoration: none;
background-color: #CCCCCC;
border: 1px solid #888888;
}
a.changeButton:link { color : #333333; text-decoration: none; }
a.changeButton:visited { color : #333333; text-decoration: none; }
a.changeButton:hover { color : #333333; text-decoration: none; background-color: #DDDDDD; }
a.changeButton:active { color : #333333; text-decoration: none; }
a.modal-button {
padding-top: 1px;
padding-top: 1px;
padding-left: 4px;
padding-right: 4px;
color: #333333;
background-color: #CCCCCC;
border: 1px solid #888888;
font-weight: bold;
}
a.modal-button:link { color: #333333; text-decoration: none; }
a.modal-button:hover { color: #333333; text-decoration: none; background-color: #DDDDDD; }
a.modal-button:visited { color: #333333; text-decoration: none; }
a.modal-button:active { color: #333333; text-decoration: none; }
/* For the upload attachment form */
form.attachmentsBackend {
margin: 0 0 8px 0;
}
form.attachmentsBackend fieldset,
form.attachmentsBackend td > fieldset.radio {
margin: 0;
}
form.attachmentsBackend fieldset.adminform table.admintable td label,
form.attachmentsBackend fieldset.adminform table.admintable td input[type="radio"],
form.attachmentsBackend fieldset.adminform table.admintable td input[type="checkbox"]
{
float: none;
padding: 0;
margin: 0 0 0 0.5em;
display: inline;
}
form.attachmentsBackend fieldset.adminform table.admintable tr {
margin: 4px 0 4px 0;
border: 1px solid #FFF;
}
form.attachmentsBackend fieldset.adminform table.admintable td select.inputbox {
background-color: #DDD;
margin: 0 8px 0 1px;
}
form.attachmentsBackend fieldset.adminform table.admintable td input[type="checkbox"] {
margin: 0 0 0 0.25em;
}
form.attachmentsBackend fieldset.adminform table.admintable td label {
font-size: 1em;
}
form.attachmentsBackend fieldset.adminform table.admintable td label.radiobtn {
float: none;
min-width: 0em;
padding: 0;
margin: 0 1em 0 0;
display: inline;
}
form.attachmentsBackend legend {
font-size: 140%;
font-weight: bold;
}
form.attachmentsBackend input {
float: none;
border: 1px solid #888;
color : #333333;
background-color: #CCC;
margin: 2px;
}
form.attachmentsBackend input[type="text"] {
background-color: transparent;
}
form.attachmentsBackend input#parent_title {
background-color: #BBB;
color: #555;
}
form.attachmentsBackend input[type="button"],
form.attachmentsBackend input[type="submit"],
{
font-size: 1.3em;
font-weight: bold;
border: 1px solid #666;
}
div.attachmentsWarning div.form_buttons,
form.attachmentsBackend div.form_buttons {
background-color: #F4F4F4;
margin-top: 4px;
padding: 8px 20px 8px 20px;
text-align: center;
}
form.attachmentsBackend span.right {
float: right;
}
form.attachmentsBackend table.admintable {
padding: 4px;
border: 1px solid #CCC;
}
form.attachmentsBackend table.admintable td {
padding: 3px 8px 3px 3px;
vertical-align: middle;
font-size: 1.0em;
}
form.attachmentsBackend table.admintable td span {
float: none;
display: inline-block;
vertical-align: middle;
}
form.attachmentsBackend table.admintable td span.optional {
vertical-align: inherit;
margin-left: 10px;
}
form.attachmentsBackend table.admintable td.key,
form.attachmentsBackend table.admintable td.key2 {
background-color: #DADAF0;
color: #444;
width: 12em;
padding: 0 4px 0 4px;
margin: 2px 0 2px 0;
vertical-align: middle;
text-align: right;
}
form.attachmentsBackend table.admintable td.key2 {
width: 8em;
}
form.attachmentsBackend table.admintable td.switch {
padding: 0 4px 0 10px;
border: 1px solid #CCC;
}
form.attachmentsBackend table.admintable td.at_title {
-- max-width: 18em;
}
form.attachmentsBackend fieldset.adminform label {
vertical-align: middle;
text-align: right;
}
form.attachmentsBackend fieldset.adminform label#upload_file_label {
display: inline-block;
margin-top: 1.2em;
}
div.attachmentsBackendTitle h1 {
font-size: 1.5em;
color: #05B;
margin: 0;
padding: 0 0 4px 0;
}
div.attachmentsBackendTitle h2 {
font-size: 1.25em;
color: #05B;
margin: 0;
padding: 0 0 6px 0;
}
input#upload, input#upload_warning {
margin-top: 4px;
}
div#attachmentsPotentialParents {
margin: 2em 0 0 0;
font-size: 1.2em;
}
div.attachmentsList {
margin-top: 0;
font-size: 1.1em;
}
/* Small fixes for form to edit parameters */
input#paramsregister_url {
width: 100%;
}
input#paramshide_attachments_for {
width: 100%;
}
dl#config-tabs-com_attachments_configuration h3 {
font-size: 1.4em;
}
dl#config-tabs-com_attachments_configuration > dt {
background-color: #CACACA;
}
dl#config-tabs-com_attachments_configuration > dt.open {
background-color: transparent;
}
dl#config-tabs-com_attachments_configuration > dt.open h3 {
font-weight: bold;
}
ul#attachments-options {
font-size: 1.2em;
}
ul#attachments-options > li label,
ul#attachments-options > li select,
ul#attachments-options > li textarea,
ul#attachments-options > li input,
ul#attachments-options > li > fieldset.radio
{
float: none;
display: inline-block;
min-width: 2.75em;
}
ul#attachments-options > li {
background-color: #E0E0E0;
margin: 3px 0 3px 0;
}
ul#attachments-options > li textarea,
ul#attachments-options > li select {
vertical-align: middle;
}
ul#attachments-options > li > label {
min-width: 20em;
width: 20em;
text-align: right;
padding: 0 8px 0 0;
margin: 0 2px 4px 0;
}
ul#attachments-options > li > label#jform_rules-lbl {
display: none;
}
ul#attachments-options div#permissions-sliders {
margin: 4px 0 0 0;
}
form#component-form p.tab-description {
font-size: 150%;
margin: 0 0 0 0;
}
ul#attachments-options div.pane-sliders p {
margin: 0 0 4px 0;
}
/* fieldset#jform_download_mode label { width: 5em; } */
.form-horizontal .control-group .controls {
margin-left: 300px;
}
.form-horizontal .control-group .control-label {
width: 285px;
padding-left: 4px;
background-color: #F9F9F9;
}
.form-horizontal .control-group .radio.btn-group {
padding-top: 0;
}
/* For warning dialog */
div.attachmentsWarning {
padding: 10px;
margin: 20px;
}
div.attachmentsWarning h1 {
line-height: normal;
font-size: 250%;
font-weight: bold;
text-align: center;
color: #F00;
border-bottom: 1px solid #DDD;
}
div.attachmentsWarning h2 {
line-height: normal;
font-size: 175%;
font-weight: bold;
text-align: center;
margin: 1em 0 1em 0;
}
*
div.attachmentsWarning input[type="button"],
div.attachmentsWarning input[type="submit"]
{
font-size: 1.3em;
font-weight: bold;
border: 1px solid #666;
background-color: #DDD;
}
div.attachmentsWarning span.left {
width: 8em;
float: left;
}
div.attachmentsWarning span.right {
width: 8em;
float: right;
}
/* For utils command list */
div#modal-adminUtils div.modal-header {
/* Copied from 3.0 .subheader */
background: -moz-linear-gradient(center top , #FFFFFF 0%, #EDEDED 100%) repeat scroll 0 0 transparent;
border-bottom: 1px solid #D3D3D3;
color: #0C192E;
margin-bottom: 10px;
text-shadow: 0 1px 0 #FFFFFF;
}
div#utilsList {
margin-left: 0;
}
div#utilsList h1 {
font-size: 150%;
}
div#utilsList h2 {
font-size: 125%;
}
/* For icons */
.icon-48-attachments { background-image: url(../images/attachments_logo48.png); }
.icon-32-adminUtils { background-image: url(../images/attachments_utils32.png); }
.icon-16-attachments { background-image: url(../images/attachments.png); }

View File

@ -0,0 +1,71 @@
/* Styles for the main list of attachments in the administrative back end */
table.adminlist th {
text-align: right;
}
table.adminlist th.at_filename { text-align: right; }
table.adminlist th.at_description { text-align: right; }
table.adminlist th.at_user_field { text-align: right; }
table.adminlist td {
text-align: right;
}
table.adminlist td.at_filename {
text-align: right;
/*font-size: 125%; */
}
.at_filename a
{
font-size: 80%;
}
td.at_filename {
white-space:nowrap;
}
table.adminlist img#link {
margin-right: -16px;
padding-left: 16px;
}
table.adminlist td.at_description { text-align: right; }
table.adminlist td.at_user_field { text-align: right; }
/* For the link to download a file */
a.downloadAttach {
margin-left: auto;
margin-right: 0px;
}
/* For the upload attachment form */
form.attachmentsBackend {
margin-left: auto;
margin-right: -8px;
}
/* Styles for attachments admin */
div.attachmentsAdmin {
margin-left: auto;
margin-right: 20px;
}
/* For icons */
.icon-48-attachments
{
background-position:right;
}
.icon-16-attachments
{
background-position:right;
}
.icon-32-admin
{
background-position:right;
}

View File

@ -0,0 +1,223 @@
/* Styles for the upload and update pages */
body.contentpane {
margin: 0 !important;
padding: 0 !important;
}
div#main {
margin: 0 !important;
padding: 0 !important;
}
div#uploadAttachmentsPage {
width: 95%;
margin: 6px auto 6px auto;
text-align: left;
}
div#uploadAttachmentsPage h1 {
font-size: 150%;
color: #000;
}
div#uploadAttachmentsPage h2 {
width: 100%;
color: #000;
}
div#uploadAttachmentsPage p {
text-align: left;
width: 100%;
margin: 0;
}
div#uploadAttachmentsPage label {
display: inline-block;
font-weight: bold;
}
div#uploadAttachmentsPage div.at_control label.at_control_label {
font-weight: bold;
display: inline-block;
}
div#uploadAttachmentsPage div.at_control {
margin-top: 4px;
display: inline-block;
}
div#uploadAttachmentsPage div.at_control div.controls {
margin-left: 5px;
display: inline-block;
}
div#uploadAttachmentsPage div.at_control div.controls label {
margin: 0 0 0 5px;
display: inline-block;
}
div#uploadAttachmentsPage form.attachments fieldset {
padding: 15px 10px 4px 0;
}
div#uploadAttachmentsPage legend {
padding: 3px 0;
}
div#uploadAttachmentsPage div.form_buttons {
background-color: #F4F4F4;
padding: 8px 20px 8px 20px;
text-align: center;
}
div#uploadAttachmentsPage div.form_buttons span.right {
margin-right: 20px;
}
/* For button-like links to change/switch */
a.changeButton {
padding: 1px 4px 1px 4px;
margin-left: 20px;
font-size: 90%;
color : #333333;
text-decoration: none;
background-color: #CCCCCC;
border: 1px solid #888888;
}
a.changeButton:link { color : #333333; text-decoration: none; }
a.changeButton:visited { color : #333333; text-decoration: none; }
a.changeButton:hover { color : #333333; text-decoration: none; background-color: #DDDDDD; }
a.changeButton:active { color : #333333; text-decoration: none; }
/* Styles for upload form */
input#description { width: 100%; }
input#upload { width: 100%; }
input#display_name { width: 100%; }
div#uploadAttachmentsPage p.display_name {
margin-top: 6px;
}
input#upload, input#upload_warning {
margin-top: 4px;
}
form.attachments {
margin: 0;
}
form.attachments fieldset {
margin: 0;
}
form.attachments legend {
font-size: 125%;
font-weight: bold;
}
form.attachments div.formWarning {
width: 95%;
font-size: 140%;
font-weight: bold;
line-height: 120%;
padding: 8px;
padding-left: 15px;
margin-bottom: 10px;
color: #0000CC;
background-color: #FFFF66;
}
form.attachments input#upload_warning {
background-color: #FFFF66;
}
form.attachments input[type=checkbox] {
vertical-align: middle;
}
form.attachments span.right {
float: right;
}
/* Styles for lists of attachments on upload/update forms */
div.attachmentsList caption {
font-size: 110%;
font-weight: bold;
margin-top: 15px;
}
/* Styles for delete warnings */
body.modal div.attachmentsWarning,
#main div.attachmentsWarning {
padding: 10px;
}
body.modal div.attachmentsWarning h1,
#main div.attachmentsWarning h1 {
line-height: normal;
font-size: 200%;
font-weight: bold;
text-align: center;
color: red;
}
body.modal div.attachmentsWarning h2,
#main div.attachmentsWarning h2 {
line-height: normal;
font-size: 150%;
font-weight: bold;
text-align: center;
}
body.modal div.attachmentsWarning span.left,
#main div.attachmentsWarning span.left {
width: 8em;
float: left;
}
body.modal div.attachmentsWarning span.right,
#main div.attachmentsWarning span.right {
width: 8em;
float: right;
}
body.modal div.attachmentsWarning div.form_buttons,
#main div.attachmentsWarning div.form_buttons {
background-color: #F4F4F4;
padding: 8px 20px 8px 20px;
text-align: center;
}
/* Some special overrides for redisplay of forms in the iframe */
body#attachments_iframe
{
font-size: 0.8em;
}
body#attachments_iframe div#uploadAttachmentsPage
{
margin-top: 24px;
}
body#attachments_iframe h1
{
padding-bottom: 4px;
border-bottom: 1px solid #BBB;
}
body#attachments_iframe fieldset
{
border: none;
}

View File

@ -0,0 +1,14 @@
/* Styles for lists of attachments */
div.attachmentsList {
margin-left: 0px;
margin-right: 15px;
text-align: right;
}
div.uploadAttachmentsPage p {
text-align: right;
}

View File

@ -0,0 +1,355 @@
body,
body.contentpane {
font-size: 0.95em;
margin: 0;
padding-top: 0;
}
div.help-document {
margin: 0;
}
div.help-document div.header {
width: 100%;
margin: 0;
color: #003366;
padding: 4px 0 6px 1em;
background-color: #BBBBFF;
border-bottom: 1px solid #0000FF;
background-image: none;
}
div.help-document hr.header {
display: none;
}
div.help-document p.version {
display: block;
margin: 15px 0 0 0;
padding: 0;
font-size: 105%;
}
a#tc_toggle {
font-size: 70%;
color: #88F;
float: right;
}
div.header a#tc_toggle {
margin: 0.5em 2.5em 0 0;
}
div.main a#tc_toggle {
margin: 0 0 1em 0;
}
a#tc_toggle:hover {
color: #33F;
}
a#tc_toggle img {
opacity: 0.5;
filter: alpha(opacity=50); /* For IE8 and earlier */
}
div.help-document div.main {
margin: 1em;
}
div.help-document span.text_code
{
font-size: 80%;
font-weight: bold;
margin-left: 3px;
margin-right: 3px;
display: None;
}
div.help-document p {
margin: 0;
padding: 0;
}
div.help-document img.drop-shadow {
margin: 4px 0 12px 6px;
border: 1px solid #000;
box-shadow: 10px 10px 5px #444;
-moz-box-shadow: 10px 10px 5px #444;
-webkit-box-shadow: 10px 10px 5px #444;
}
div.help-document ul {
margin: 0;
}
div.help-document p {
margin-top: 3px;
margin-bottom: 3px;
}
div.help-document ul li {
border-top: 8px solid transparent;
}
div.help-document ol li {
border-top: 4px solid transparent;
}
div.help-document li p {
display: inline;
}
div.help-document li p.paragraph {
display: block;
}
div.help-document h1 {
width: 100%;
font-size: 130%;
color: #003366;
margin: 0.6em 0 0 0;
border-bottom: 2px solid #024;
}
div.help-document div.header h1 img {
margin: 0 0.5em -0.25em 0;
}
div.help-document h1 a { text-decoration: none; }
div.help-document h1 a:link { text-decoration: none; }
div.help-document h1 a:visited { text-decoration: none; }
div.help-document h1 a:hover { text-decoration: none; }
div.help-document h1 a:active { text-decoration: none; }
div.help-document h1.title {
font-size: 150%;
border: none;
}
div.help-document h2 {
width: 100%;
font-size: 110%;
color: #003366;
margin: 12px 0 0 0;
border-bottom: 1px solid #069;
}
div.help-document h3 {
width: 100%;
font-size: 105%;
color: #003366;
margin: 8px 0 0 0;
}
div.help-document ul {
margin-top: 4px;
margin-bottom: 4px;
}
div.help-document pre {
padding: 5px 5px 5px 20px;
background-color: #DDDDFF;
color: #333333;
line-height: 120%;
border: 1px solid #ac9;
font-size: 90%;
width: 80%;
}
div.help-document pre.literal-block {
margin-left: 40px;
}
div.help-document tt {
background-color: #DDDDFF;
padding: 0 1px 0 1px;
font-size: 9pt;
}
div.help-document span.pre {
white-space: pre;
}
div.help-document a.display {
display: block;
margin: 10px 0 20px 40px;
font-size: 110%;
}
/* Style warning blocks (partially from Sphinx) */
div.help-document div.note,
div.help-document div.hint,
div.help-document div.warning,
div.help-document div.important
{
border: 1px solid #666;
width: 80%;
margin: 4px 10px 4px 20px;
padding: 6px 6px 2px 6px;
}
div.help-document div.warning {
background-color: #ffe4e4;
border: 1px solid #f66;
}
div.help-document div.important {
background-color: #e4ffe4;
border: 1px solid #6f6;
}
div.help-document div.note,
div.help-document div.hint {
background-color: #DDF;
border: 1px solid #66F;
}
div.help-document p.admonition-title {
display: inline;
font-weight: bold;
margin-bottom: 4px;
}
div.help-document p.admonition-title:after {
content: ":";
}
/* -- topics (from Sphinx) ------------------------------ */
div.help-document div.topic {
border: 1px solid #ccc;
padding: 7px 7px 0 7px;
margin: 10px 0 10px 0;
}
div.help-document p.topic-title {
font-size: 1.1em;
font-weight: bold;
margin-top: 10px;
}
div.help-document div#contents {
margin: 0.5em 0 1em 1em;
background-color: #BBBBFF;
border: 1px solid #003366;
width: 32em;
}
div.help-document ul,
div.help-document ol {
padding-left: 1.5em;
margin: 0.2em 0 0.5em 0;
}
div.help-document div#contents ul,
div.help-document div#contents ol {
margin: 6px 0 0 0;
padding: 0 0.5em 0.5em 2em;
}
div.help-document div#contents p.topic-title {
margin: 0;
}
/* Fix some margins */
div.help-document div#contents li {
margin: 0;
padding: 0 0 4px 0;
border: 0;
}
div.help-document dl.docutils dt {
margin: 0;
}
div.help-document dl.docutils dd {
margin: 0;
}
div.help-document blockquote {
margin: 0;
}
div.help-document .first {
margin-top: 0 !important;
margin-left: 0 !important;
}
div.help-document p.last {
margin-left: 0 !important;
}
div.help-document .noindent {
margin-left: 0 !important;
}
div.help-document .float-right {
float: right;
}
div.help-document div.figure {
margin-left: 50px;
}
div.help-document div.width50 { width: 50%; }
div.help-document div.width100 { width: 100%; }
div.help-document p.caption {
display: block;
margin-top: 0;
font-size: 95%;
font-style: italic;
}
div.help-document div.small-figure {
margin-left: 70px;
width: 50%;
}
div.help-document div.small-figure p.caption {
margin-left: 10px;
width: 70%;
}
div.help-document table.permissions {
margin-left: 5%;
margin-right: 5%;
border: 1;
cellspacing: 0;
cellpadding: 2px;
background: transparent;
border-collapse:collapse;
}
div.help-document table#permissions {
width: 95%;
}
div.help-document table#permissions th,
div.help-document table#permissions td {
background: transparent;
padding: 2px 4px 2px 4px;
border: 1px solid #000;
}
div.help-document table#permissions th {
background-color: #DDD;
font-size: 105%;
font-weight: bold;
}
div.help-document div.hide-title p.admonition-title {
display: none;
}
/* Color the links (including sections) */
div.help-document a:link { color : #003366; text-decoration: none; }
div.help-document a:visited { color : #003366; text-decoration: none; }
div.help-document a:hover { color : #FF0000; text-decoration: none; }
div.help-document a:active { color : #003366; text-decoration: none; }

View File

@ -0,0 +1,5 @@
/* Hide unreplaced attachments token */
span.hide_attachments_token {
display: none;
}

View File

@ -0,0 +1,255 @@
/* Styles for lists of attachments */
#main div.attachmentsContainer,
div.attachmentsContainer {
clear: both;
margin: 0 0 0.5em 0;
background: transparent;
}
#main div.attachmentsList table,
div.attachmentsList table {
background: transparent;
border: 1px solid #C0C0C0;
clear: both;
font-size: 90%;
font-weight: bold;
line-height: 160%;
margin-bottom: 4px;
}
#main div.attachmentsList caption,
div.attachmentsList caption {
font-size: 110%;
font-weight: bold;
text-align: left;
margin-top: 4px;
}
#main div.attachmentsList thead tr,
div.attachmentsList thead tr {
background-color: #DADADA;
}
#main div.attachmentsList tbody,
div.attachmentsList tbody {
background: transparent;
}
#main div.attachmentsList tbody tr,
div.attachmentsList tbody tr {
background: transparent;
}
#main div.attachmentsList tbody tr.odd,
#main div.attachmentsList table tbody tr.odd td,
div.attachmentsList tbody tr.odd,
div.attachmentsList table tbody tr.odd td
{
background: transparent;
}
#main div.attachmentsList tbody tr.even,
#main div.attachmentsList tbody tr.even td,
div.attachmentsList tbody tr.even td,
div.attachmentsList tbody tr.even
{
background-color: #EEE;
}
#main div.attachmentsList tr.unpublished,
#main div.attachmentsList tr.unpublished td,
div.attachmentsList tr.unpublished,
div.attachmentsList tr.unpublished td
{
background-color: #AAA;
}
#main div.attachmentsList table thead th,
div.attachmentsList table thead th {
vertical-align: middle;
background: transparent;
border: 1px solid #D0D0D0;
padding-left: 3px;
padding-right: 3px;
padding-top: 0;
padding-bottom: 0;
}
#main div.attachmentsList table tbody td,
div.attachmentsList table tbody td {
background: transparent;
vertical-align: middle;
padding: 1px 3px 1px 3px;
}
#main div.attachmentsList table tbody tr.even td,
div.attachmentsList table tbody tr.even td {
background-color: #EEE;
}
#main div.attachmentsList table tbody tr.unpublished td,
div.attachmentsList table tbody tr.unpublished td {
background-color: #AAA;
color: #333;
}
#main div.attachmentsList table a,
div.attachmentsList table a {
font-weight: bold;
}
#main div.attachmentsList table img,
div.attachmentsList table img {
vertical-align: text-bottom;
border: 0;
margin: 0;
}
#main div.attachmentsList table a.modal-button,
div.attachmentsList table a.modal-button {
background: transparent;
border: 0;
}
div.attachmentsList table td.at_edit a.modal-button {
float: none;
/* display: inline; */
}
div.attachmentsList table td.at_edit a.modal-button img {
float: none;
/* display: inline; */
}
#main div.attachmentsList img.link_overlay,
div.attachmentsList img.link_overlay {
margin-left: -16px;
}
#main div.attachmentsList a.at_icon,
div.attachmentsList a.at_icon {
padding-right: 4px;
}
div.attachmentsList a.at_icon:link { text-decoration: none; }
div.attachmentsList a.at_icon:visited { text-decoration: none; }
div.attachmentsList a.at_icon:hover { text-decoration: none; color: #F00; background: transparent; }
div.attachmentsList a.at_icon:active { text-decoration: none; }
div.attachmentsList a.at_url { background: none; background-color: transparent; }
div.attachmentsList a.at_url:link { text-decoration: none; }
div.attachmentsList a.at_url:visited { text-decoration: none; }
div.attachmentsList a.at_url:hover { text-decoration: underline; color: #F00; background: transparent; }
div.attachmentsList a.at_url:active { text-decoration: none; }
div.attachmentsList th.at_filename,
div.attachmentsList td.at_filename { text-align: left; }
div.attachmentsList td.at_file_size { text-align: right; }
div.attachmentsList th.at_downloads { text-align: center; }
div.attachmentsList td.at_downloads { text-align: center; }
div.attachmentsList th.at_edit { text-align: center; }
div.attachmentsList td.at_edit { text-align: center; background: transparent; }
/* Style for the 'Add Attachment' link */
#main div.addattach,
div.addattach {
margin-top: 4px;
background: transparent;
}
div.addattach img,
div.addattach a img {
background: transparent;
padding-right: 0;
border: 0;
}
div.addattach a {
background: transparent;
border: 0;
}
div.addattach a:hover {
background: transparent;
color: #F00;
border: 0;
}
div.addattach a img { vertical-align: text-bottom; }
div.addattach a.at_icon { background: transparent; border-width: 0; }
div.addattach a.at_icon:link { text-decoration: none; }
div.addattach a.at_icon:visited { text-decoration: none; }
div.addattach a.at_icon:hover { text-decoration: none; background: transparent; }
div.addattach a.at_icon:active { text-decoration: none; }
div.addattach a { background: transparent; border-width: 0; }
div.addattach a:link { color: red; text-decoration: none; }
div.addattach a:visited { color: red; text-decoration: none; }
div.addattach a:hover { color: red; text-decoration: underline; color: #F00; background: transparent; }
div.addattach a:active { color: red; text-decoration: none; }
div.addattach a.modal-button {
background: transparent;
border-width: 0 !important;
padding: 2px !important;
}
div.addattach a.modal-button:link { background: transparent; }
div.addattach a.modal-button:visited { background: transparent; }
div.addattach a.modal-button:hover { color: #F00; background: transparent; }
div.addattach a.modal-button:active { background: transparent; }
/* ---- Misc ----- */
div#main div.requestLogin h1 {
color: #135cae;
font-size: 150%;
line-height: 150%;
}
div#main div.requestLogin h2 {
margin: 0;
padding: 4px 0 0 20px;
font-size: 100%;
line-height: 100%;
}
div#main div.requestLogin h2 a {
font-size: 100%;
font-weight: bold;
}
/* Styles for warnings */
div.uploadAttachmentsPage div.warning
{
margin-left: 20px;
margin-top: 10px;
}
div.uploadAttachmentsPage div.warning h1 {
line-height: normal;
font-size: 200%;
font-weight: bold;
text-align: center;
color: red;
}
div.uploadAttachmentsPage div.warning h2 {
line-height: normal;
font-size: 150%;
font-weight: bold;
}
/* Make sure the table background is white in forms in the back end */
form.attachmentsBackend + div.attachmentsList table {
background-color: #FFF;
}

View File

@ -0,0 +1,73 @@
/* Styles for lists of attachments */
div.attachmentsList table
{
direction: rtl;
}
div.attachmentsList caption
{
font-family: Times New Roman, Arial;
font-size: 130%;
text-align: right;
}
div.addattach img {
padding-right: auto;
padding-left: 3px;
}
div.attachmentsList img#link {
margin-right: -16px;
padding-left: 16px;
}
div.attachmentsList a.at_icon {
padding-right: auto;
padding-left: 4px;
}
div.attachmentsList td.at_file_size { text-align: left; }
/* Styles for the upload page (move to attachments2.css?) */
div.uploadAttachmentsPage {
margin-left: auto;
margin-right: 15px;
}
/* For the link to change the parent */
a.changeButton {
margin-left: auto;
margin-right: 20px;
}
/* Styles for upload form */
form.attachments {
margin-left: auto;
margin-right: -2px;
}
form.attachments div.formWarning {
padding-left: auto;
padding-right: 15px;
}
/* Styles for warnings */
div.warning {
margin-left: auto;
margin-right: 20px;
}
/* Styles for delete warnings */
div.deleteWarning {
margin-left: auto;
margin-right: 20px;
}
.at_url
{
font-family: Times New Roman, Arial;
}

View File

@ -0,0 +1,7 @@
/* Quickicon rules */
div.cpanel div#plg_quickicon_attachment span {
margin-left: 6px; /* force line break */
margin-right: 6px;
line-height: 115%;
}

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,17 @@
div.button2-left > div.insert_attachments_token {
background: url(../images/insert_attachments_token_button.png) no-repeat scroll 100% 0;
}
div#editor-xtd-buttons div.btn-toolbar i.icon-insert_attachments_token {
background: url(../images/insert_attachments_token_button_small.png) no-repeat scroll 100% 0;
vertical-align: middle;
height: 16px;
width: 16px;
}
div#editor-xtd-buttons div.btn-toolbar i.icon-insert_attachments_token_frontend {
background: url(../images/insert_attachments_token_button_small.png) no-repeat scroll 100% 0;
vertical-align: middle;
height: 16px;
width: 16px;
}

View File

@ -0,0 +1,10 @@
.button2-left .insert_attachments_token {
background: url(../images/insert_attachments_token_button_rtl.png) 0 0 no-repeat;
}
div#editor-xtd-buttons div.btn-toolbar i.icon-insert_attachments_token {
background: url(../images/insert_attachments_token_button_small_rtl.png) 0 0 no-repeat;
vertical-align: middle;
height: 16px;
width: 16px;
}

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,18 @@
/**
* Include CSS via Javascript
*
* Adapted from: http://snippets.dzone.com/posts/show/4554
*
* By Jonathan Cameron
*
* @param css_url string the URL/path to the CSS stylesheet file
*/
function includeCSS(css_url) {
var css_link = document.createElement('link');
css_link.type = 'text/css';
css_link.rel = 'stylesheet';
css_link.href = css_url;
css_link.media = 'screen';
document.body.appendChild(css_link);
}

View File

@ -0,0 +1,50 @@
/**
* Define Javascript function for refreshing attachments lists
*
* Copyright (C) 2010-2016 Jonathan M. Cameron, All Rights Reserved
* License: http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
*
* By Jonathan Cameron
*
* @param siteURL string the site base URL for the request
* @param ptype string parent_type for the attachments list parent
* @param pentity string parent_entity for the attachments list parent
* @param pid integer parent_id for the attachments list parent
* @param lang the current language ('' if not specified)
* @param from string the 'from' clause to pass in the request
*/
function refreshAttachments(siteUrl, ptype, pentity, pid, lang, from) {
var id = "attachmentsList_" + ptype + "_" + pentity + "_" + pid,
alist = document.getElementById(id),
url = siteUrl + "/index.php?option=com_attachments&task=attachmentsList";
url += "&parent_id=" + pid;
url += "&parent_type=" + ptype + "&parent_entity=" + pentity;
url += "&lang=" + lang;
url += "&from=" + from + "&tmpl=component&format=raw";
if (!alist) {
alist = window.parent.document.getElementById(id);
}
if (!alist) {
id = "attachmentsList_" + ptype + "_default_" + pid;
alist = window.parent.document.getElementById(id);
}
new window.Request({
url: url,
method: 'get',
onComplete: function (response) {
// Refresh the attachments list
alist.innerHTML = response;
// Remove any old click events (since they are for a deleted/updated SqueezeBox)
$$('a.modal-button').removeEvents('click');
// Since the html has been replaced, we need to reconnect the modal button events
window.SqueezeBox.initialize({});
window.SqueezeBox.assign($$('a.modal-button'), { parse: 'rel' });
}
}).send();
};

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,21 @@
{
"$schema": "https://developer.joomla.org/schemas/json-schema/web_assets.json",
"name": "com_banners",
"version": "4.0.0",
"description": "Joomla CMS",
"license": "GPL-2.0-or-later",
"assets": [
{
"name": "com_banners.admin-banner-edit",
"type": "script",
"uri": "com_banners/admin-banner-edit.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "c414d8"
}
]
}

View File

@ -0,0 +1,39 @@
/**
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
(document => {
const updateBannerFields = value => {
const imgWrapper = document.getElementById('image');
const custom = document.getElementById('custom');
switch (value) {
case '0':
// Image
imgWrapper.classList.remove('hidden');
custom.classList.add('hidden');
break;
case '1':
// Custom
imgWrapper.classList.add('hidden');
custom.classList.remove('hidden');
break;
// Do nothing
}
};
document.addEventListener('DOMContentLoaded', () => {
const jformType = document.getElementById('jform_type');
if (jformType) {
// Hide/show parameters initially
updateBannerFields(jformType.value);
// Hide/show parameters when the type has been selected
jformType.addEventListener('change', ({
target
}) => {
updateBannerFields(target.value);
});
}
});
})(document);

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
*/(s=>{const d=e=>{const t=s.getElementById("image"),a=s.getElementById("custom");switch(e){case"0":t.classList.remove("hidden"),a.classList.add("hidden");break;case"1":t.classList.add("hidden"),a.classList.remove("hidden");break}};s.addEventListener("DOMContentLoaded",()=>{const e=s.getElementById("jform_type");e&&(d(e.value),e.addEventListener("change",({target:t})=>{d(t.value)}))})})(document);

Binary file not shown.

View File

@ -0,0 +1,21 @@
{
"$schema": "https://developer.joomla.org/schemas/json-schema/web_assets.json",
"name": "com_cache",
"version": "4.0.0",
"description": "Joomla CMS",
"license": "GPL-2.0-or-later",
"assets": [
{
"name": "com_cache.admin-cache",
"type": "script",
"uri": "com_cache/admin-cache-default.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "f33074"
}
]
}

View File

@ -0,0 +1,14 @@
/**
* @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 || {};
((document, Joomla) => {
document.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll('.cache-entry').forEach(el => el.addEventListener('click', ({
currentTarget
}) => Joomla.isChecked(currentTarget.checked)));
});
})(document, 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,o)=>{e.addEventListener("DOMContentLoaded",()=>{e.querySelectorAll(".cache-entry").forEach(c=>c.addEventListener("click",({currentTarget:d})=>o.isChecked(d.checked)))})})(document,Joomla);

Binary file not shown.

View File

@ -0,0 +1,21 @@
@charset "UTF-8";
.com-content-categories__item {
border-bottom: 1px solid #dfe3e7;
}
.com-content-categories__item-title-wrapper {
flex-wrap: wrap;
justify-content: space-between;
padding: .5rem 0;
display: flex;
}
.com-content-categories__children {
border-top: 1px solid #dfe3e7;
flex-basis: 100%;
padding-inline-start: 1.5rem;
}
.com-content-categories__children .com-content-categories__item:last-child {
border-bottom: none;
}

View File

@ -0,0 +1 @@
@charset "UTF-8";.com-content-categories__item{border-bottom:1px solid #dfe3e7}.com-content-categories__item-title-wrapper{flex-wrap:wrap;justify-content:space-between;padding:.5rem 0;display:flex}.com-content-categories__children{border-top:1px solid #dfe3e7;flex-basis:100%;padding-inline-start:1.5rem}.com-content-categories__children .com-content-categories__item:last-child{border-bottom:none}

View File

@ -0,0 +1,35 @@
{
"$schema": "https://developer.joomla.org/schemas/json-schema/web_assets.json",
"name": "com_categories",
"version": "4.0.0",
"description": "Joomla CMS",
"license": "GPL-2.0-or-later",
"assets": [
{
"name": "com_categories.shared-categories-accordion",
"type": "preset",
"dependencies": [
"com_categories.shared-categories-accordion#style",
"com_categories.shared-categories-accordion#script"
]
},
{
"name": "com_categories.shared-categories-accordion",
"type": "script",
"uri": "com_categories/shared-categories-accordion.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "587c3d"
},
{
"name": "com_categories.shared-categories-accordion",
"type": "style",
"uri": "com_categories/shared-categories-accordion.min.css",
"version": "0dc781"
}
]
}

View File

@ -0,0 +1,38 @@
/**
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
if (!Joomla || !Joomla.Text) {
throw new Error('core.js was not properly initialised');
}
// Selectors used by this script
const buttonsSelector = '[id^=category-btn-]';
/**
* Handle the category toggle button click event
* @param event
*/
const handleCategoryToggleButtonClick = ({
currentTarget
}) => {
const button = currentTarget;
const icon = button.querySelector('span');
// Toggle icon class
icon.classList.toggle('icon-plus');
icon.classList.toggle('icon-minus');
// Toggle aria label, aria-expanded
const ariaLabel = button.getAttribute('aria-label');
const ariaExpanded = button.getAttribute('aria-expanded');
button.setAttribute('aria-label', ariaLabel === Joomla.Text._('JGLOBAL_EXPAND_CATEGORIES') ? Joomla.Text._('JGLOBAL_COLLAPSE_CATEGORIES') : Joomla.Text._('JGLOBAL_EXPAND_CATEGORIES'));
button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');
const {
categoryId
} = button.dataset;
const target = document.getElementById(`category-${categoryId}`);
target.toggleAttribute('hidden');
};
document.querySelectorAll(buttonsSelector).forEach(button => button.addEventListener('click', handleCategoryToggleButtonClick));

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
*/if(!Joomla||!Joomla.Text)throw new Error("core.js was not properly initialised");const buttonsSelector="[id^=category-btn-]",handleCategoryToggleButtonClick=({currentTarget:e})=>{const t=e,o=t.querySelector("span");o.classList.toggle("icon-plus"),o.classList.toggle("icon-minus");const a=t.getAttribute("aria-label"),r=t.getAttribute("aria-expanded");t.setAttribute("aria-label",a===Joomla.Text._("JGLOBAL_EXPAND_CATEGORIES")?Joomla.Text._("JGLOBAL_COLLAPSE_CATEGORIES"):Joomla.Text._("JGLOBAL_EXPAND_CATEGORIES")),t.setAttribute("aria-expanded",r==="false"?"true":"false");const{categoryId:l}=t.dataset;document.getElementById(`category-${l}`).toggleAttribute("hidden")};document.querySelectorAll(buttonsSelector).forEach(e=>e.addEventListener("click",handleCategoryToggleButtonClick));

View File

@ -0,0 +1,57 @@
{
"$schema": "https://developer.joomla.org/schemas/json-schema/web_assets.json",
"name": "com_config",
"version": "4.0.0",
"description": "Joomla CMS",
"license": "GPL-2.0-or-later",
"assets": [
{
"name": "com_config.config",
"type": "script",
"uri": "com_config/config-default.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "752453"
},
{
"name": "com_config.modules",
"type": "script",
"uri": "com_config/modules-default.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "a96b5d"
},
{
"name": "com_config.templates",
"type": "script",
"uri": "com_config/templates-default.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "8e4ec9"
},
{
"name": "com_config.filters",
"type": "script",
"uri": "com_config/config-filters.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "2cad91"
}
]
}

View File

@ -0,0 +1,36 @@
/**
* @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';
/**
* Submit the task
* @param task
* @param form
*/
const submitTask = (task, form) => {
if (task === 'config.cancel' || document.formvalidator.isValid(form)) {
submitForm(task, form);
}
};
/**
* Register events
*/
const registerEvents = () => {
document.querySelectorAll(`[${buttonDataSelector}]`).forEach(button => {
button.addEventListener('click', e => {
e.preventDefault();
const task = e.currentTarget.getAttribute(buttonDataSelector);
submitTask(task, e.currentTarget.form);
});
});
};
document.addEventListener('DOMContentLoaded', () => {
registerEvents();
});
})(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
*/((r,n)=>{const a="data-submit-task",o=(e,t)=>{(e==="config.cancel"||r.formvalidator.isValid(t))&&n(e,t)},s=()=>{r.querySelectorAll(`[${a}]`).forEach(e=>{e.addEventListener("click",t=>{t.preventDefault();const c=t.currentTarget.getAttribute(a);o(c,t.currentTarget.form)})})};r.addEventListener("DOMContentLoaded",()=>{s()})})(document,Joomla.submitform);

Binary file not shown.

View File

@ -0,0 +1,24 @@
/**
* @copyright (C) 2021 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
const recursiveApplyChanges = id => {
document.querySelectorAll(`#filter-config select[data-parent="${id}"]`).forEach(child => {
recursiveApplyChanges(child.dataset.id);
child.value = 'NONE';
});
};
const applyChanges = event => {
const currentElement = event.currentTarget;
const currentFilter = currentElement.options[currentElement.selectedIndex].value;
if (currentFilter === 'NONE') {
const childs = document.querySelectorAll(`#filter-config select[data-parent="${currentElement.dataset.id}"]`);
if (childs.length && window.confirm(Joomla.Text._('COM_CONFIG_TEXT_FILTERS_NOTE'))) {
childs.forEach(child => {
recursiveApplyChanges(child.dataset.id);
child.value = 'NONE';
});
}
}
};
document.querySelectorAll('#filter-config select').forEach(select => select.addEventListener('change', applyChanges));

View File

@ -0,0 +1,4 @@
/**
* @copyright (C) 2021 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/const recursiveApplyChanges=t=>{document.querySelectorAll(`#filter-config select[data-parent="${t}"]`).forEach(e=>{recursiveApplyChanges(e.dataset.id),e.value="NONE"})},applyChanges=t=>{const e=t.currentTarget;if(e.options[e.selectedIndex].value==="NONE"){const r=document.querySelectorAll(`#filter-config select[data-parent="${e.dataset.id}"]`);r.length&&window.confirm(Joomla.Text._("COM_CONFIG_TEXT_FILTERS_NOTE"))&&r.forEach(n=>{recursiveApplyChanges(n.dataset.id),n.value="NONE"})}};document.querySelectorAll("#filter-config select").forEach(t=>t.addEventListener("change",applyChanges));

Binary file not shown.

View File

@ -0,0 +1,36 @@
/**
* @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';
/**
* Submit the task
* @param task
* @param form
*/
const submitTask = (task, form) => {
if (task === 'modules.cancel' || document.formvalidator.isValid(form)) {
submitForm(task, form);
}
};
/**
* Register events
*/
const registerEvents = () => {
document.querySelectorAll(`[${buttonDataSelector}]`).forEach(button => {
button.addEventListener('click', e => {
e.preventDefault();
const task = e.currentTarget.getAttribute(buttonDataSelector);
submitTask(task, e.currentTarget.form);
});
});
};
document.addEventListener('DOMContentLoaded', () => {
registerEvents();
});
})(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
*/((r,n)=>{const a="data-submit-task",o=(e,t)=>{(e==="modules.cancel"||r.formvalidator.isValid(t))&&n(e,t)},s=()=>{r.querySelectorAll(`[${a}]`).forEach(e=>{e.addEventListener("click",t=>{t.preventDefault();const c=t.currentTarget.getAttribute(a);o(c,t.currentTarget.form)})})};r.addEventListener("DOMContentLoaded",()=>{s()})})(document,Joomla.submitform);

Binary file not shown.

View File

@ -0,0 +1,36 @@
/**
* @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';
/**
* Submit the task
* @param task
* @param form
*/
const submitTask = (task, form) => {
if (task === 'templates.cancel' || document.formvalidator.isValid(form)) {
submitForm(task, form);
}
};
/**
* Register events
*/
const registerEvents = () => {
document.querySelectorAll(`[${buttonDataSelector}]`).forEach(button => {
button.addEventListener('click', e => {
e.preventDefault();
const task = e.currentTarget.getAttribute(buttonDataSelector);
submitTask(task, e.currentTarget.form);
});
});
};
document.addEventListener('DOMContentLoaded', () => {
registerEvents();
});
})(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
*/((a,n)=>{const r="data-submit-task",s=(e,t)=>{(e==="templates.cancel"||a.formvalidator.isValid(t))&&n(e,t)},o=()=>{a.querySelectorAll(`[${r}]`).forEach(e=>{e.addEventListener("click",t=>{t.preventDefault();const c=t.currentTarget.getAttribute(r);s(c,t.currentTarget.form)})})};a.addEventListener("DOMContentLoaded",()=>{o()})})(document,Joomla.submitform);

Binary file not shown.

View File

@ -0,0 +1,35 @@
{
"$schema": "https://developer.joomla.org/schemas/json-schema/web_assets.json",
"name": "com_contact",
"version": "4.0.0",
"description": "Joomla CMS",
"license": "GPL-2.0-or-later",
"assets": [
{
"name": "com_contact.admin-contacts-modal",
"type": "script",
"uri": "com_contact/admin-contacts-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": "1400c3"
},
{
"name": "com_contact.contacts-list",
"type": "script",
"uri": "com_contact/contacts-list.min.js",
"dependencies": [
"core"
],
"attributes": {
"type": "module"
},
"version": "f53819"
}
]
}

View File

@ -0,0 +1,58 @@
/**
* @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 jSelectContact when a contact is clicked
* jSelectContact creates the link tag, sends it to the editor,
* and closes the select frame.
*/
window.jSelectContact = (id, title, catid, object, link, lang) => {
// eslint-disable-next-line no-console
console.warn('Method jSelectContact() is deprecated. Use postMessage() instead.');
let hreflang = '';
if (!Joomla.getOptions('xtd-contacts')) {
return false;
}
const {
editor
} = Joomla.getOptions('xtd-contacts');
if (lang !== '') {
hreflang = `hreflang = "${lang}"`;
}
const tag = `<a ${hreflang} href="${link}">${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();
}
return true;
};
document.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll('.select-link').forEach(element => {
// Listen for click event
element.addEventListener('click', event => {
event.preventDefault();
const functionName = event.target.getAttribute('data-function');
if (functionName === 'jSelectContact' && window[functionName]) {
// Used in xtd_contacts
window[functionName](event.target.getAttribute('data-id'), event.target.getAttribute('data-title'), null, null, event.target.getAttribute('data-uri'), event.target.getAttribute('data-language'), null);
} else if (window.parent[functionName]) {
// Used in com_menus
window.parent[functionName](event.target.getAttribute('data-id'), event.target.getAttribute('data-title'), null, null, event.target.getAttribute('data-uri'), event.target.getAttribute('data-language'), null);
}
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.jSelectContact=(a,t,e,d,r,o)=>{console.warn("Method jSelectContact() is deprecated. Use postMessage() instead.");let n="";if(!Joomla.getOptions("xtd-contacts"))return!1;const{editor:i}=Joomla.getOptions("xtd-contacts");o!==""&&(n=`hreflang = "${o}"`);const l=`<a ${n} href="${r}">${t}</a>`;return window.parent.Joomla.editors.instances[i].replaceSelection(l),window.parent.Joomla.Modal&&window.parent.Joomla.Modal.getCurrent()&&window.parent.Joomla.Modal.getCurrent().close(),!0},document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".select-link").forEach(a=>{a.addEventListener("click",t=>{t.preventDefault();const e=t.target.getAttribute("data-function");e==="jSelectContact"&&window[e]?window[e](t.target.getAttribute("data-id"),t.target.getAttribute("data-title"),null,null,t.target.getAttribute("data-uri"),t.target.getAttribute("data-language"),null):window.parent[e]&&window.parent[e](t.target.getAttribute("data-id"),t.target.getAttribute("data-title"),null,null,t.target.getAttribute("data-uri"),t.target.getAttribute("data-language"),null),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,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);

Some files were not shown because too many files have changed in this diff Show More