- md5
- 9ae22ed69af2d6f1d61cffd0461576c9
- sha1
- feed2cab968d3bcfc8699722cd6fed1cf15148d0
- sha256
- d3b29c790e085299013933851a44b4b7969cb19ad0d8cc5739369be0e726fd0d
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
/**
* PLEASE DO NOT MODIFY THIS FILE. WORK ON THE ES6 VERSION.
* OTHERWISE YOUR CHANGES WILL BE REPLACED ON THE NEXT BUILD.
**/
/**
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// Ajax call to get the override status.
(function () {
'use strict'; // Add a listener on content loaded to initiate the check.
document.addEventListener('DOMContentLoaded', function () {
if (Joomla.getOptions('js-override-check')) {
var options = Joomla.getOptions('js-override-check');
var update = function update(type, text, linkHref) {
var link = document.getElementById('plg_quickicon_overridecheck');
var linkSpans = link.querySelectorAll('span.j-links-link');
if (link) {
link.classList.add(type);
if (linkHref) {
link.setAttribute('href', linkHref);
}
}
if (linkSpans.length) {
linkSpans.forEach(function (span) {
span.innerHTML = text;
});
}
};
Joomla.request({
url: options.ajaxUrl,
method: 'GET',
data: '',
perform: true,
onSuccess: function onSuccess(response) {
var updateInfoList = JSON.parse(response);
if (updateInfoList.installerOverride !== 'disabled') {
if (Array.isArray(updateInfoList)) {
if (updateInfoList.length === 0) {
// No overrides found
update('success', Joomla.Text._('PLG_QUICKICON_OVERRIDECHECK_UPTODATE'), '');
} else {
// Scroll to page top
window.scrollTo(0, 0);
update('danger', Joomla.JText._('PLG_QUICKICON_OVERRIDECHECK_OVERRIDEFOUND').replace('%s', "<span class=\"badge badge-light\">".concat(updateInfoList.length, "</span>")), '');
}
} else {
// An error occurred
update('danger', Joomla.Text._('PLG_QUICKICON_OVERRIDECHECK_ERROR'), '');
}
} else {
update('danger', Joomla.Text._('PLG_QUICKICON_OVERRIDECHECK_ERROR_ENABLE'), "index.php?option=com_plugins&task=plugin.edit&extension_id=".concat(options.pluginId));
}
},
onError: function onError() {
// An error occurred
update('danger', Joomla.Text._('PLG_QUICKICON_OVERRIDECHECK_ERROR'), '');
}
});
}
});
})();
The same content is in 6 releases, Joomla 4.0.0-alpha7 to 4.0.0-alpha12. See them all, or every version of this file.