init
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
@charset "UTF-8";
|
||||
.mod-preview {
|
||||
background: #64646414;
|
||||
border-radius: 1px;
|
||||
margin: 8px 0;
|
||||
box-shadow: 0 0 0 4px #f4f4f4, 0 0 0 5px #64646433;
|
||||
}
|
||||
|
||||
.mod-preview-info {
|
||||
color: #fff;
|
||||
background-color: #33373f;
|
||||
border-radius: 3px;
|
||||
margin-bottom: 5px;
|
||||
padding: 4px 6px;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: .75rem;
|
||||
line-height: 1rem;
|
||||
box-shadow: inset 0 -10px 20px #0003;
|
||||
}
|
||||
|
||||
.mod-preview-info span {
|
||||
color: #ccc;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.mod-preview-wrapper {
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
@charset "UTF-8";.mod-preview{background:#64646414;border-radius:1px;margin:8px 0;box-shadow:0 0 0 4px #f4f4f4,0 0 0 5px #64646433}.mod-preview-info{color:#fff;background-color:#33373f;border-radius:3px;margin-bottom:5px;padding:4px 6px;font-family:Arial,sans-serif;font-size:.75rem;line-height:1rem;box-shadow:inset 0 -10px 20px #0003}.mod-preview-info span{color:#ccc;font-weight:700}.mod-preview-wrapper{margin-bottom:.5rem}
|
||||
Binary file not shown.
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
(Joomla => {
|
||||
const id = Joomla.getOptions('category-change');
|
||||
const element = document.querySelector(`#${id}`);
|
||||
if (!element) {
|
||||
throw new Error('Category Id element not found');
|
||||
}
|
||||
if (element.getAttribute('data-refresh-catid') && element.value !== element.getAttribute('data-cat-id')) {
|
||||
element.value = element.getAttribute('data-refresh-catid');
|
||||
} else {
|
||||
// No custom fields
|
||||
element.setAttribute('data-refresh-catid', element.value);
|
||||
}
|
||||
window.Joomla.categoryHasChanged = el => {
|
||||
if (el.value === el.getAttribute('data-refresh-catid')) {
|
||||
return;
|
||||
}
|
||||
document.body.appendChild(document.createElement('joomla-core-loader'));
|
||||
|
||||
// Custom Fields
|
||||
if (el.getAttribute('data-refresh-section')) {
|
||||
document.querySelector('input[name=task]').value = `${el.getAttribute('data-refresh-section')}.reload`;
|
||||
}
|
||||
Joomla.submitform(`${el.getAttribute('data-refresh-section')}.reload`, element.form);
|
||||
};
|
||||
})(Joomla);
|
||||
@@ -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
|
||||
*/(r=>{const a=r.getOptions("category-change"),t=document.querySelector(`#${a}`);if(!t)throw new Error("Category Id element not found");t.getAttribute("data-refresh-catid")&&t.value!==t.getAttribute("data-cat-id")?t.value=t.getAttribute("data-refresh-catid"):t.setAttribute("data-refresh-catid",t.value),window.Joomla.categoryHasChanged=e=>{e.value!==e.getAttribute("data-refresh-catid")&&(document.body.appendChild(document.createElement("joomla-core-loader")),e.getAttribute("data-refresh-section")&&(document.querySelector("input[name=task]").value=`${e.getAttribute("data-refresh-section")}.reload`),r.submitform(`${e.getAttribute("data-refresh-section")}.reload`,t.form))}})(Joomla);
|
||||
Binary file not shown.
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
(() => {
|
||||
const onSelect = () => {
|
||||
const batchCategory = document.getElementById('batch-category-id');
|
||||
const batchMenu = document.getElementById('batch-menu-id');
|
||||
const batchPosition = document.getElementById('batch-position-id');
|
||||
const batchGroup = document.getElementById('batch-group-id');
|
||||
const batchTagCopyMoveId = document.getElementById('batch-tag-copy-move-id');
|
||||
const batchCopyMove = document.getElementById('batch-copy-move');
|
||||
let batchSelector;
|
||||
const onChange = () => {
|
||||
if (!batchSelector.value || batchSelector.value && parseInt(batchSelector.value, 10) === 0) {
|
||||
batchCopyMove.classList.add('hidden');
|
||||
} else {
|
||||
batchCopyMove.classList.remove('hidden');
|
||||
}
|
||||
};
|
||||
if (batchCategory) {
|
||||
batchSelector = batchCategory;
|
||||
}
|
||||
if (batchMenu) {
|
||||
batchSelector = batchMenu;
|
||||
}
|
||||
if (batchPosition) {
|
||||
batchSelector = batchPosition;
|
||||
}
|
||||
if (batchGroup) {
|
||||
batchSelector = batchGroup;
|
||||
}
|
||||
if (batchTagCopyMoveId) {
|
||||
batchSelector = batchTagCopyMoveId;
|
||||
}
|
||||
if (batchCopyMove) {
|
||||
batchCopyMove.classList.add('hidden');
|
||||
batchSelector.addEventListener('change', onChange);
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
document.removeEventListener('DOMContentLoaded', onSelect, true);
|
||||
};
|
||||
|
||||
// Document loaded
|
||||
document.addEventListener('DOMContentLoaded', onSelect, true);
|
||||
|
||||
// Joomla updated
|
||||
document.addEventListener('joomla:updated', onSelect, true);
|
||||
})();
|
||||
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/(()=>{const n=()=>{const o=document.getElementById("batch-category-id"),d=document.getElementById("batch-menu-id"),c=document.getElementById("batch-position-id"),a=document.getElementById("batch-group-id"),i=document.getElementById("batch-tag-copy-move-id"),t=document.getElementById("batch-copy-move");let e;const s=()=>{!e.value||e.value&&parseInt(e.value,10)===0?t.classList.add("hidden"):t.classList.remove("hidden")};o&&(e=o),d&&(e=d),c&&(e=c),a&&(e=a),i&&(e=i),t&&(t.classList.add("hidden"),e.addEventListener("change",s)),document.removeEventListener("DOMContentLoaded",n,!0)};document.addEventListener("DOMContentLoaded",n,!0),document.addEventListener("joomla:updated",n,!0)})();
|
||||
Binary file not shown.
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* @copyright (C) 2023 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
(() => {
|
||||
const onSelect = () => {
|
||||
const batchTag = document.getElementById('batch-tag-id');
|
||||
const batchTagAddRemove = document.getElementById('batch-tag-addremove');
|
||||
let batchSelector;
|
||||
const onChange = () => {
|
||||
if (!batchSelector.value || batchSelector.value && parseInt(batchSelector.value, 10) === 0) {
|
||||
batchTagAddRemove.classList.add('hidden');
|
||||
} else {
|
||||
batchTagAddRemove.classList.remove('hidden');
|
||||
}
|
||||
};
|
||||
if (batchTag) {
|
||||
batchSelector = batchTag;
|
||||
}
|
||||
if (batchTagAddRemove) {
|
||||
batchTagAddRemove.classList.add('hidden');
|
||||
}
|
||||
if (batchTagAddRemove) {
|
||||
batchSelector.addEventListener('change', onChange);
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
document.removeEventListener('DOMContentLoaded', onSelect, true);
|
||||
};
|
||||
|
||||
// Document loaded
|
||||
document.addEventListener('DOMContentLoaded', onSelect, true);
|
||||
|
||||
// Joomla updated
|
||||
document.addEventListener('joomla:updated', onSelect, true);
|
||||
})();
|
||||
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* @copyright (C) 2023 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/(()=>{const d=()=>{const n=document.getElementById("batch-tag-id"),e=document.getElementById("batch-tag-addremove");let t;const a=()=>{!t.value||t.value&&parseInt(t.value,10)===0?e.classList.add("hidden"):e.classList.remove("hidden")};n&&(t=n),e&&e.classList.add("hidden"),e&&t.addEventListener("change",a),document.removeEventListener("DOMContentLoaded",d,!0)};document.addEventListener("DOMContentLoaded",d,!0),document.addEventListener("joomla:updated",d,!0)})();
|
||||
Binary file not shown.
Reference in New Issue
Block a user