Added the [Run Expansion] button option for faster compile and install option of selected components.

This commit is contained in:
2018-09-20 21:17:07 +02:00
parent b208f4f616
commit e71ba204ca
26 changed files with 530 additions and 47 deletions

View File

@ -82,4 +82,26 @@ if ($this->saveOrder)
<?php endif; ?>
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>
</form>
<script type="text/javascript">
// custom_codes footer script
// 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 expand button is clicked
jQuery('#toolbar').on('click',"button.button-expand-2", function(e){
jQuery('#loading').show();
});
</script>

View File

@ -132,6 +132,11 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy
JToolBarHelper::custom('custom_codes.exportData', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_DATA', true);
}
}
if ($this->user->authorise('custom_code.run_expansion', 'com_componentbuilder'))
{
// add Run Expansion button.
JToolBarHelper::custom('custom_codes.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
}
if ($this->canDo->get('core.import') && $this->canDo->get('custom_code.import'))
{