From 104c4e6bae5b052746f1839af7d61d3308b14112 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Wed, 6 Feb 2019 11:32:38 +0200 Subject: [PATCH] Fixed gh-373 so that the auto update of selection is only triggered when toggling the all selection button. --- README.md | 8 ++++---- admin/README.txt | 8 ++++---- admin/controllers/joomla_components.php | 8 ++++---- admin/models/forms/dynamic_get.js | 4 ---- componentbuilder.xml | 6 +++--- componentbuilder_update_server.xml | 4 ++-- script.php | 2 +- site/controllers/api.php | 8 ++++---- 8 files changed, 22 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index c23d89aab..f230d9f2b 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,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 safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.10) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.11) 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,11 +144,11 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 31st January, 2019 -+ *Version*: 2.9.10 ++ *Last Build*: 6th February, 2019 ++ *Version*: 2.9.11 + *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **195869** ++ *Line count*: **195865** + *Field count*: **1089** + *File count*: **1277** + *Folder count*: **201** diff --git a/admin/README.txt b/admin/README.txt index c23d89aab..f230d9f2b 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -12,7 +12,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 safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.10) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.11) 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,11 +144,11 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 31st January, 2019 -+ *Version*: 2.9.10 ++ *Last Build*: 6th February, 2019 ++ *Version*: 2.9.11 + *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **195869** ++ *Line count*: **195865** + *Field count*: **1089** + *File count*: **1277** + *Folder count*: **201** diff --git a/admin/controllers/joomla_components.php b/admin/controllers/joomla_components.php index e99f120ea..4f735d70a 100644 --- a/admin/controllers/joomla_components.php +++ b/admin/controllers/joomla_components.php @@ -286,13 +286,13 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin $model = componentbuilderHelper::getModel('joomla_components', JPATH_ADMINISTRATOR . '/components/com_componentbuilder'); // set user $model->user = $this->getApiUser(); + // make sure to set active type (adding this script from custom code :) + $model->activeType = 'manualBackup'; // check if export is allowed for this user. (we need this sorry) if ($model->user->authorise('joomla_component.export', 'com_componentbuilder') && $model->user->authorise('core.export', 'com_componentbuilder')) { // get all component IDs to backup $pks = componentbuilderHelper::getComponentIDs(); - // make sure to set active type to backup - $model->activeType = 'manualBackup'; // set auto loader ComponentbuilderHelper::autoLoader('smart'); // manual backup message @@ -413,7 +413,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin } } // quite only if auto backup (adding this script from custom code :) - if ('backup' === 'manualBackup') + if ('backup' === $model->activeType) { echo "# " . $backupNoticeStatus . "\n" .implode("\n", $backupNotice); // clear session @@ -424,7 +424,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin return; } // quite only if auto backup (adding this script from custom code :) - if ('backup' === 'manualBackup') + if ('backup' === $model->activeType) { echo "# Error\n" . JText::_('COM_COMPONENTBUILDER_ACCESS_DENIED'); // clear session diff --git a/admin/models/forms/dynamic_get.js b/admin/models/forms/dynamic_get.js index c4cc3d082..82f81cf5d 100644 --- a/admin/models/forms/dynamic_get.js +++ b/admin/models/forms/dynamic_get.js @@ -1523,10 +1523,6 @@ jQuery(document).ready(function() getLinked(); var valueSwitch = jQuery("#jform_add_php_router_parse input[type='radio']:checked").val(); getDynamicScripts(valueSwitch); - // get the selected value of the select_all - var select_all = jQuery("#jform_select_all input[type='radio']:checked").val(); - // make sure the selection is correct - setSelectAll(select_all); // check and load all the custom code edit buttons getEditCustomCodeButtons(); }); diff --git a/componentbuilder.xml b/componentbuilder.xml index 96387964f..a9b7da98c 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,15 +1,15 @@ COM_COMPONENTBUILDER - 31st January, 2019 + 6th February, 2019 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt - 2.9.10 + 2.9.11 Component Builder (v.2.9.10) +

Component Builder (v.2.9.11)

The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml index 591553bb3..872042f9b 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -582,10 +582,10 @@ Builds Complex Joomla Components com_componentbuilder component - 2.9.10 + 2.9.11 http://www.joomlacomponentbuilder.com - https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.9.10/JCB_v2.9.10.zip + https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.9.11/JCB_v2.9.11.zip stable diff --git a/script.php b/script.php index ecec7a07e..bbc0e6e4a 100644 --- a/script.php +++ b/script.php @@ -5172,7 +5172,7 @@ class com_componentbuilderInstallerScript echo ' -

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

'; +

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

'; } } diff --git a/site/controllers/api.php b/site/controllers/api.php index 5cc6d2d1f..a2dd53ef6 100644 --- a/site/controllers/api.php +++ b/site/controllers/api.php @@ -44,13 +44,13 @@ class ComponentbuilderControllerApi extends JControllerForm $model = componentbuilderHelper::getModel('joomla_components', JPATH_ADMINISTRATOR . '/components/com_componentbuilder'); // set user $model->user = $this->getApiUser(); + // make sure to set active type (adding this script from custom code :) + $model->activeType = 'backup'; // check if export is allowed for this user. (we need this sorry) if ($model->user->authorise('joomla_component.export', 'com_componentbuilder') && $model->user->authorise('core.export', 'com_componentbuilder')) { // get all component IDs to backup $pks = componentbuilderHelper::getComponentIDs(); - // make sure to set active type to backup - $model->activeType = 'backup'; // set auto loader ComponentbuilderHelper::autoLoader('smart'); // manual backup message @@ -171,7 +171,7 @@ class ComponentbuilderControllerApi extends JControllerForm } } // quite only if auto backup (adding this script from custom code :) - if ('backup' === 'backup') + if ('backup' === $model->activeType) { echo "# " . $backupNoticeStatus . "\n" .implode("\n", $backupNotice); // clear session @@ -182,7 +182,7 @@ class ComponentbuilderControllerApi extends JControllerForm return; } // quite only if auto backup (adding this script from custom code :) - if ('backup' === 'backup') + if ('backup' === $model->activeType) { echo "# Error\n" . JText::_('COM_COMPONENTBUILDER_ACCESS_DENIED'); // clear session