diff --git a/CHANGELOG.md b/CHANGELOG.md index 02d907061..a32f8d108 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ -# v4.0.4-alpha1 +# v4.0.4-alpha2 + +- 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. + +# v4.0.4-alpha - Add [AllowDynamicProperties] in the base view class for J5 - Move the _prepareDocument above the display call in the base view class diff --git a/ComponentbuilderInstallerScript.php b/ComponentbuilderInstallerScript.php index ca0b0fe8e..1084fcecd 100644 --- a/ComponentbuilderInstallerScript.php +++ b/ComponentbuilderInstallerScript.php @@ -3270,7 +3270,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface echo '
-

Upgrade to Version 4.0.4-alpha1 Was Successful! Let us know if anything is not working as expected.

'; +

Upgrade to Version 4.0.4-alpha2 Was Successful! Let us know if anything is not working as expected.

'; // Add/Update component in the action logs extensions table. $this->setActionLogsExtensions(); diff --git a/README.md b/README.md index c868aa4f7..c018ee7a8 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (4.0.4-alpha1) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (4.0.4-alpha2) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,14 +144,14 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 29th September, 2024 -+ *Version*: 4.0.4-alpha1 ++ *Last Build*: 7th October, 2024 ++ *Version*: 4.0.4-alpha2 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **858763** ++ *Line count*: **865648** + *Field count*: **2098** -+ *File count*: **5928** -+ *Folder count*: **619** ++ *File count*: **5976** ++ *Folder count*: **621** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) diff --git a/admin/README.txt b/admin/README.txt index c868aa4f7..c018ee7a8 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (4.0.4-alpha1) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (4.0.4-alpha2) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,14 +144,14 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 29th September, 2024 -+ *Version*: 4.0.4-alpha1 ++ *Last Build*: 7th October, 2024 ++ *Version*: 4.0.4-alpha2 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **858763** ++ *Line count*: **865648** + *Field count*: **2098** -+ *File count*: **5928** -+ *Folder count*: **619** ++ *File count*: **5976** ++ *Folder count*: **621** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) diff --git a/admin/assets/js/get_snippets.js b/admin/assets/js/get_snippets.js index f4af38715..a810ae982 100644 --- a/admin/assets/js/get_snippets.js +++ b/admin/assets/js/get_snippets.js @@ -78,7 +78,7 @@ function getLibraries(path) { buildLibraries(_paths); } else { jQuery.get(path) - .success(function(paths) { + .done(function(paths) { // load only this library paths jQuery.jStorage.set('JCB-Snippets-Paths', paths, {TTL: expire}); buildLibraries(paths); @@ -161,7 +161,7 @@ function getSnippets(path, libraryName) { jQuery('#snippets-github').html('

'+Joomla.JText._('COM_COMPONENTBUILDER_JCB_COMMUNITY_SNIPPETS')+'

