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.

This commit is contained in:
Llewellyn van der Merwe 2018-04-18 14:03:07 +02:00
parent 0dc22b100b
commit 98448b24b7
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
7 changed files with 51 additions and 10 deletions

View File

@ -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) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com) + *Name*: [Component Builder](http://joomlacomponentbuilder.com)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 17th April, 2018 + *Last Build*: 18th April, 2018
+ *Version*: 2.7.5 + *Version*: 2.7.5
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *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** + *Field count*: **1012**
+ *File count*: **1199** + *File count*: **1199**
+ *Folder count*: **193** + *Folder count*: **193**

View File

@ -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) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](http://joomlacomponentbuilder.com) + *Name*: [Component Builder](http://joomlacomponentbuilder.com)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 17th April, 2018 + *Last Build*: 18th April, 2018
+ *Version*: 2.7.5 + *Version*: 2.7.5
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *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** + *Field count*: **1012**
+ *File count*: **1199** + *File count*: **1199**
+ *Folder count*: **193** + *Folder count*: **193**

View File

@ -99,4 +99,4 @@ if ($this->saveOrder)
<?php endif; ?> <?php endif; ?>
<input type="hidden" name="task" value="" /> <input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?> <?php echo JHtml::_('form.token'); ?>
</form> </form>###VIEWS_FOOTER_SCRIPT###

View File

@ -2263,16 +2263,16 @@ class Get
{ {
$this->customScriptBuilder['views_footer'] = array(); $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)) 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 = $this->setDynamicValues(base64_decode($this->_fieldData[$id]->javascript_views_footer));
$this->_fieldData[$id]->javascript_views_footer_decoded = true; $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 || if (strpos($this->_fieldData[$id]->javascript_views_footer, "token") !== false ||
strpos($this->_fieldData[$id]->javascript_views_footer, "task=ajax") !== false) strpos($this->_fieldData[$id]->javascript_views_footer, "task=ajax") !== false)
{ {

View File

@ -501,6 +501,15 @@ class Infusion extends Interpretation
// ###VIEWCSS### <<<DYNAMIC>>> // ###VIEWCSS### <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_list]['###VIEWSCSS###'] = ''; $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 . '<script type="text/javascript">' . $footerScript . PHP_EOL . "</script>";
}
else
{
$this->fileContentDynamic[$viewName_list]['###VIEWS_FOOTER_SCRIPT###'] = '';
}
} }
// set u fields used in batch // set u fields used in batch

View File

@ -96,4 +96,36 @@ if ($this->saveOrder)
<?php endif; ?> <?php endif; ?>
<input type="hidden" name="task" value="" /> <input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?> <?php echo JHtml::_('form.token'); ?>
</form> </form>
<script type="text/javascript">
// waiting spinner
var outerDiv = jQuery('body');
jQuery('<div id="loading"></div>')
.css("background", "rgba(255, 255, 255, .8) url('components/com_componentbuilder/assets/images/import.gif') 50% 15% no-repeat")
.css("top", outerDiv.position().top - jQuery(window).scrollTop())
.css("left", outerDiv.position().left - jQuery(window).scrollLeft())
.css("width", outerDiv.width())
.css("height", outerDiv.height())
.css("position", "fixed")
.css("opacity", "0.80")
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
.css("filter", "alpha(opacity = 80)")
.css("display", "none")
.appendTo(outerDiv);
// when the clone button is clicked
jQuery('#toolbar').on('click',"button.button-save-copy", function(e){
jQuery('#loading').show();
});
// when the backup button is clicked
jQuery('#toolbar').on('click',"button.button-archive", function(e){
jQuery('#loading').show();
});
// when the export button is clicked
jQuery('#toolbar').on('click',"button.button-download", function(e){
jQuery('#loading').show();
});
</script>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade"> <extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name> <name>COM_COMPONENTBUILDER</name>
<creationDate>17th April, 2018</creationDate> <creationDate>18th April, 2018</creationDate>
<author>Llewellyn van der Merwe</author> <author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail> <authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://joomlacomponentbuilder.com</authorUrl> <authorUrl>http://joomlacomponentbuilder.com</authorUrl>