Done !
| Server IP : 46.105.57.169 / Your IP : 216.73.217.35 Web Server : Apache System : Linux webm002.cluster120.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaumee ( 152031) PHP Version : 8.5.7 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaumee/123click/assets/ |
Upload File : |
joomla.asset.json 0000604 00000006022 15075300464 0010036 0 ustar 00 {
"$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.es5",
"type": "script",
"uri": "com_associations/admin-associations-default-es5.min.js",
"dependencies": [
"core"
],
"attributes": {
"nomodule": true,
"defer": true
},
"version": "b2a0deb550210b10df4dcd29a75660f2d6488b6a"
},
{
"name": "com_associations.admin-associations-default",
"type": "script",
"uri": "com_associations/admin-associations-default.min.js",
"dependencies": [
"com_associations.admin-associations-default.es5"
],
"attributes": {
"type": "module"
},
"version": "7c1277a151388585ebe6d9281695102b6a230686"
},
{
"name": "com_associations.admin-associations-modal.es5",
"type": "script",
"uri": "com_associations/admin-associations-modal-es5.min.js",
"dependencies": [
"core"
],
"attributes": {
"nomodule": true,
"defer": true
},
"version": "7cca495365822d15723d7897c97b4dafccd47f5b"
},
{
"name": "com_associations.admin-associations-modal",
"type": "script",
"uri": "com_associations/admin-associations-modal.min.js",
"dependencies": [
"com_associations.admin-associations-modal.es5"
],
"attributes": {
"type": "module"
},
"version": "4245ed11ab8ad661d68d219eda321b1ceaa18c99"
},
{
"name": "com_associations.associations-edit",
"type": "script",
"uri": "com_associations/associations-edit.min.js",
"dependencies": [
"com_associations.associations-edit.es5"
],
"attributes": {
"type": "module",
"defer": true
},
"version": "afe4d8fe130ac4d4ea4495d0030df60b39cc67ee"
},
{
"name": "com_associations.associations-edit.es5",
"type": "script",
"uri": "com_associations/associations-edit-es5.min.js",
"dependencies": [
"core"
],
"attributes": {
"nomodule": true,
"defer": true
},
"version": "4ba0f0e25e8c97e988c6d45a95cd6ad92e42160e"
},
{
"name": "com_associations.sidebyside",
"type": "style",
"uri": "com_associations/sidebyside.min.css",
"version": "7629291c8e2cf1be0515e09d572dcf4d33217085"
},
{
"name": "com_associations.sidebyside",
"type": "script",
"uri": "com_associations/sidebyside.min.js",
"dependencies": [
"core",
"jquery"
],
"attributes": {
"defer": true
},
"version": "0ab0fafb6a590999e680b9b1fb07e2bc3ee5fc66"
}
]
} js/admin-associations-default-es5.min.js.gz 0000604 00000000263 15075300464 0014621 0 ustar 00 � m��
�0�_%w��H]�.D*t�v=ll1����@|��$�=�9'1�)��(�Iz�[�$� L㐆x�,�""8�����d��QH��5�`���'��z��TRR�J�]'�2�KQw����,D}*�J6����0Ƽ��]r�}b`U[�~�G�m�_ʲW�� js/admin-associations-default.min.js.gz 0000604 00000000243 15075300464 0014125 0 ustar 00 � m�O�0@�J��.�β@�b�n8;�M�_��w��C�Ώ�x5��$�q�qL1��@�kr4� ���-�Y#J)�7�&p�5�?�^�#Q9�x�J)y�ʞ�V*q�.'U�̺F��7�Gc�c�.;�W𦗠w�H�[�S
j�� js/associations-edit.js 0000604 00000020671 15075300464 0011146 0 ustar 00 /**
* @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) => {
const controlGroup = [].slice.call(document.querySelectorAll('#associations .control-group'));
controlGroup.forEach(element => {
// Current selected language. Hide it
const el = element.querySelector('.control-label label');
if (el) {
const attribute = el.getAttribute('for');
if (attribute.replace(new RegExp('_name$'), '') === `${formControl}_associations_${languageCode.replace('-', '_')}`) {
element.classList.add('hidden');
}
}
});
};
Joomla.showAssociationMessage = () => {
const controlGroup = [].slice.call(document.querySelectorAll('#associations .control-group'));
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);
}
controlGroup.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) {
[].slice.call(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
*/
const controlGroup = [].slice.call(document.querySelectorAll('#associations .control-group'));
controlGroup.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
const clear = document.getElementById(`${formControl}_associations_${languageCode}_clear`);
if (clear.onclick) {
clear.onclick();
} else if (clear.click) {
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);
js/admin-associations-modal.js 0000604 00000001504 15075300464 0012375 0 ustar 00 /**
* @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);
js/admin-associations-modal-es5.min.js.gz 0000604 00000000462 15075300464 0014272 0 ustar 00 � uQ�NB1��iã���; r�H<x4�vц�j����myA1�������dz��^�
^��DW����C+���z6���ݡ�pCrG
�����ML������$x�X@Cqve��O��M�����SGu��Ό �X����� �}yU�YMJ�s��W��}&G�CT:n#g��T���?�o����<�K}`ߑ곴�R��1�KYo�I�A��9:�C0�eË<˴�$Uk
��h�Y���������_Q�`�U�$NJ����<��=�95]�~��I� js/sidebyside.js 0000644 00000016221 15075300464 0007650 0 ustar 00 jQuery(document).ready(function(u){u("#toolbar-target").hide(),u("#toolbar-copy").hide(),Joomla.submitbutton=function(t){if("association.cancel"===t)Joomla.submitform(t);else if("copy"===t){Joomla.loadingLayer("show");var e=document.getElementById("target-association").getAttribute("data-language"),a=window.frames["reference-association"].document.getElementById("jform_language");a.removeAttribute("disabled"),a.value=e,window.frames["reference-association"].Joomla.submitbutton(document.getElementById("adminForm").getAttribute("data-associatedview")+".save2copy")}else if("undo-association"===t){var i=document.getElementById("reference-association"),o=document.getElementById("target-association"),n=(i.getAttribute("data-id"),i.getAttribute("data-language").replace(/-/,"_"));o.getAttribute("data-id"),e=o.getAttribute("data-language").replace(/-/,"_");i=u(i).contents(),o=u(o).contents(),i.find("#jform_associations_"+e+"_id").val(""),i.find("#jform_associations_"+e+"_name").val(""),i.find("#jform_associations_"+e+"_chzn").remove(),i.find("#jform_associations_"+e).val("").change().chosen();var s="";u("#jform_itemlanguage option").each(function(){void 0!==(s=u(this).val().split("|")[0])&&(s=s.replace(/-/,"_"),o.find("#jform_associations_"+s+"_id").val(""),o.find("#jform_associations_"+s+"_chzn").remove(),o.find("#jform_associations_"+s).val("").change().chosen())}),o.find("#jform_associations_"+n+"_id").val(""),o.find("#jform_associations_"+n+"_name").val(""),o.find("#jform_associations_"+n+"_chzn").remove(),o.find("#jform_associations_"+n).val("").change().chosen();var d=u("#jform_itemlanguage").val(),r=e.replace(/_/,"-");u('#jform_itemlanguage option[value="'+d+'"]').val(r+":0:add"),u("#jform_itemlanguage").val("").change(),u("#jform_itemlanguage").trigger("liszt:updated"),Joomla.submitbutton("reference")}else u("#"+t+"-association").contents().find("#jform_language").attr("disabled",!1),window.frames[t+"-association"].Joomla.submitbutton(document.getElementById("adminForm").getAttribute("data-associatedview")+".apply");return!1},Joomla.loadingLayer("load"),u(document).on("click","#toogle-left-panel",function(){var t=this.getAttribute("data-hide-reference"),e=this.getAttribute("data-show-reference");u(this).text()===t?u(this).text(e):u(this).text(t),u("#left-panel").toggle(),u("#right-panel").toggleClass("full-width")}),u(document).on("change","#jform_itemlanguage",function(){var t=document.getElementById("target-association"),e=u(this).val();""!==e&&void 0!==e?(t.setAttribute("data-action",e.split(":")[2]),t.setAttribute("data-id",e.split(":")[1]),t.setAttribute("data-language",e.split(":")[0]),Joomla.loadingLayer("show"),t.src=t.getAttribute("data-editurl")+"&task="+t.getAttribute("data-item")+"."+t.getAttribute("data-action")+"&id="+t.getAttribute("data-id")):(u("#toolbar-target").hide(),u("#toolbar-copy").hide(),u("#select-change").addClass("hidden"),u("#remove-assoc").addClass("hidden"),t.setAttribute("data-action",""),t.setAttribute("data-id","0"),t.setAttribute("data-language",""),t.src="")}),u("#reference-association").on("load",function(){var t=Joomla.getOptions("targetSrc",!1);if(t)return t=t.split("&").join("&"),document.getElementById("target-association").setAttribute("src",t),void Joomla.loadOptions({targetSrc:!1});if(document.getElementById("target-association").setAttribute("src",document.getElementById("target-association").getAttribute("src")),u(this).contents().find("#jform_id").val()!==this.getAttribute("data-id")){var e=document.getElementById("target-association");e.src=e.getAttribute("data-editurl")+"&task="+e.getAttribute("data-item")+".edit&id="+u(this).contents().find("#jform_id").val(),this.src=this.getAttribute("data-editurl")+"&task="+this.getAttribute("data-item")+".edit&id="+this.getAttribute("data-id")}var a=u(this).contents();a.find("#jform_language_chzn").remove(),a.find("#jform_language").attr("disabled",!0).chosen(),a.find("#associations").find(".btn").remove();var i="";u("#jform_itemlanguage option").each(function(){void 0!==(i=u(this).val().split(":"))[0]&&(langAssociation=i[0].replace(/-/,"_"),""==a.find("#jform_associations_"+langAssociation+"_id").val()&&a.find("#jform_associations_"+langAssociation+"_name").val(document.getElementById("reference-association").getAttribute("data-no-assoc")))}),Joomla.loadingLayer("hide")}),u("#target-association").on("load",function(){if(""!=this.getAttribute("src")){u("#toolbar-target").show(),u("#toolbar-copy").show(),u("#select-change").removeClass("hidden");var t=this.getAttribute("data-language"),e=this.getAttribute("data-id"),a=u(this).contents().find("#jform_id").val()||"0";if(u(this).contents().find('a[href="#associations"]').parent().find(".btn").remove(),u(this).contents().find("#associations").find(".btn").remove(),u(this).contents().find("#associations").hasClass("active")&&(u(this).contents().find('a[href="#associations"]').parent().removeClass("active"),u(this).contents().find("#associations").removeClass("active"),u(this).contents().find(".nav-tabs").find("li").first().addClass("active"),u(this).contents().find(".tab-content").find(".tab-pane").first().addClass("active")),u(this).contents().find("#jform_language_chzn").remove(),u(this).contents().find("#jform_language").val(t).change().attr("disabled",!0).chosen(),"0"==a)document.getElementById("select-change-text").innerHTML=document.getElementById("select-change").getAttribute("data-select");else{document.getElementById("select-change-text").innerHTML=document.getElementById("select-change").getAttribute("data-change"),u("#remove-assoc").removeClass("hidden"),u("#toolbar-copy").hide();var i=document.getElementById("target-id").value,o=""==i?a:i+","+a;document.getElementById("target-id").value=o,a!=e&&(u('#jform_itemlanguage option[value^="'+t+":"+e+':add"]').val(t+":"+a+":edit"),this.setAttribute("data-id",a),this.setAttribute("data-action","edit"));var n=document.getElementById("reference-association"),s=t.replace(/-/,"_"),d=n.getAttribute("data-title"),r=u(this).contents().find("#jform_"+d).val();u(n).contents().find("#jform_associations_"+s+"_id").val(a),u(n).contents().find("#jform_associations_"+s+"_name").val(r),u(n).contents().find("#jform_associations_"+s+"_chzn").remove(),u(n).contents().find("#jform_associations_"+s).append('<option value="'+a+'">'+r+"</option>"),u(n).contents().find("#jform_associations_"+s).val(a).change().chosen()}var c,l=(n=document.getElementById("reference-association")).getAttribute("data-id");s=n.getAttribute("data-language").replace(/-/,"_"),(c=document.getElementById("target-association")).getAttribute("data-title"),r=n.getAttribute("data-title-value");(c=u(this).contents()).find("#jform_associations_"+s+"_id").val(l),c.find("#jform_associations_"+s+"_name").val(r),c.find("#jform_associations_"+s+"_chzn").remove();var m,g,f=c.find("#jform_associations_"+s);f.append('<option value="'+l+'">'+r+"</option>"),f.val(l).change().chosen(),u("#jform_itemlanguage option").each(function(){void 0!==(m=u(this).val().split(":"))[1]&&"0"!==m[1]&&(g=m[0].replace(/-/,"_"),c.find("#jform_associations_"+g+"_id").val(m[1]),c.find("#jform_associations_"+g+"_chzn").remove(),(f=c.find("#jform_associations_"+g)).append('<option value="'+m[1]+'"></option>'),f.val(m[1]).change().chosen())}),Joomla.loadingLayer("hide")}})});
js/associations-edit-es5.min.js.gz 0000604 00000002144 15075300464 0013034 0 ustar 00 � �Vao�6�+�7!g�^�5QTѾ�o�
�> �\� �`3�i����s� m�Jۤ($Ν}��s�q:)���h�I���y��'ɭ1�\�/Jg�Wo��z��|�>S��3R���־�h=q�+ \�<���U�]�!�m��E�� �F{k�5ŒD��rF�~c<�Y���ێ��w.!?)�$Jt�A5��oy���@ nK"na� T���LۯKJ�Z,�W1B�4M�I�Ǥ)�~�02&Q���Ѭ���"�(A\2И�/���K
��BZ�?$%���`����ժ���]5��:Р�� <��)���>9X���+���է��Sr{��]���V���^�߹�9�.�[�Q�~���x��0U�0mő�B �'X�Tz�h�t}`]I��sWH�8_����̄<=��F�-νǰ%�����Q�ap:M�@ V5�P�v�Cq��ËW>�ڻ��3��<�n���F8Dg`wLqt��ǀ���h�.�G�a���x�I�:�A�w��?��[7�A{���鶿�7 /�Y�)r�hcV��;� ��ag=�� �Pq��.ƹ���E�T���=�D��+����zm ��d��r'�
�W�tq��q�,͇���[ � ,��*�m���W�Q"��po��X��G�E��i�*hDV`��[���O��ͨo��4AK���k�X��~�e�mĆ��ύҔ40i�Ȅ�2|��w|�ܿ�ߛ2�`%�y�.l[� ?3YLn�����~���S5Ya�l ��5�Fq�8��%Dx�DΗ��^��eF��.��{��hy�RXh�$�mk��k*�_��;�زR �ϘK�@A��[��.����3��9}[s�B_���L��Yi�F��JN7����S9�5�8��1Q���^��8�.?�}�&t���I53]#��͑��υz��f���&���D%�]zz��`i �tW�l��Z�o�p�H꣢J�0-��"�4=^��3��pm6�:�p3_�@� l92������)T��O���������e��`�g��swS�K�Jw4J�o �3"c�*G-^����2#��=�D�ߎDG�5
js/admin-associations-modal.min.js 0000604 00000000710 15075300464 0013155 0 ustar 00 Joomla=window.Joomla||{},((t,e)=>{e.addEventListener("DOMContentLoaded",(()=>{const t=window.parent.document.getElementById("target-association");[].slice.call(e.querySelectorAll(".select-link")).forEach((e=>{e.addEventListener("click",(({target:e})=>{t.src=`${t.getAttribute("data-editurl")}&task=${t.getAttribute("data-item")}.edit&id=${parseInt(e.getAttribute("data-id"),10)}`,window.parent.Joomla.Modal.getCurrent().close()}))}))}))})(Joomla,document); js/admin-associations-modal.min.js.gz 0000604 00000000444 15075300464 0013600 0 ustar 00 � u�AK1���) ��ZV�u-E蘌�f4����w�.s�y|3yyK���f炥�^�á*)�B�����?��0Jq���S�X�"�5_���'ČhK�ۖ���Xڻ��J��TCJd�� ��E'�j�K�_�z4Lq�%��q����~�����5�ަx��op(nY�h��et6c��c��C��q�PÄ!m�3�c�fF|�l��.g��V��J
��oJc�zE|Y�w��Ri�)�T��-9��)Y5�$L�V� js/admin-associations-default-es5.min.js 0000604 00000000337 15075300464 0014204 0 ustar 00 !function(){"use strict";Joomla.submitbutton=function(o){if("associations.purge"===o){if(!confirm(Joomla.Text._("COM_ASSOCIATIONS_PURGE_CONFIRM_PROMPT")))return!1;Joomla.submitform(o)}else Joomla.submitform(o);return!0}}(); js/admin-associations-modal-es5.js 0000604 00000001667 15075300464 0013101 0 ustar 00 (function () {
'use strict';
/**
* @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 || {};
(function (Joomla, document) {
document.addEventListener('DOMContentLoaded', function () {
var targetAssociation = window.parent.document.getElementById('target-association');
var links = [].slice.call(document.querySelectorAll('.select-link'));
links.forEach(function (item) {
item.addEventListener('click', function (_ref) {
var target = _ref.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);
}());
js/sidebyside.min.js.gz 0000604 00000003200 15075300464 0011036 0 ustar 00 � �X[o�6�+ �$,�I���Vt�]0toA�m3�HO��en��Ρ.�J��
�K���������#�uT�B�g�Ǐ��
�5lo(��h�,y67<[C������k�Ez�xX�Q�4�~^,Si��1Z��V��rE �sI�����H$$C�:{W:KaC �\\�.{����v�K?�|�*~��I�x�G���(�����L��c�Ƃ�.x���
�=�SRz=o�~o��$�&(����u�ׂ0O�R��_e<�
��Jd|쨹�{�G��* �I�N�O�9_&"��O
r�̃ ����8��{0��x�Y�;)�?�;�,��&uX�1�L#�_�����Ը�yyH��z���� ��o �j��#wX4�W�Hm�
�̏�2�DN�;CU�W�Z踲4Z��wd�g�O�:���#��B����v�CB�K#�ڿ��zD�h�ȴ����e��3��Z��o �vsu�&����S�&��!8!��'vJ8�;����BwlAOfe̼$��A����iNnJ� �Y4���iyh2#����v�����l��6v�J<\�/r���7�6�_o�,� D����+�q ~a`]Hsh��_23r����Ư�M����5;B�c��9��,J ��L�"S��O0*S%2�L<;?� L#�2�-W0�N�@5�[�u4N�y+��=}��F?�E�����P�P���E�(�}�PX�k0�b�\o���'JVE��dl6�6۳hT��yG<�!?�M@@�L8���sGf���5>- �^�2�)
�Е��<�֑��%N��fQ(\� b U�`�N�?��w�aI��ܳ^E�ȸW �
[Яc����DDf^Ut{WEB������L�[j0Ä$�\����@�I]�h���ؒ�T�J�B&�Я��?e�Ŷ ��`%����+h��m ���Ҫ��mO���=Rل&�F�� o֨��
l��F��g�}Pikv�����
�gv�:�P6�Ny�%���7��apX2�'��W�sG7�W�J�M�H�4�2hlwZ�%�Ud*��G���*[X�zS#'zF� �c� �m��t�<����t���驺��O�3�'�:sO�@M&��r8��cQe�M�A<g���o�0�%U����i�{f�V�gFekw �ԪE�� Rx���k�/_`� X�m��
$6<*��e�iO'@�9�t��
ϫH���A��w:٩u�o����;(��!���f9s g�5��+�|D<���j�$V�p�%T��ňN'̑ǃ>���>���O5�ȹ�F�->�t o���uɰ"�<�����Ŭz�I���OJ��U�-_O�8!�;��3��L�o�'/�Bϸ��7{�|ߙ�}}�/�J��Ü�D��we�r×K5e4��wq(�?�d�d�4I��q�g�,��x��
=��#���u4r7��xt����E�D#gS�_jțW��[2Z{鑥f���t|�X���0����d�f��_.sF0N|^5#�!e^2� lK��[�'v�`՟�ԙ�Um��^��{};��L��O���ʺ��>��S�X��f@�&�:V;�I�n��M&�>R��T��6��' js/associations-edit-es5.min.js 0000604 00000005065 15075300464 0012422 0 ustar 00 !function(){"use strict";Joomla=window.Joomla||{},function(e,t){e.hideAssociation=function(e,a){[].slice.call(t.querySelectorAll("#associations .control-group")).forEach((function(t){var n=t.querySelector(".control-label label");n&&(n.getAttribute("for").replace(new RegExp("_name$"),"")===e+"_associations_"+a.replace("-","_")&&t.classList.add("hidden"))}))},e.showAssociationMessage=function(){var a=[].slice.call(t.querySelectorAll("#associations .control-group")),n=t.getElementById("associations");if(n){var o=t.createElement("joomla-alert");o.innerText=e.Text._("JGLOBAL_ASSOC_NOT_POSSIBLE"),n.insertAdjacentElement("afterbegin",o)}a.forEach((function(e){e.classList.add("hidden")}))},e.injectAssociations=function(t,a){var n;t.success?(0!==t.data.length&&[].slice.call(Object.keys(t.data)).forEach((function(e){n=a+e.replace("-","_"),window[n](t.data[e].id,t.data[e].title,t.data[e].catid,null,null,e)})),t.message&&e.renderMessages({notice:[t.message]})):e.renderMessages({warning:[e.Text._("JGLOBAL_ASSOCIATIONS_PROPAGATE_FAILED")]})},e.propagateAssociation=function(a,n){var o=t.getElementById(a+"_id").value,s=t.getElementById("jform_language"),i={task:"ajax.fetchAssociations",format:"json",assocId:o,excludeLang:s.options[s.selectedIndex].value};i[e.getOptions("csrf.token","")]=1;var c=Object.keys(i).reduce((function(e,t){return e.push(t+"="+encodeURIComponent(i[t])),e}),[]).join("&"),r=t.forms.adminForm.action+"&"+c;return e.request({url:r,method:"GET",data:JSON.stringify(i),headers:{"Content-Type":"application/json"},onSuccess:function(t){e.injectAssociations(JSON.parse(t),n)},onError:function(){e.renderMessages({warning:[e.Text._("JGLOBAL_ASSOCIATIONS_PROPAGATE_FAILED")]})}}),!1},t.addEventListener("DOMContentLoaded",(function(){var a=e.getOptions("system.associations.edit"),n=a.formControl||"jform",o=t.getElementById(n+"_language");1===parseInt(a.hidden,10)?e.showAssociationMessage():o&&e.hideAssociation(n,o.value),o&&o.addEventListener("change",(function(a){var o=a.target;e.removeMessages();var s=!1;[].slice.call(t.querySelectorAll("#associations .control-group")).forEach((function(e){var a=e.querySelector(".control-label label").getAttribute("for").replace("_name","").replace("jform_associations_","");e.classList.remove("hidden"),s||""===t.getElementById(n+"_associations_"+a+"_id").value||(s=!0);var o=t.getElementById(n+"_associations_"+a+"_clear");o.onclick?o.onclick():o.click&&o.click()})),s&&e.renderMessages({warning:[e.Text._("JGLOBAL_ASSOCIATIONS_RESET_WARNING")]});var i=o.value;"*"===i?e.showAssociationMessage():e.hideAssociation(n,i)}))}))}(Joomla,document)}(); js/associations-edit.min.js.gz 0000604 00000002144 15075300464 0012342 0 ustar 00 � �V]o�8�+��B���m_����VT�RV��P�:�������w�P�_W��J�qfΜs&W�ε��2��'qUݭ�S
ܱ���i�B�9�2�3kb\�ae8Ng
��ZS'�- _�A��6o�_�7�sBY�s��'�-�11�y[�)���U�l�� J�qZރ>�� kfcj�ʊ ���yv_x��$L��R5�tp�����9� aq���L�L�V~I� ' a�]��Ҹ��9/d�R���`p�d�� ��>�!����)ۖ���`�m
s0�|�L�C���<��Az�DP2��{,5�w{�� �}"������n��MZ�~�"��
��^��9�;�!�[�Q2~{�{��a���(���P��3k 33C� t1u5�4 )�N�B)����XY*���O�����a������ұ����*��&l#��|w�3�a�^a�)7���zp}^��1)�F8�2�c��p�i�!�}O27��D�O�i
:��~rsۻi]���{��m#�.r���+�znw��� ���e��wL<J] 7�n�`�-ͤ�d8��t�3�,���t���� �#2s�Q���F�ó�E
]<*2�.��C#\�H;��N�l*s���(Q.o�HAԣ��Y��P��;�bj�)�4T����(��߷�;_X��n��g�SƇ#&f63�4�Z��F��y���x)�
i���UV�5s�EnBcQ���U��H�9��M#r�x]�{�¡��I6^b�|
���@�l���w�@�W��YAYrk��0"W�콒h����P�
f!���6�hm�{%%Ф�G�>��g(�����k�Ĕ�����uK�C\�j�f>�P\������$R�CJ�r��;�<E����`���������Ϝ��H1����rYs�q\�T���\u�Br�,���s�[�Y3��O��p��+p�4W:O�!Z�m�_m�&i����u�;��AH֯��yߔ�k�@�������Pd�@�1
1~8�^a��������\~d�_��m��$��n�;ח�>�I���&�=�`~F���g��>�~m�UE@�5�A��� js/admin-associations-default-es5.js 0000604 00000001135 15075300464 0013417 0 ustar 00 (function () {
'use strict';
/**
* @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 = function (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;
};
}());
js/associations-edit.min.js 0000604 00000004726 15075300464 0011733 0 ustar 00 Joomla=window.Joomla||{},((e,s)=>{e.hideAssociation=(e,t)=>{[].slice.call(s.querySelectorAll("#associations .control-group")).forEach((s=>{const o=s.querySelector(".control-label label");if(o){o.getAttribute("for").replace(new RegExp("_name$"),"")===`${e}_associations_${t.replace("-","_")}`&&s.classList.add("hidden")}}))},e.showAssociationMessage=()=>{const t=[].slice.call(s.querySelectorAll("#associations .control-group")),o=s.getElementById("associations");if(o){const t=s.createElement("joomla-alert");t.innerText=e.Text._("JGLOBAL_ASSOC_NOT_POSSIBLE"),o.insertAdjacentElement("afterbegin",t)}t.forEach((e=>{e.classList.add("hidden")}))},e.injectAssociations=(s,t)=>{let o;s.success?(0!==s.data.length&&[].slice.call(Object.keys(s.data)).forEach((e=>{o=t+e.replace("-","_"),window[o](s.data[e].id,s.data[e].title,s.data[e].catid,null,null,e)})),s.message&&e.renderMessages({notice:[s.message]})):e.renderMessages({warning:[e.Text._("JGLOBAL_ASSOCIATIONS_PROPAGATE_FAILED")]})},e.propagateAssociation=(t,o)=>{const a=s.getElementById(`${t}_id`).value,n=s.getElementById("jform_language"),c={task:"ajax.fetchAssociations",format:"json",assocId:a,excludeLang:n.options[n.selectedIndex].value};c[e.getOptions("csrf.token","")]=1;const i=Object.keys(c).reduce(((e,s)=>(e.push(`${s}=${encodeURIComponent(c[s])}`),e)),[]).join("&"),l=`${s.forms.adminForm.action}&${i}`;return e.request({url:l,method:"GET",data:JSON.stringify(c),headers:{"Content-Type":"application/json"},onSuccess:s=>{e.injectAssociations(JSON.parse(s),o)},onError:()=>{e.renderMessages({warning:[e.Text._("JGLOBAL_ASSOCIATIONS_PROPAGATE_FAILED")]})}}),!1},s.addEventListener("DOMContentLoaded",(()=>{const t=e.getOptions("system.associations.edit"),o=t.formControl||"jform",a=s.getElementById(`${o}_language`);1===parseInt(t.hidden,10)?e.showAssociationMessage():a&&e.hideAssociation(o,a.value),a&&a.addEventListener("change",(({target:t})=>{e.removeMessages();let a=!1;[].slice.call(s.querySelectorAll("#associations .control-group")).forEach((e=>{const t=e.querySelector(".control-label label").getAttribute("for").replace("_name","").replace("jform_associations_","");e.classList.remove("hidden"),a||""===s.getElementById(`${o}_associations_${t}_id`).value||(a=!0);const n=s.getElementById(`${o}_associations_${t}_clear`);n.onclick?n.onclick():n.click&&n.click()})),a&&e.renderMessages({warning:[e.Text._("JGLOBAL_ASSOCIATIONS_RESET_WARNING")]});const n=t.value;"*"===n?e.showAssociationMessage():e.hideAssociation(o,n)}))}))})(Joomla,document); js/admin-associations-modal-es5.min.js 0000604 00000000775 15075300464 0013662 0 ustar 00 !function(){"use strict";Joomla=window.Joomla||{},function(t,e){e.addEventListener("DOMContentLoaded",(function(){var t=window.parent.document.getElementById("target-association");[].slice.call(e.querySelectorAll(".select-link")).forEach((function(e){e.addEventListener("click",(function(e){var n=e.target;t.src=t.getAttribute("data-editurl")+"&task="+t.getAttribute("data-item")+".edit&id="+parseInt(n.getAttribute("data-id"),10),window.parent.Joomla.Modal.getCurrent().close()}))}))}))}(Joomla,document)}(); js/sidebyside.min.js 0000604 00000015447 15075300464 0010437 0 ustar 00 jQuery(document).ready((function(t){t("#toolbar-target").hide(),t("#toolbar-copy").hide(),Joomla.submitbutton=function(e){if("association.cancel"===e)Joomla.submitform(e);else if("copy"===e){document.body.appendChild(document.createElement("joomla-core-loader"));var a=document.getElementById("target-association").getAttribute("data-language"),i=window.frames["reference-association"].document.getElementById("jform_language");i.removeAttribute("disabled"),i.value=a,window.frames["reference-association"].Joomla.submitbutton(document.getElementById("adminForm").getAttribute("data-associatedview")+".save2copy")}else if("undo-association"===e){var o=document.getElementById("reference-association"),n=document.getElementById("target-association"),s=(o.getAttribute("data-id"),o.getAttribute("data-language").replace(/-/,"_"));n.getAttribute("data-id"),a=n.getAttribute("data-language").replace(/-/,"_");o=t(o).contents(),n=t(n).contents(),o.find("#jform_associations_"+a+"_id").val(""),o.find("#jform_associations_"+a+"_name").val(""),o.find("#jform_associations_"+a).val("");var d="";t("#jform_itemlanguage option").each((function(){void 0!==(d=t(this).val().split("|")[0])&&(d=d.replace(/-/,"_"),n.find("#jform_associations_"+d+"_id").val(""),n.find("#jform_associations_"+d).val(""))})),n.find("#jform_associations_"+s+"_id").val(""),n.find("#jform_associations_"+s+"_name").val(""),n.find("#jform_associations_"+s).val("");var r=t("#jform_itemlanguage"),c=r.val(),l=a.replace(/_/,"-");t('#jform_itemlanguage option[value="'+c+'"]').val(l+":0:add"),r.val(""),r[0].dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!0})),Joomla.submitbutton("reference")}else t("#"+e+"-association").contents().find("#jform_language").attr("disabled",!1),window.frames[e+"-association"].Joomla.submitbutton(document.getElementById("adminForm").getAttribute("data-associatedview")+".apply");return!1},t(document).on("click","#toogle-left-panel",(function(){var e=this.getAttribute("data-hide-reference"),a=this.getAttribute("data-show-reference");t(this).text()===e?t(this).text(a):t(this).text(e),t("#left-panel").toggle(),t("#right-panel").toggleClass("full-width")})),t(document).on("change","#jform_itemlanguage",(function(){var e=document.getElementById("target-association"),a=t(this).val();""!==a&&void 0!==a?(e.setAttribute("data-action",a.split(":")[2]),e.setAttribute("data-id",a.split(":")[1]),e.setAttribute("data-language",a.split(":")[0]),document.body.appendChild(document.createElement("joomla-core-loader")),e.src=e.getAttribute("data-editurl")+"&task="+e.getAttribute("data-item")+"."+e.getAttribute("data-action")+"&id="+e.getAttribute("data-id")):(t("#toolbar-target").hide(),t("#toolbar-copy").hide(),t("#select-change").addClass("hidden"),t("#remove-assoc").addClass("hidden"),e.setAttribute("data-action",""),e.setAttribute("data-id","0"),e.setAttribute("data-language",""),e.src="")})),t("#reference-association").on("load",(function(){var e=Joomla.getOptions("targetSrc",!1);if(e)return e=e.split("&").join("&"),document.getElementById("target-association").setAttribute("src",e),void Joomla.loadOptions({targetSrc:!1});if(document.getElementById("target-association").setAttribute("src",document.getElementById("target-association").getAttribute("src")),t(this).contents().find("#jform_id").val()!==this.getAttribute("data-id")){var a=document.getElementById("target-association");a.src=a.getAttribute("data-editurl")+"&task="+a.getAttribute("data-item")+".edit&id="+t(this).contents().find("#jform_id").val(),this.src=this.getAttribute("data-editurl")+"&task="+this.getAttribute("data-item")+".edit&id="+this.getAttribute("data-id")}var i=t(this).contents();i.find("#jform_language").attr("disabled",""),i.find("#associations").find(".btn").remove();var o="";t("#jform_itemlanguage option").each((function(){if(void 0!==(o=t(this).val().split(":"))[0]){var e=o[0].replace(/-/,"_");""==i.find("#jform_associations_"+e+"_id").val()&&i.find("#jform_associations_"+e+"_name").val(document.getElementById("reference-association").getAttribute("data-no-assoc"))}}));var n=document.querySelector("joomla-core-loader");n&&n.parentNode.removeChild(n)})),t("#target-association").on("load",(function(){if(""!=this.getAttribute("src")){t("#toolbar-target").show(),t("#toolbar-copy").show(),t("#select-change").removeClass("hidden");var e=this.getAttribute("data-language"),a=this.getAttribute("data-id"),i=t(this).contents().find("#jform_id").val()||"0";if(t(this).contents().find('a[href="#associations"]').parent().find(".btn").remove(),t(this).contents().find("#associations").find(".btn").remove(),t(this).contents().find("#associations").hasClass("active")&&(t(this).contents().find('a[href="#associations"]').parent().removeClass("active"),t(this).contents().find("#associations").removeClass("active"),t(this).contents().find(".nav-tabs").find("li").first().addClass("active"),t(this).contents().find(".tab-content").find(".tab-pane").first().addClass("active")),t(this).contents().find("#jform_language").val(e).attr("disabled",""),"0"==i)document.getElementById("select-change-text").innerHTML=Joomla.sanitizeHtml(document.getElementById("select-change").getAttribute("data-select"));else{document.getElementById("select-change-text").innerHTML=Joomla.sanitizeHtml(document.getElementById("select-change").getAttribute("data-change")),t("#remove-assoc").removeClass("hidden"),t("#toolbar-copy").hide();var o=document.getElementById("target-id").value,n=""==o?i:o+","+i;document.getElementById("target-id").value=n,i!=a&&(t('#jform_itemlanguage option[value^="'+e+":"+a+':add"]').val(e+":"+i+":edit"),this.setAttribute("data-id",i),this.setAttribute("data-action","edit"));var s=document.getElementById("reference-association"),d=e.replace(/-/,"_"),r=s.getAttribute("data-title"),c=t(this).contents().find("#jform_"+r).val();t(s).contents().find("#jform_associations_"+d+"_id").val(i),t(s).contents().find("#jform_associations_"+d+"_name").val(c),t(s).contents().find("#jform_associations_"+d).append('<option value="'+i+'">'+c+"</option>"),t(s).contents().find("#jform_associations_"+d).val(i)}var l,m=(s=document.getElementById("reference-association")).getAttribute("data-id");d=s.getAttribute("data-language").replace(/-/,"_"),(l=document.getElementById("target-association")).getAttribute("data-title"),c=s.getAttribute("data-title-value");(l=t(this).contents()).find("#jform_associations_"+d+"_id").val(m),l.find("#jform_associations_"+d+"_name").val(c);var u,g,f=l.find("#jform_associations_"+d);f.append('<option value="'+m+'">'+c+"</option>"),f.val(m),t("#jform_itemlanguage option").each((function(){void 0!==(u=t(this).val().split(":"))[1]&&"0"!==u[1]&&(g=u[0].replace(/-/,"_"),l.find("#jform_associations_"+g+"_id").val(u[1]),(f=l.find("#jform_associations_"+g)).append('<option value="'+u[1]+'"></option>'),f.val(u[1]))}));var v=document.querySelector("joomla-core-loader");v&&v.parentNode.removeChild(v)}}))})); js/admin-associations-default.js 0000604 00000001014 15075300464 0012721 0 ustar 00 /**
* @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;
};
js/associations-edit-es5.js 0000604 00000021671 15075300464 0011641 0 ustar 00 (function () {
'use strict';
/**
* @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 || {};
(function (Joomla, document) {
Joomla.hideAssociation = function (formControl, languageCode) {
var controlGroup = [].slice.call(document.querySelectorAll('#associations .control-group'));
controlGroup.forEach(function (element) {
// Current selected language. Hide it
var el = element.querySelector('.control-label label');
if (el) {
var attribute = el.getAttribute('for');
if (attribute.replace(new RegExp('_name$'), '') === formControl + "_associations_" + languageCode.replace('-', '_')) {
element.classList.add('hidden');
}
}
});
};
Joomla.showAssociationMessage = function () {
var controlGroup = [].slice.call(document.querySelectorAll('#associations .control-group'));
var associations = document.getElementById('associations');
if (associations) {
var html = document.createElement('joomla-alert');
html.innerText = Joomla.Text._('JGLOBAL_ASSOC_NOT_POSSIBLE');
associations.insertAdjacentElement('afterbegin', html);
}
controlGroup.forEach(function (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 = function (result, callbackFunctionPrefix) {
var functionName;
if (result.success) {
if (result.data.length !== 0) {
[].slice.call(Object.keys(result.data)).forEach(function (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 = function (fieldPrefix, callbackFunctionPrefix) {
// Find the id of the record which has been set as an association
var assocId = document.getElementById(fieldPrefix + "_id").value; // Find the language of the record being edited
var languageField = document.getElementById('jform_language');
var currentLang = languageField.options[languageField.selectedIndex].value;
var data = {
task: 'ajax.fetchAssociations',
format: 'json',
assocId: assocId,
excludeLang: currentLang
};
data[Joomla.getOptions('csrf.token', '')] = 1;
var queryString = Object.keys(data).reduce(function (a, k) {
a.push(k + "=" + encodeURIComponent(data[k]));
return a;
}, []).join('&');
var 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: url,
method: 'GET',
data: JSON.stringify(data),
headers: {
'Content-Type': 'application/json'
},
onSuccess: function onSuccess(response) {
Joomla.injectAssociations(JSON.parse(response), callbackFunctionPrefix);
},
onError: function onError() {
Joomla.renderMessages({
warning: [Joomla.Text._('JGLOBAL_ASSOCIATIONS_PROPAGATE_FAILED')]
});
}
});
return false;
};
document.addEventListener('DOMContentLoaded', function () {
var associationsEditOptions = Joomla.getOptions('system.associations.edit');
var formControl = associationsEditOptions.formControl || 'jform';
var 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', function (_ref) {
var target = _ref.target;
// Remove message if any
Joomla.removeMessages();
var existsAssociations = false;
/** For each language, remove the associations, ie,
* empty the associations fields and reset the buttons to Select/Create
*/
var controlGroup = [].slice.call(document.querySelectorAll('#associations .control-group'));
controlGroup.forEach(function (element) {
var attribute = element.querySelector('.control-label label').getAttribute('for');
var 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
var clear = document.getElementById(formControl + "_associations_" + languageCode + "_clear");
if (clear.onclick) {
clear.onclick();
} else if (clear.click) {
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
var 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);
}());
js/admin-associations-default.min.js 0000604 00000000273 15075300464 0013511 0 ustar 00 Joomla.submitbutton=o=>{if("associations.purge"===o){if(!confirm(Joomla.Text._("COM_ASSOCIATIONS_PURGE_CONFIRM_PROMPT")))return!1;Joomla.submitform(o)}else Joomla.submitform(o);return!0}; css/sidebyside.min.css 0000604 00000003017 15075300464 0010755 0 ustar 00 .sidebyside .outer-panel{float:left;width:50%}.sidebyside #left-panel .inner-panel{padding:0 10px 0 0}.sidebyside #right-panel .inner-panel{padding:0 0 0 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-left:.5rem}.sidebyside #target-association{margin-top:.5rem}.sidebyside #reference-association{margin-top:3.35rem}.target-text{float:left;width:auto}html[dir=rtl] .sidebyside .outer-panel{float:right}html[dir=rtl] .sidebyside #left-panel .inner-panel{padding:0 0 0 10px}html[dir=rtl] .sidebyside #right-panel .inner-panel{padding:0 10px 0 0}html[dir=rtl] .sidebyside .full-width .inner-panel{padding:0!important}html[dir=rtl] .sidebyside .langtarget{float:right}html[dir=rtl] .sidebyside .modaltarget{float:right;margin-left:0;margin-right:.5rem}html[dir=rtl] .target-text{float:right}@media (max-width:1140px){.sidebyside #reference-association{margin-top:6.2rem}.sidebyside .langtarget{float:none}.sidebyside .modaltarget{float:left;margin-left:0}html[dir=rtl] .sidebyside .langtarget{float:none}html[dir=rtl] .sidebyside .modaltarget{float:right;margin-left:0;margin-right:0}}@media (max-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}} css/sidebyside.css 0000644 00000002366 15075300464 0010205 0 ustar 00 /**
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
.sidebyside .outer-panel {
float: left;
width: 50%;
}
.sidebyside #left-panel .inner-panel {
padding: 0 10px 0 0;
}
.sidebyside #right-panel .inner-panel {
padding: 0 0 0 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;
}
.target-text {
float: left;
width: 30%;
}
/* RTL overrides */
html[dir=rtl] .sidebyside .outer-panel {
float: right;
}
html[dir=rtl] .sidebyside #left-panel .inner-panel {
padding: 0 0 0 10px;
}
html[dir=rtl] .sidebyside #right-panel .inner-panel {
padding: 0 10px 0 0;
}
html[dir=rtl] .sidebyside .full-width .inner-panel {
padding: 0 !important;
}
html[dir=rtl] .target-text {
float: right;
}
/* Responsive layout */
@media (max-width: 767px) {
.sidebyside .outer-panel {
float: none;
width: 100%;
}
.sidebyside #left-panel .inner-panel {
padding: 0;
}
.sidebyside #right-panel .inner-panel {
padding: 0;
}
}
css/sidebyside.min.css.gz 0000604 00000000614 15075300464 0011374 0 ustar 00 � ���j�0�o%�6�!�k�)���؏�9j ӵ�x�3j[��V�h�����< �8�����[�K�q���6�pǙM��渱z���s��ʔ2�U�t�"m��qrG�'n q��+���V��e������'dz��F�pb j�2���r�fKM�9v�$p����C������Z��a`ZiZ�Uq�����5�,F���w�d��=�k��i�����f�番mao�и���J��4V� <L\Iǀ����Dy �3��� 5���ЃA)iq@N�T��W1��W����8Eϒ�o��h��q&K�z�V�Zw�GSNF5�L�$yO�V��x��S��P��y��CW�l$�y��_| js/sidebyside-uncompressed.js 0000644 00000032103 15075311550 0012350 0 ustar 00 /**
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
jQuery(document).ready(function($) {
$('#toolbar-target').hide();
$('#toolbar-copy').hide();
// Save button actions, replacing the default Joomla.submitbutton() with custom function.
Joomla.submitbutton = function(task)
{
// Using close button, normal joomla submit.
if (task === 'association.cancel')
{
Joomla.submitform(task);
}
else if(task === 'copy')
{
Joomla.loadingLayer('show');
var targetLang = document.getElementById('target-association').getAttribute('data-language'),
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');
}
// Undo association
else if (task === 'undo-association')
{
var reference = document.getElementById('reference-association');
var target = document.getElementById('target-association');
var referenceId = reference.getAttribute('data-id');
var referenceLang = reference.getAttribute('data-language').replace(/-/,'_');
var targetId = target.getAttribute('data-id');
var targetLang = target.getAttribute('data-language').replace(/-/,'_');
reference = $(reference).contents();
target = $(target).contents();
// Remove it on the reference
// - For modal association selectors.
reference.find('#jform_associations_' + targetLang + '_id').val('');
reference.find('#jform_associations_' + targetLang + '_name').val('');
// - For chosen association selectors (menus).
reference.find('#jform_associations_' + targetLang + '_chzn').remove();
reference.find('#jform_associations_' + targetLang).val('').change().chosen();
var lang = '';
// Remove it on the target
$('#jform_itemlanguage option').each(function()
{
lang = $(this).val().split('|')[0];
if (typeof lang !== 'undefined')
{
lang = lang.replace(/-/,'_');
// - For modal association selectors.
target.find('#jform_associations_' + lang + '_id').val('');
// - For chosen association selectors (menus).
target.find('#jform_associations_' + lang + '_chzn').remove();
target.find('#jform_associations_' + lang).val('').change().chosen();
}
});
// Same as above but reference language is not in the selector
// - For modal association selectors.
target.find('#jform_associations_' + referenceLang + '_id').val('');
target.find('#jform_associations_' + referenceLang + '_name').val('');
// - For chosen association selectors (menus).
target.find('#jform_associations_' + referenceLang + '_chzn').remove();
target.find('#jform_associations_' + referenceLang).val('').change().chosen();
// Reset switcher after removing association
var currentSwitcher = $('#jform_itemlanguage').val();
var currentLang = targetLang.replace(/_/,'-');
$('#jform_itemlanguage option[value=\"' + currentSwitcher + '\"]').val(currentLang + ':0:add');
$('#jform_itemlanguage').val('').change();
$('#jform_itemlanguage').trigger('liszt:updated');
// Save one of the items to confirm action
Joomla.submitbutton('reference');
}
// Saving target or reference, send the save action to the target/reference iframe.
else
{
// We need to re-enable the language field to save.
$('#' + task + '-association').contents().find('#jform_language').attr('disabled', false);
window.frames[task + '-association'].Joomla.submitbutton(document.getElementById('adminForm').getAttribute('data-associatedview') + '.apply');
}
return false;
};
// Preload Joomla loading layer.
Joomla.loadingLayer('load');
// Attach behaviour to toggle button.
$(document).on('click', '#toogle-left-panel', function()
{
var referenceHide = this.getAttribute('data-hide-reference');
var referenceShow = this.getAttribute('data-show-reference');
if ($(this).text() === referenceHide)
{
$(this).text(referenceShow);
}
else
{
$(this).text(referenceHide);
}
$('#left-panel').toggle();
$('#right-panel').toggleClass('full-width');
});
// Attach behaviour to language selector change event.
$(document).on('change', '#jform_itemlanguage', function() {
var target = document.getElementById('target-association');
var selected = $(this).val();
// Populate the data attributes and load the the edit page in target frame.
if (selected !== '' && typeof selected !== 'undefined')
{
target.setAttribute('data-action', selected.split(':')[2]);
target.setAttribute('data-id', selected.split(':')[1]);
target.setAttribute('data-language', selected.split(':')[0]);
// Iframe load start, show Joomla loading layer.
Joomla.loadingLayer('show');
// Load the target frame.
target.src = target.getAttribute('data-editurl') + '&task=' + target.getAttribute('data-item') + '.' + target.getAttribute('data-action') + '&id=' + target.getAttribute('data-id');
}
// Reset the data attributes and no item to load.
else
{
$('#toolbar-target').hide();
$('#toolbar-copy').hide();
$('#select-change').addClass("hidden");
$('#remove-assoc').addClass("hidden");
target.setAttribute('data-action', '');
target.setAttribute('data-id', '0');
target.setAttribute('data-language', '');
target.src = '';
}
});
// Attach behaviour to reference frame load event.
$('#reference-association').on('load', function() {
// Waiting until the reference has loaded before loading the target to avoid race conditions
var targetURL = Joomla.getOptions('targetSrc', false);
if (targetURL)
{
targetURL = targetURL.split('&').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'));
// If copy button used
if ($(this).contents().find('#jform_id').val() !== this.getAttribute('data-id'))
{
var target = document.getElementById('target-association');
target.src = target.getAttribute('data-editurl') + '&task=' + target.getAttribute('data-item') + '.edit' + '&id=' + $(this).contents().find('#jform_id').val();
this.src = this.getAttribute('data-editurl') + '&task=' + this.getAttribute('data-item') + '.edit' + '&id=' + this.getAttribute('data-id');
}
var reference = $(this).contents();
// Disable language field.
reference.find('#jform_language_chzn').remove();
reference.find('#jform_language').attr('disabled', true).chosen();
// Remove modal buttons on the reference
reference.find('#associations').find('.btn').remove();
var parse = '';
$('#jform_itemlanguage option').each(function()
{
parse = $(this).val().split(':');
if (typeof parse[0] !== 'undefined')
{
// - For modal association selectors.
langAssociation = parse[0].replace(/-/,'_');
if (reference.find('#jform_associations_' + langAssociation + '_id').val() == '')
{
reference.find('#jform_associations_' + langAssociation + '_name')
.val(document.getElementById('reference-association').getAttribute('data-no-assoc'));
}
}
});
// Iframe load finished, hide Joomla loading layer.
Joomla.loadingLayer('hide');
});
// Attach behaviour to target frame load event.
$('#target-association').on('load', function() {
// We need to check if we are not loading a blank iframe.
if (this.getAttribute('src') != '')
{
$('#toolbar-target').show();
$('#toolbar-copy').show();
$('#select-change').removeClass("hidden");
var targetLanguage = this.getAttribute('data-language');
var targetId = this.getAttribute('data-id');
var targetLoadedId = $(this).contents().find('#jform_id').val() || '0';
// Remove modal buttons on the target
$(this).contents().find('a[href=\"#associations\"]').parent().find('.btn').remove();
$(this).contents().find('#associations').find('.btn').remove();
// Always show General tab first if associations tab is selected on the reference
if ($(this).contents().find('#associations').hasClass('active'))
{
$(this).contents().find('a[href=\"#associations\"]').parent().removeClass('active');
$(this).contents().find('#associations').removeClass('active');
$(this).contents().find('.nav-tabs').find('li').first().addClass('active');
$(this).contents().find('.tab-content').find('.tab-pane').first().addClass('active');
}
// Update language field with the selected language and them disable it.
$(this).contents().find('#jform_language_chzn').remove();
$(this).contents().find('#jform_language').val(targetLanguage).change().attr('disabled', true).chosen();
// 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 = document.getElementById('select-change').getAttribute('data-select');
}
// If we are editing an association.
else
{
// Show change language button
document.getElementById('select-change-text').innerHTML = document.getElementById('select-change').getAttribute('data-change');
$('#remove-assoc').removeClass("hidden");
$('#toolbar-copy').hide();
// Add the id to list of items to check in on close.
var currentIdList = document.getElementById('target-id').value;
var 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).
$('#jform_itemlanguage option[value^=\"' + targetLanguage + ':' + targetId + ':add\"]').val(targetLanguage + ':' + targetLoadedId + ':edit');
// Update main frame data-id attribute (used after save).
this.setAttribute('data-id', targetLoadedId);
this.setAttribute('data-action', 'edit');
}
// Update the reference item associations tab.
var reference = document.getElementById('reference-association');
var languageCode = targetLanguage.replace(/-/, '_');
var referenceTitle = reference.getAttribute('data-title');
var title = $(this).contents().find('#jform_' + referenceTitle).val();
// - For modal association selectors.
$(reference).contents().find('#jform_associations_' + languageCode + '_id').val(targetLoadedId);
$(reference).contents().find('#jform_associations_' + languageCode + '_name').val(title);
// - For chosen association selectors (menus).
$(reference).contents().find('#jform_associations_' + languageCode + '_chzn').remove();
$(reference).contents().find('#jform_associations_' + languageCode).append('<option value=\"'+ targetLoadedId + '\">' + title + '</option>');
$(reference).contents().find('#jform_associations_' + languageCode).val(targetLoadedId).change().chosen();
}
// Update the target item associations tab.
var reference = document.getElementById('reference-association');
var referenceId = reference.getAttribute('data-id');
var languageCode = reference.getAttribute('data-language').replace(/-/, '_');
var target = document.getElementById('target-association');
var targetTitle = target.getAttribute('data-title');
var title = reference.getAttribute('data-title-value');
var target = $(this).contents();
// - For modal association selectors.
target.find('#jform_associations_' + languageCode + '_id').val(referenceId);
target.find('#jform_associations_' + languageCode + '_name').val(title);
// - For chosen association selectors (menus).
target.find('#jform_associations_' + languageCode + '_chzn').remove();
var chznField = target.find('#jform_associations_' + languageCode);
chznField.append('<option value=\"'+ referenceId + '\">' + title + '</option>');
chznField.val(referenceId).change().chosen();
var parse, langAssociation;
$('#jform_itemlanguage option').each(function()
{
parse = $(this).val().split(':');
if (typeof parse[1] !== 'undefined' && parse[1] !== '0')
{
// - For modal association selectors.
langAssociation = parse[0].replace(/-/,'_');
target.find('#jform_associations_' + langAssociation + '_id').val(parse[1]);
// - For chosen association selectors (menus).
target.find('#jform_associations_' + langAssociation + '_chzn').remove();
chznField = target.find('#jform_associations_' + langAssociation);
chznField.append('<option value=\"'+ parse[1] + '\"></option>');
chznField.val(parse[1]).change().chosen();
}
});
// Iframe load finished, hide Joomla loading layer.
Joomla.loadingLayer('hide');
}
});
});