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

@@ -35,6 +35,7 @@ use Joomla\CMS\Session\Session;
*
* @since 1.6
*/
#[\AllowDynamicProperties]
class HtmlView extends BaseHtmlView
{
/**
@@ -75,9 +76,10 @@ class HtmlView extends BaseHtmlView
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
* @throws \Exception
* @since 1.6
*/
public function display($tpl = null)
public function display($tpl = null): void
{
// get component params
$this->params = ComponentHelper::getParams('com_componentbuilder');
@@ -105,10 +107,10 @@ class HtmlView extends BaseHtmlView
throw new \Exception(implode(PHP_EOL, $errors), 500);
}
parent::display($tpl);
// Set the html view document stuff
$this->_prepareDocument();
parent::display($tpl);
}
/**
@@ -226,20 +228,20 @@ class HtmlView extends BaseHtmlView
$expire = 30000; // only 30 seconds
}
// Set the Time To Live To JavaScript
$this->document->addScriptDeclaration("var expire = ". (int) $expire.";");
$this->getDocument()->addScriptDeclaration("var expire = ". (int) $expire.";");
// set snippet path
$this->document->addScriptDeclaration("var snippetPath = '". ComponentbuilderHelper::$snippetPath ."';");
$this->document->addScriptDeclaration("var snippetsPath = '". ComponentbuilderHelper::$snippetsPath ."';");
$this->getDocument()->addScriptDeclaration("var snippetPath = '". ComponentbuilderHelper::$snippetPath ."';");
$this->getDocument()->addScriptDeclaration("var snippetsPath = '". ComponentbuilderHelper::$snippetsPath ."';");
// token
$this->document->addScriptDeclaration("var token = '". Session::getFormToken() ."';");
$this->getDocument()->addScriptDeclaration("var token = '". Session::getFormToken() ."';");
// add some global items buckets for bulk updating
$this->document->addScriptDeclaration("var bulkItems = {};");
$this->document->addScriptDeclaration("bulkItems.new = [];");
$this->document->addScriptDeclaration("bulkItems.diverged = [];");
$this->document->addScriptDeclaration("bulkItems.ahead = [];");
$this->document->addScriptDeclaration("bulkItems.behind = [];");
$this->getDocument()->addScriptDeclaration("var bulkItems = {};");
$this->getDocument()->addScriptDeclaration("bulkItems.new = [];");
$this->getDocument()->addScriptDeclaration("bulkItems.diverged = [];");
$this->getDocument()->addScriptDeclaration("bulkItems.ahead = [];");
$this->getDocument()->addScriptDeclaration("bulkItems.behind = [];");
// set an error message if needed
$this->document->addScriptDeclaration("var returnError = '<div class=\"uk-alert uk-alert-warning\"><h1>".Text::_('COM_COMPONENTBUILDER_AN_ERROR_HAS_OCCURRED')."!</h1><p>".Text::_('COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_LATER').".</p></div>';");
$this->getDocument()->addScriptDeclaration("var returnError = '<div class=\"uk-alert uk-alert-warning\"><h1>".Text::_('COM_COMPONENTBUILDER_AN_ERROR_HAS_OCCURRED')."!</h1><p>".Text::_('COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_LATER').".</p></div>';");
// need to add some language strings
Text::script('COM_COMPONENTBUILDER_JCB_COMMUNITY_SNIPPETS');
Text::script('COM_COMPONENTBUILDER_SNIPPETS');
@@ -274,7 +276,7 @@ class HtmlView extends BaseHtmlView
Text::script('COM_COMPONENTBUILDER_AVAILABLE_LIBRARIES');
Text::script('COM_COMPONENTBUILDER_OPEN_LIBRARY_SNIPPETS');
// add some lang verfy messages
$this->document->addScriptDeclaration("
$this->getDocument()->addScriptDeclaration("
// set the snippet from gitHub
function getConfirmUpdate(status) {
switch(status) {
@@ -300,7 +302,7 @@ class HtmlView extends BaseHtmlView
if (ArrayHelper::check($this->items))
{
// Set the local snippets array
$this->document->addScriptDeclaration("var local_snippets = ". json_encode($local_snippets).";");
$this->getDocument()->addScriptDeclaration("var local_snippets = ". json_encode($local_snippets).";");
}
// add styles
foreach ($this->styles as $style)