Release of v5.1.0

Add [AllowDynamicProperties] in the base view class for J5. Move the _prepareDocument  above the display call in the base view class. Remove all backward compatibility issues, so JCB will not need the [Backward Compatibility] plugin to run. Added new import powers for custom import of spreadsheets. Move the setDocument and _prepareDocument above the display in the site view and custom admin view. Update the trashhelper layout to work in Joomla 5. Add AllowDynamicProperties (Joomla 4+5) to view class to allow Custom Dynamic Get methods to work without issues. Fix Save failed issue in dynamicGet. #1148. Move all [TEXT, EDITOR, TEXTAREA] fields from [NOT NULL] to [NULL]. Add the DateHelper class and improve the date methods. Add simple SessionHelper class. Add first classes for the new import engine. Improve the [VDM Registry] to be Joomla Registry Compatible. Move all registries to the [VDM Registry] class. Fix Checked Out to be null and not 0. (#1194). Fix created_by, modified_by, checked_out fields in the compiler of the SQL. (#1194). Update all core date fields in table class. (#1188). Update created_by, modified_by, checked_out fields in table class. Implementation of the decentralized Super-Power CORE repository network. (#1190). Fix the noticeboard to display Llewellyn's Joomla Social feed. Started compiling JCB5 on Joomla 5 with PHP 8.2. Add init_defaults option for dynamic form selection setup (to int new items with default values dynamically). Update all JCB 5 tables to utf8mb4_unicode_ci collation if misaligned. Move all internal ID linking to GUID inside of JCB 5. Updated the admin-tab-fields in add-fields view. #1205. Remove Custom Import Tab from admin view. Improved the customcode and placeholder search features.
This commit is contained in:
2025-02-14 22:55:55 +02:00
parent 82922eca5a
commit 442263e387
645 changed files with 42297 additions and 18475 deletions

View File

