Release of v3.2.5
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.
This commit is contained in:
@@ -80,11 +80,11 @@ class ComponentbuilderViewJoomla_plugin extends HtmlView
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
}
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
|
||||
// Set the document
|
||||
$this->setDocument();
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
|
||||
@@ -196,6 +196,11 @@ class ComponentbuilderViewJoomla_plugin extends HtmlView
|
||||
*/
|
||||
protected function setDocument()
|
||||
{
|
||||
// Load Core
|
||||
Html::_('behavior.core');
|
||||
// Load jQuery
|
||||
Html::_('jquery.framework');
|
||||
|
||||
$isNew = ($this->item->id < 1);
|
||||
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_NEW' : 'COM_COMPONENTBUILDER_JOOMLA_PLUGIN_EDIT'));
|
||||
Html::_('stylesheet', "administrator/components/com_componentbuilder/assets/css/joomla_plugin.css", ['version' => 'auto']);
|
||||
@@ -220,9 +225,9 @@ class ComponentbuilderViewJoomla_plugin extends HtmlView
|
||||
Html::_('script', 'media/com_componentbuilder/js/jstorage.min.js', ['version' => 'auto']);
|
||||
Html::_('script', 'media/com_componentbuilder/js/strtotime.js', ['version' => 'auto']);
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
$this->getDocument()->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
$this->getDocument()->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) Uri::getInstance())) . "';");
|
||||
// set some lang
|
||||
Text::script('COM_COMPONENTBUILDER_ALREADY_SELECTED_TRY_ANOTHER');
|
||||
Text::script('COM_COMPONENTBUILDER_TYPE_OR_SELECT_SOME_OPTIONS');
|
||||
@@ -259,8 +264,8 @@ class ComponentbuilderViewJoomla_plugin extends HtmlView
|
||||
$expire = 30000; // only 30 seconds
|
||||
}
|
||||
// Set the Time To Live To JavaScript
|
||||
$this->document->addScriptDeclaration("var expire = ". (int) $expire.";");
|
||||
$this->document->addScriptDeclaration("selectionArray = {'property':{},'method':{}};");
|
||||
$this->getDocument()->addScriptDeclaration("var expire = ". (int) $expire.";");
|
||||
$this->getDocument()->addScriptDeclaration("selectionArray = {'property':{},'method':{}};");
|
||||
// add a few field options via PHP
|
||||
\JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
$tmp_ = \JFormHelper::loadFieldType('joomlaplugingroups')->options;
|
||||
@@ -272,7 +277,7 @@ class ComponentbuilderViewJoomla_plugin extends HtmlView
|
||||
$_tmp[$item->value] = $item->text;
|
||||
}
|
||||
// Set the values to JavaScript
|
||||
$this->document->addScriptDeclaration("selectionArray['joomla_plugin_group'] = ". json_encode($_tmp) . ";");
|
||||
$this->getDocument()->addScriptDeclaration("selectionArray['joomla_plugin_group'] = ". json_encode($_tmp) . ";");
|
||||
}
|
||||
$tmp_ = \JFormHelper::loadFieldType('pluginsclassproperties')->options;
|
||||
if (ArrayHelper::check($tmp_))
|
||||
@@ -283,7 +288,7 @@ class ComponentbuilderViewJoomla_plugin extends HtmlView
|
||||
$_tmp[$item->value] = $item->text;
|
||||
}
|
||||
// Set the values to JavaScript
|
||||
$this->document->addScriptDeclaration("selectionArray['property'] = ". json_encode($_tmp) . ";");
|
||||
$this->getDocument()->addScriptDeclaration("selectionArray['property'] = ". json_encode($_tmp) . ";");
|
||||
}
|
||||
$tmp_ = \JFormHelper::loadFieldType('pluginsclassmethods')->options;
|
||||
if (ArrayHelper::check($tmp_))
|
||||
@@ -294,7 +299,7 @@ class ComponentbuilderViewJoomla_plugin extends HtmlView
|
||||
$_tmp[$item->value] = $item->text;
|
||||
}
|
||||
// Set the values to JavaScript
|
||||
$this->document->addScriptDeclaration("selectionArray['method'] = ". json_encode($_tmp) . ";");
|
||||
$this->getDocument()->addScriptDeclaration("selectionArray['method'] = ". json_encode($_tmp) . ";");
|
||||
}
|
||||
Text::script('view not acceptable. Error');
|
||||
}
|
||||
@@ -304,7 +309,7 @@ class ComponentbuilderViewJoomla_plugin extends HtmlView
|
||||
*/
|
||||
public function getDocument()
|
||||
{
|
||||
$this->document ??= JFactory::getDocument();
|
||||
$this->document ??= Factory::getDocument();
|
||||
|
||||
return $this->document;
|
||||
}
|
||||
|
Reference in New Issue
Block a user