From a66e099a735bff20a8359916ef01635d5285eff1 Mon Sep 17 00:00:00 2001 From: aB0t Date: Tue, 9 Apr 2024 13:44:08 +0200 Subject: [PATCH] Release of v3.2.1-alpha3 Fix plugin code display when methods and properties are missing. --- CHANGELOG.md | 4 + README.md | 8 +- admin/README.txt | 8 +- admin/models/fields/pluginsclassmethods.php | 8 +- .../models/fields/pluginsclassproperties.php | 8 +- admin/models/fields/powersclassmethods.php | 8 +- admin/models/fields/powersclassproperties.php | 8 +- admin/sql/updates/mysql/3.2.1-alpha2.sql | 1 + admin/views/admin_view/tmpl/edit.php | 384 +++--- admin/views/class_method/tmpl/edit.php | 10 +- admin/views/class_property/tmpl/edit.php | 10 +- admin/views/custom_admin_view/tmpl/edit.php | 100 +- admin/views/custom_code/tmpl/edit.php | 78 +- admin/views/dynamic_get/tmpl/edit.php | 336 ++--- admin/views/field/tmpl/edit.php | 142 +- admin/views/fieldtype/tmpl/edit.php | 420 +++--- admin/views/help_document/tmpl/edit.php | 54 +- admin/views/joomla_plugin/tmpl/edit.php | 308 ++--- admin/views/layout/tmpl/edit.php | 10 +- admin/views/library/tmpl/edit.php | 358 ++--- admin/views/power/tmpl/edit.php | 10 +- admin/views/server/tmpl/edit.php | 136 +- admin/views/site_view/tmpl/edit.php | 110 +- admin/views/template/tmpl/edit.php | 10 +- componentbuilder.xml | 4 +- componentbuilder_update_server.xml | 18 + media/js/admin_view.js | 410 +++--- media/js/class_method.js | 38 +- media/js/class_property.js | 38 +- media/js/custom_admin_view.js | 100 +- media/js/custom_code.js | 78 +- media/js/dynamic_get.js | 1168 ++++++++--------- media/js/field.js | 364 ++--- media/js/fieldtype.js | 708 +++++----- media/js/help_document.js | 218 +-- media/js/joomla_plugin.js | 297 ++--- media/js/layout.js | 10 +- media/js/library.js | 624 ++++----- media/js/power.js | 10 +- media/js/server.js | 580 ++++---- media/js/site_view.js | 128 +- media/js/template.js | 10 +- script.php | 2 +- 43 files changed, 3639 insertions(+), 3695 deletions(-) create mode 100644 admin/sql/updates/mysql/3.2.1-alpha2.sql diff --git a/CHANGELOG.md b/CHANGELOG.md index 042be56a9..eef9f380c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# v3.2.1-alpha3 + +- Fix plugin code display when methods and properties are missing. + # v3.2.1-alpha2 - Add view list and single name fix. diff --git a/README.md b/README.md index b04ce9271..c40e361ed 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 (3.2.1-alpha2) 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 (3.2.1-alpha3) 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) @@ -145,12 +145,12 @@ TODO + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 + *Last Build*: 9th April, 2024 -+ *Version*: 3.2.1-alpha2 ++ *Version*: 3.2.1-alpha3 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **739869** ++ *Line count*: **739813** + *Field count*: **2080** -+ *File count*: **5213** ++ *File count*: **5214** + *Folder count*: **459** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). diff --git a/admin/README.txt b/admin/README.txt index b04ce9271..c40e361ed 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 (3.2.1-alpha2) 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 (3.2.1-alpha3) 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) @@ -145,12 +145,12 @@ TODO + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 + *Last Build*: 9th April, 2024 -+ *Version*: 3.2.1-alpha2 ++ *Version*: 3.2.1-alpha3 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **739869** ++ *Line count*: **739813** + *Field count*: **2080** -+ *File count*: **5213** ++ *File count*: **5214** + *Folder count*: **459** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). diff --git a/admin/models/fields/pluginsclassmethods.php b/admin/models/fields/pluginsclassmethods.php index 692c105a5..162e7c7c8 100644 --- a/admin/models/fields/pluginsclassmethods.php +++ b/admin/models/fields/pluginsclassmethods.php @@ -62,12 +62,17 @@ class JFormFieldPluginsclassmethods extends JFormFieldList } $db->setQuery((string)$query); $items = $db->loadObjectList(); - $options = array(); + $options = []; if ($items) { $options[] = Html::_('select.option', '', 'Select a method'); foreach($items as $item) { + if (!isset($item->visibility)) + { + continue; + } + // we are using this code in more then one field JCB custom_code if ('method' === 'method') { @@ -77,6 +82,7 @@ class JFormFieldPluginsclassmethods extends JFormFieldList { $select = $item->visibility . ' $' . $item->method_name; } + $options[] = Html::_('select.option', $item->id, $select); } } diff --git a/admin/models/fields/pluginsclassproperties.php b/admin/models/fields/pluginsclassproperties.php index 2ff25c348..cdfbd9283 100644 --- a/admin/models/fields/pluginsclassproperties.php +++ b/admin/models/fields/pluginsclassproperties.php @@ -62,12 +62,17 @@ class JFormFieldPluginsclassproperties extends JFormFieldList } $db->setQuery((string)$query); $items = $db->loadObjectList(); - $options = array(); + $options = []; if ($items) { $options[] = Html::_('select.option', '', 'Select a property'); foreach($items as $item) { + if (!isset($item->visibility)) + { + continue; + } + // we are using this code in more then one field JCB custom_code if ('method' === 'property') { @@ -77,6 +82,7 @@ class JFormFieldPluginsclassproperties extends JFormFieldList { $select = $item->visibility . ' $' . $item->property_name; } + $options[] = Html::_('select.option', $item->id, $select); } } diff --git a/admin/models/fields/powersclassmethods.php b/admin/models/fields/powersclassmethods.php index 30a0fc964..7744cf169 100644 --- a/admin/models/fields/powersclassmethods.php +++ b/admin/models/fields/powersclassmethods.php @@ -62,12 +62,17 @@ class JFormFieldPowersclassmethods extends JFormFieldList } $db->setQuery((string)$query); $items = $db->loadObjectList(); - $options = array(); + $options = []; if ($items) { $options[] = Html::_('select.option', '', 'Select a method'); foreach($items as $item) { + if (!isset($item->visibility)) + { + continue; + } + // we are using this code in more then one field JCB custom_code if ('method' === 'method') { @@ -77,6 +82,7 @@ class JFormFieldPowersclassmethods extends JFormFieldList { $select = $item->visibility . ' $' . $item->method_name; } + $options[] = Html::_('select.option', $item->id, $select); } } diff --git a/admin/models/fields/powersclassproperties.php b/admin/models/fields/powersclassproperties.php index 5759de89c..6b6a86c18 100644 --- a/admin/models/fields/powersclassproperties.php +++ b/admin/models/fields/powersclassproperties.php @@ -62,12 +62,17 @@ class JFormFieldPowersclassproperties extends JFormFieldList } $db->setQuery((string)$query); $items = $db->loadObjectList(); - $options = array(); + $options = []; if ($items) { $options[] = Html::_('select.option', '', 'Select a property'); foreach($items as $item) { + if (!isset($item->visibility)) + { + continue; + } + // we are using this code in more then one field JCB custom_code if ('method' === 'property') { @@ -77,6 +82,7 @@ class JFormFieldPowersclassproperties extends JFormFieldList { $select = $item->visibility . ' $' . $item->property_name; } + $options[] = Html::_('select.option', $item->id, $select); } } diff --git a/admin/sql/updates/mysql/3.2.1-alpha2.sql b/admin/sql/updates/mysql/3.2.1-alpha2.sql new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/admin/sql/updates/mysql/3.2.1-alpha2.sql @@ -0,0 +1 @@ + diff --git a/admin/views/admin_view/tmpl/edit.php b/admin/views/admin_view/tmpl/edit.php index 7961151c0..24e9964e1 100644 --- a/admin/views/admin_view/tmpl/edit.php +++ b/admin/views/admin_view/tmpl/edit.php @@ -206,476 +206,491 @@ $componentParams = $this->params; // will be removed just use $this->params inst