'); } else { jQuery.get(path) - .success(function(paths) { + .done(function(paths) { // load only this library paths jQuery.jStorage.set('JCB-Snippets-Paths', paths, {TTL: expire}); setSnippets(paths, libraryName); @@ -190,7 +190,7 @@ function setSnippets(paths, libraryName) { fromLocal = true; } else { jQuery.get(snippetPath+value.path) - .success(function(snippet) { + .done(function(snippet) { // convert the string to json.object snippet = jQuery.parseJSON(snippet); jQuery.jStorage.set(value.path, snippet, {TTL: expire}); @@ -469,7 +469,7 @@ function getSnippetModal(key, type) { showSnippetModal(_snippet, type); } else { jQuery.get('https://raw.githubusercontent.com/vdm-io/Joomla-Component-Builder-Snippets/master/'+key) - .success(function(snippet) { + .done(function(snippet) { // convert the string to json.object snippet = jQuery.parseJSON(snippet); jQuery.jStorage.set(key, snippet, {TTL: expire}); @@ -527,7 +527,6 @@ function getKeyID(key) { // return the id build return keyID; } - // get key ID function getKeyID(key) { // get useful ID diff --git a/admin/compiler/joomla_3/HtmlView_edit.php b/admin/compiler/joomla_3/HtmlView_edit.php index eb12a0165..c273c8f67 100644 --- a/admin/compiler/joomla_3/HtmlView_edit.php +++ b/admin/compiler/joomla_3/HtmlView_edit.php @@ -113,6 +113,11 @@ class ###Component###View###View### 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_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT')); Html::_('stylesheet', "administrator/components/com_###component###/assets/css/###view###.css", ['version' => 'auto']);###AJAXTOKE######LINKEDVIEWTABLESCRIPTS### diff --git a/admin/compiler/joomla_3/HtmlView_edit_site.php b/admin/compiler/joomla_3/HtmlView_edit_site.php index 99c3b9875..d5d413634 100644 --- a/admin/compiler/joomla_3/HtmlView_edit_site.php +++ b/admin/compiler/joomla_3/HtmlView_edit_site.php @@ -114,6 +114,11 @@ class ###Component###View###View### 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_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT')); // only add the ISIS template css & js if needed (default is 1 = true) diff --git a/admin/compiler/joomla_3/HtmlView_list.php b/admin/compiler/joomla_3/HtmlView_list.php index e6371926c..83cc53e0d 100644 --- a/admin/compiler/joomla_3/HtmlView_list.php +++ b/admin/compiler/joomla_3/HtmlView_list.php @@ -151,6 +151,11 @@ class ###Component###View###Views### extends HtmlView */ protected function setDocument() { + // Load Core + Html::_('behavior.core'); + // Load jQuery + Html::_('jquery.framework'); + if (!isset($this->document)) { $this->document = Factory::getDocument(); diff --git a/admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php b/admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php index 94e6fd359..4ce16d9a2 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php +++ b/admin/compiler/joomla_4/ADMIN_VIEWS_HTML.php @@ -25,7 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator * * @since 1.6 */ -#[AllowDynamicProperties] +#[\AllowDynamicProperties] class HtmlView extends BaseHtmlView { /** @@ -90,9 +90,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 { // Assign data to the view $this->items = $this->get('Items'); diff --git a/admin/compiler/joomla_4/ADMIN_VIEW_HTML.php b/admin/compiler/joomla_4/ADMIN_VIEW_HTML.php index 7dd658664..4cafee33a 100644 --- a/admin/compiler/joomla_4/ADMIN_VIEW_HTML.php +++ b/admin/compiler/joomla_4/ADMIN_VIEW_HTML.php @@ -25,7 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator * * @since 1.6 */ -#[AllowDynamicProperties] +#[\AllowDynamicProperties] class HtmlView extends BaseHtmlView { /** @@ -114,9 +114,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 { // set params $this->params = ComponentHelper::getParams('com_###component###'); diff --git a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php index 6257cfd58..a557e3aff 100644 --- a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php +++ b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEWS_HTML.php @@ -25,7 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator * * @since 1.6 */ -#[AllowDynamicProperties] +#[\AllowDynamicProperties] class HtmlView extends BaseHtmlView { /** @@ -66,9 +66,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_###component###'); diff --git a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_HTML.php b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_HTML.php index 748ca2454..4d62671ec 100644 --- a/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_HTML.php +++ b/admin/compiler/joomla_4/CUSTOM_ADMIN_VIEW_HTML.php @@ -25,7 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator * * @since 1.6 */ -#[AllowDynamicProperties] +#[\AllowDynamicProperties] class HtmlView extends BaseHtmlView { /** @@ -34,9 +34,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_###component###'); diff --git a/admin/compiler/joomla_4/DASH_VIEW_HTML.php b/admin/compiler/joomla_4/DASH_VIEW_HTML.php index e25b5dc4f..ec7c59f52 100644 --- a/admin/compiler/joomla_4/DASH_VIEW_HTML.php +++ b/admin/compiler/joomla_4/DASH_VIEW_HTML.php @@ -25,14 +25,17 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator * * @since 1.6 */ -#[AllowDynamicProperties] +#[\AllowDynamicProperties] class HtmlView extends BaseHtmlView { /** * View display method + * * @return void + * @throws \Exception + * @since 1.6 */ - function display($tpl = null) + function display($tpl = null): void { // Assign data to the view $this->icons = $this->get('Icons'); diff --git a/admin/compiler/joomla_4/SITE_VIEWS_HTML.php b/admin/compiler/joomla_4/SITE_VIEWS_HTML.php index 2776f8bc2..07113d005 100644 --- a/admin/compiler/joomla_4/SITE_VIEWS_HTML.php +++ b/admin/compiler/joomla_4/SITE_VIEWS_HTML.php @@ -81,9 +81,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 combined params of both component and menu $this->app ??= Factory::getApplication(); diff --git a/admin/compiler/joomla_4/SITE_VIEW_HTML.php b/admin/compiler/joomla_4/SITE_VIEW_HTML.php index 88b335bfd..fc104516c 100644 --- a/admin/compiler/joomla_4/SITE_VIEW_HTML.php +++ b/admin/compiler/joomla_4/SITE_VIEW_HTML.php @@ -65,9 +65,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 combined params of both component and menu $this->app ??= Factory::getApplication(); diff --git a/admin/config.xml b/admin/config.xml index fe3f64206..5d1863161 100644 --- a/admin/config.xml +++ b/admin/config.xml @@ -57,7 +57,7 @@ buttons="add,remove,move" description="COM_COMPONENTBUILDER_CONFIG_SUBFORM_LAYOUTS_DESCRIPTION" icon="list" - max="9" + max="10" min="1">