@@ -165,242 +165,248 @@ defined('_JEXEC') or die;
<script type="text/javascript">
// #jform_add_php_view listeners for add_php_view_vvvvvyt function
// #jform_add_php_view listeners for add_php_view_vvvvvyr function
jQuery('#jform_add_php_view').on('keyup',function()
{
var add_php_view_vvvvvyt = jQuery("#jform_add_php_view input[type='radio']:checked").val();
vvvvvyt(add_php_view_vvvvvyt);
var add_php_view_vvvvvyr = jQuery("#jform_add_php_view input[type='radio']:checked").val();
vvvvvyr(add_php_view_vvvvvyr);
});
jQuery('#adminForm').on('change', '#jform_add_php_view',function (e)
{
e.preventDefault();
var add_php_view_vvvvvyt = jQuery("#jform_add_php_view input[type='radio']:checked").val();
vvvvvyt(add_php_view_vvvvvyt);
var add_php_view_vvvvvyr = jQuery("#jform_add_php_view input[type='radio']:checked").val();
vvvvvyr(add_php_view_vvvvvyr);
});
// #jform_add_php_jview_display listeners for add_php_jview_display_vvvvvyu function
// #jform_add_php_jview_display listeners for add_php_jview_display_vvvvvys function
jQuery('#jform_add_php_jview_display').on('keyup',function()
{
var add_php_jview_display_vvvvvyu = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val();
vvvvvyu(add_php_jview_display_vvvvvyu);
var add_php_jview_display_vvvvvys = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val();
vvvvvys(add_php_jview_display_vvvvvys);
});
jQuery('#adminForm').on('change', '#jform_add_php_jview_display',function (e)
{
e.preventDefault();
var add_php_jview_display_vvvvvyu = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val();
vvvvvyu(add_php_jview_display_vvvvvyu);
var add_php_jview_display_vvvvvys = jQuery("#jform_add_php_jview_display input[type='radio']:checked").val();
vvvvvys(add_php_jview_display_vvvvvys);
});
// #jform_add_php_jview listeners for add_php_jview_vvvvvyv function
// #jform_add_php_jview listeners for add_php_jview_vvvvvyt function
jQuery('#jform_add_php_jview').on('keyup',function()
{
var add_php_jview_vvvvvyv = jQuery("#jform_add_php_jview input[type='radio']:checked").val();
vvvvvyv(add_php_jview_vvvvvyv);
var add_php_jview_vvvvvyt = jQuery("#jform_add_php_jview input[type='radio']:checked").val();
vvvvvyt(add_php_jview_vvvvvyt);
});
jQuery('#adminForm').on('change', '#jform_add_php_jview',function (e)
{
e.preventDefault();
var add_php_jview_vvvvvyv = jQuery("#jform_add_php_jview input[type='radio']:checked").val();
vvvvvyv(add_php_jview_vvvvvyv);
var add_php_jview_vvvvvyt = jQuery("#jform_add_php_jview input[type='radio']:checked").val();
vvvvvyt(add_php_jview_vvvvvyt);
});
// #jform_add_php_document listeners for add_php_document_vvvvvyw function
// #jform_add_php_document listeners for add_php_document_vvvvvyu function
jQuery('#jform_add_php_document').on('keyup',function()
{
var add_php_document_vvvvvyw = jQuery("#jform_add_php_document input[type='radio']:checked").val();
vvvvvyw(add_php_document_vvvvvyw);
var add_php_document_vvvvvyu = jQuery("#jform_add_php_document input[type='radio']:checked").val();
vvvvvyu(add_php_document_vvvvvyu);
});
jQuery('#adminForm').on('change', '#jform_add_php_document',function (e)
{
e.preventDefault();
var add_php_document_vvvvvyw = jQuery("#jform_add_php_document input[type='radio']:checked").val();
vvvvvyw(add_php_document_vvvvvyw);
var add_php_document_vvvvvyu = jQuery("#jform_add_php_document input[type='radio']:checked").val();
vvvvvyu(add_php_document_vvvvvyu);
});
// #jform_add_css_document listeners for add_css_document_vvvvvyx function
// #jform_add_css_document listeners for add_css_document_vvvvvyv function
jQuery('#jform_add_css_document').on('keyup',function()
{
var add_css_document_vvvvvyx = jQuery("#jform_add_css_document input[type='radio']:checked").val();
vvvvvyx(add_css_document_vvvvvyx);
var add_css_document_vvvvvyv = jQuery("#jform_add_css_document input[type='radio']:checked").val();
vvvvvyv(add_css_document_vvvvvyv);
});
jQuery('#adminForm').on('change', '#jform_add_css_document',function (e)
{
e.preventDefault();
var add_css_document_vvvvvyx = jQuery("#jform_add_css_document input[type='radio']:checked").val();
vvvvvyx(add_css_document_vvvvvyx);
var add_css_document_vvvvvyv = jQuery("#jform_add_css_document input[type='radio']:checked").val();
vvvvvyv(add_css_document_vvvvvyv);
});
// #jform_add_javascript_file listeners for add_javascript_file_vvvvvyy function
// #jform_add_javascript_file listeners for add_javascript_file_vvvvvyw function
jQuery('#jform_add_javascript_file').on('keyup',function()
{
var add_javascript_file_vvvvvyy = jQuery("#jform_add_javascript_file input[type='radio']:checked").val();
vvvvvyy(add_javascript_file_vvvvvyy);
var add_javascript_file_vvvvvyw = jQuery("#jform_add_javascript_file input[type='radio']:checked").val();
vvvvvyw(add_javascript_file_vvvvvyw);
});
jQuery('#adminForm').on('change', '#jform_add_javascript_file',function (e)
{
e.preventDefault();
var add_javascript_file_vvvvvyy = jQuery("#jform_add_javascript_file input[type='radio']:checked").val();
vvvvvyy(add_javascript_file_vvvvvyy);
var add_javascript_file_vvvvvyw = jQuery("#jform_add_javascript_file input[type='radio']:checked").val();
vvvvvyw(add_javascript_file_vvvvvyw);
});
// #jform_add_js_document listeners for add_js_document_vvvvvyz function
// #jform_add_js_document listeners for add_js_document_vvvvvyx function
jQuery('#jform_add_js_document').on('keyup',function()
{
var add_js_document_vvvvvyz = jQuery("#jform_add_js_document input[type='radio']:checked").val();
vvvvvyz(add_js_document_vvvvvyz);
var add_js_document_vvvvvyx = jQuery("#jform_add_js_document input[type='radio']:checked").val();
vvvvvyx(add_js_document_vvvvvyx);
});
jQuery('#adminForm').on('change', '#jform_add_js_document',function (e)
{
e.preventDefault();
var add_js_document_vvvvvyz = jQuery("#jform_add_js_document input[type='radio']:checked").val();
vvvvvyz(add_js_document_vvvvvyz);
var add_js_document_vvvvvyx = jQuery("#jform_add_js_document input[type='radio']:checked").val();
vvvvvyx(add_js_document_vvvvvyx);
});
// #jform_add_css listeners for add_css_vvvvvza function
// #jform_add_css listeners for add_css_vvvvvyy function
jQuery('#jform_add_css').on('keyup',function()
{
var add_css_vvvvvza = jQuery("#jform_add_css input[type='radio']:checked").val();
vvvvvza(add_css_vvvvvza);
var add_css_vvvvvyy = jQuery("#jform_add_css input[type='radio']:checked").val();
vvvvvyy(add_css_vvvvvyy);
});
jQuery('#adminForm').on('change', '#jform_add_css',function (e)
{
e.preventDefault();
var add_css_vvvvvza = jQuery("#jform_add_css input[type='radio']:checked").val();
vvvvvza(add_css_vvvvvza);
var add_css_vvvvvyy = jQuery("#jform_add_css input[type='radio']:checked").val();
vvvvvyy(add_css_vvvvvyy);
});
// #jform_add_php_ajax listeners for add_php_ajax_vvvvvzb function
// #jform_add_php_ajax listeners for add_php_ajax_vvvvvyz function
jQuery('#jform_add_php_ajax').on('keyup',function()
{
var add_php_ajax_vvvvvzb = jQuery("#jform_add_php_ajax input[type='radio']:checked").val();
vvvvvzb(add_php_ajax_vvvvvzb);
var add_php_ajax_vvvvvyz = jQuery("#jform_add_php_ajax input[type='radio']:checked").val();
vvvvvyz(add_php_ajax_vvvvvyz);
});
jQuery('#adminForm').on('change', '#jform_add_php_ajax',function (e)
{
e.preventDefault();
var add_php_ajax_vvvvvzb = jQuery("#jform_add_php_ajax input[type='radio']:checked").val();
vvvvvzb(add_php_ajax_vvvvvzb);
var add_php_ajax_vvvvvyz = jQuery("#jform_add_php_ajax input[type='radio']:checked").val();
vvvvvyz(add_php_ajax_vvvvvyz);
});
// #jform_add_custom_button listeners for add_custom_button_vvvvvzc function
// #jform_add_custom_button listeners for add_custom_button_vvvvvza function
jQuery('#jform_add_custom_button').on('keyup',function()
{
var add_custom_button_vvvvvzc = jQuery("#jform_add_custom_button input[type='radio']:checked").val();
vvvvvzc(add_custom_button_vvvvvzc);
var add_custom_button_vvvvvza = jQuery("#jform_add_custom_button input[type='radio']:checked").val();
vvvvvza(add_custom_button_vvvvvza);
});
jQuery('#adminForm').on('change', '#jform_add_custom_button',function (e)
{
e.preventDefault();
var add_custom_button_vvvvvzc = jQuery("#jform_add_custom_button input[type='radio']:checked").val();
vvvvvzc(add_custom_button_vvvvvzc);
var add_custom_button_vvvvvza = jQuery("#jform_add_custom_button input[type='radio']:checked").val();
vvvvvza(add_custom_button_vvvvvza);
});
// #jform_button_position listeners for button_position_vvvvvzd function
// #jform_button_position listeners for button_position_vvvvvzb function
jQuery('#jform_button_position').on('keyup',function()
{
var button_position_vvvvvzd = jQuery("#jform_button_position").val();
vvvvvzd(button_position_vvvvvzd);
var button_position_vvvvvzb = jQuery("#jform_button_position").val();
vvvvvzb(button_position_vvvvvzb);
});
jQuery('#adminForm').on('change', '#jform_button_position',function (e)
{
e.preventDefault();
var button_position_vvvvvzd = jQuery("#jform_button_position").val();
vvvvvzd(button_position_vvvvvzd);
var button_position_vvvvvzb = jQuery("#jform_button_position").val();
vvvvvzb(button_position_vvvvvzb);
});
jQuery(function() {
jQuery('#open-libraries').html('<a href="index.php?option=com_componentbuilder&view=libraries"><?php echo JText::_('COM_COMPONENTBUILDER_LIBRARIES'); ?></a>');
});
document.addEventListener("DOMContentLoaded", function() {
document.querySelector('#open-libraries').innerHTML = '<a href="index.php?option=com_componentbuilder&view=libraries"><?php echo Text::_('COM_COMPONENTBUILDER_LIBRARIES'); ?></a>';
});
jQuery('#jform_snippet').closest('.input-append').addClass('jform_snippet_input_width');
jQuery('#jform_main_get').closest('.input-append').addClass('jform_main_get_input_width');
jQuery('#jform_dynamic_get').closest('.input-append').addClass('jform_dynamic_get_input_width');
jQuery(function() {
jQuery("code").click(function() {
jQuery(this).selText().addClass("selected");
});
// make sure the code bocks are active
document.querySelectorAll("code").forEach(function(codeBlock) {
codeBlock.addEventListener("click", function() {
codeBlock.selText(); // Call the custom selText function
codeBlock.classList.add("selected"); // Add the "selected" class
});
});
});
jQuery('#adminForm').on('change', '#jform_libraries',function (e) {
e.preventDefault();
getSnippets();
});
jQuery.fn.selText = function() {
var obj = this[0];
if (jQuery.browser.msie) {
var range = obj.offsetParent.createTextRange();
range.moveToElementText(obj);
range.select();
} else if (jQuery.browser.mozilla || $.browser.opera) {
var selection = obj.ownerDocument.defaultView.getSelection();
var range = obj.ownerDocument.createRange();
range.selectNodeContents(obj);
selection.removeAllRanges();
selection.addRange(range);
} else if (jQuery.browser.safari) {
var selection = obj.ownerDocument.defaultView.getSelection();
selection.setBaseAndExtent(obj, 0, obj, 1);
}
return this;
}
document.addEventListener("DOMContentLoaded", function () {
// Attach change event listeners to form elements
document.querySelector("#adminForm")?.addEventListener("change", function (event) {
const target = event.target;
jQuery('#adminForm').on('change', '#jform_snippet',function (e) {
e.preventDefault();
// get type value
var snippetId = jQuery("#jform_snippet option:selected").val();
getSnippetDetails(snippetId);
});
if (target.matches("#jform_libraries")) {
event.preventDefault();
getSnippets();
} else if (target.matches("#jform_snippet")) {
event.preventDefault();
const snippetId = target.value;
if (snippetId) {
getSnippetDetails(snippetId);
}
} else if (target.matches("#jform_dynamic_get")) {
event.preventDefault();
const dynamicId = target.value;
if (dynamicId) {
getDynamicValues(dynamicId);
}
}
});
jQuery(document).ready(function() {
// get type value
var snippetId = jQuery("#jform_snippet option:selected").val();
getSnippetDetails(snippetId);
});
// Execute these functions on page load
const snippetElement = document.querySelector("#jform_snippet");
const snippetElementValue = snippetElement.value
if (snippetElement && snippetElementValue) {
getSnippetDetails(snippetElementValue);
}
jQuery('#adminForm').on('change', '#jform_dynamic_get',function (e) {
e.preventDefault();
// get type value
var dynamicId = jQuery("#jform_dynamic_get option:selected").val();
getDynamicValues(dynamicId);
});
const dynamicElement = document.querySelector("#jform_dynamic_get");
const dynamicElementValue = dynamicElement.value;
if (dynamicElement && dynamicElementValue) {
getDynamicValues(dynamicElementValue);
}
jQuery(document).ready(function() {
// get type value
var dynamicId = jQuery("#jform_dynamic_get option:selected").val();
getDynamicValues(dynamicId);
});
jQuery(document).ready(function() {
// get type value
getLayoutDetails(9999);
getTemplateDetails(9999);
});
// some lang strings
var select_a_snippet = '<?php echo Text::_('COM_COMPONENTBUILDER_SELECT_A_SNIPPET'); ?>';
var create_a_snippet = '<?php echo Text::_('COM_COMPONENTBUILDER_CREATE_A_SNIPPET'); ?>';
HTMLElement.prototype.selText = function() {
var obj = this;
// For modern browsers, handle the selection
var selection = window.getSelection();
var range = document.createRange();
// Select the content of the element
range.selectNodeContents(obj);
selection.removeAllRanges(); // Clear any previous selections
selection.addRange(range); // Add the new selection range
return this;
};
document.addEventListener("DOMContentLoaded", function() {
document.querySelectorAll(".loading-dots").forEach(function(loading_dots) {