From 98448b24b7b4c9060a12794397dd53943b164108 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Wed, 18 Apr 2018 14:03:07 +0200 Subject: [PATCH] Fixed the Add JavaScript (views-footer) option, since it did not add the javascript, but now does. Also added some spinner to the Joomla Components view. --- README.md | 4 +-- admin/README.txt | 4 +-- admin/compiler/joomla_3/default.php | 2 +- admin/helpers/compiler/a_Get.php | 6 ++-- admin/helpers/compiler/f_Infusion.php | 9 +++++ .../views/joomla_components/tmpl/default.php | 34 ++++++++++++++++++- componentbuilder.xml | 2 +- 7 files changed, 51 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 7be410712..4434c3a56 100644 --- a/README.md +++ b/README.md @@ -126,11 +126,11 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](http://joomlacomponentbuilder.com) + *First Build*: 30th April, 2015 -+ *Last Build*: 17th April, 2018 ++ *Last Build*: 18th April, 2018 + *Version*: 2.7.5 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **182878** ++ *Line count*: **182910** + *Field count*: **1012** + *File count*: **1199** + *Folder count*: **193** diff --git a/admin/README.txt b/admin/README.txt index 7be410712..4434c3a56 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -126,11 +126,11 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](http://joomlacomponentbuilder.com) + *First Build*: 30th April, 2015 -+ *Last Build*: 17th April, 2018 ++ *Last Build*: 18th April, 2018 + *Version*: 2.7.5 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **182878** ++ *Line count*: **182910** + *Field count*: **1012** + *File count*: **1199** + *Folder count*: **193** diff --git a/admin/compiler/joomla_3/default.php b/admin/compiler/joomla_3/default.php index 5cd0cd318..c4370612f 100644 --- a/admin/compiler/joomla_3/default.php +++ b/admin/compiler/joomla_3/default.php @@ -99,4 +99,4 @@ if ($this->saveOrder) - \ No newline at end of file +###VIEWS_FOOTER_SCRIPT### \ No newline at end of file diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index d240acccf..15fe7638a 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -2263,16 +2263,16 @@ class Get { $this->customScriptBuilder['views_footer'] = array(); } - if (!isset($this->customScriptBuilder['views_footer'][$name_list])) + if (!isset($this->customScriptBuilder['views_footer'][$name_single])) { - $this->customScriptBuilder['views_footer'][$name_list] = ''; + $this->customScriptBuilder['views_footer'][$name_single] = ''; } if (!isset($this->_fieldData[$id]->javascript_views_footer_decoded)) { $this->_fieldData[$id]->javascript_views_footer = $this->setDynamicValues(base64_decode($this->_fieldData[$id]->javascript_views_footer)); $this->_fieldData[$id]->javascript_views_footer_decoded = true; } - $this->customScriptBuilder['views_footer'][$name_list] .= PHP_EOL . $this->_fieldData[$id]->javascript_views_footer; + $this->customScriptBuilder['views_footer'][$name_single] .= PHP_EOL . $this->_fieldData[$id]->javascript_views_footer; if (strpos($this->_fieldData[$id]->javascript_views_footer, "token") !== false || strpos($this->_fieldData[$id]->javascript_views_footer, "task=ajax") !== false) { diff --git a/admin/helpers/compiler/f_Infusion.php b/admin/helpers/compiler/f_Infusion.php index 47b9ae014..b95d8c1ec 100644 --- a/admin/helpers/compiler/f_Infusion.php +++ b/admin/helpers/compiler/f_Infusion.php @@ -501,6 +501,15 @@ class Infusion extends Interpretation // ###VIEWCSS### <<>> $this->fileContentDynamic[$viewName_list]['###VIEWSCSS###'] = ''; } + // ###VIEWS_FOOTER_SCRIPT### + if ($footerScript = $this->getCustomScriptBuilder('views_footer', $viewName_single, PHP_EOL)) + { + $this->fileContentDynamic[$viewName_list]['###VIEWS_FOOTER_SCRIPT###'] = PHP_EOL . '"; + } + else + { + $this->fileContentDynamic[$viewName_list]['###VIEWS_FOOTER_SCRIPT###'] = ''; + } } // set u fields used in batch diff --git a/admin/views/joomla_components/tmpl/default.php b/admin/views/joomla_components/tmpl/default.php index fcb342518..9e03d5ff1 100644 --- a/admin/views/joomla_components/tmpl/default.php +++ b/admin/views/joomla_components/tmpl/default.php @@ -96,4 +96,36 @@ if ($this->saveOrder) - \ No newline at end of file + + \ No newline at end of file diff --git a/componentbuilder.xml b/componentbuilder.xml index ed5453cf9..4937c249b 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 17th April, 2018 + 18th April, 2018 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://joomlacomponentbuilder.com