Moved minify to powers. Improved the mapper class.
This commit is contained in:
@ -1557,7 +1557,7 @@ class Get
|
||||
// build the site_views settings
|
||||
$component->site_views = array_map(
|
||||
function ($array) {
|
||||
// has become a lacacy issue, can't remove this
|
||||
// has become a legacy issue, can't remove this
|
||||
$array['view'] = $array['siteview'];
|
||||
$array['settings'] = $this->getCustomViewData(
|
||||
$array['view']
|
||||
@ -1596,7 +1596,7 @@ class Get
|
||||
// build the custom_admin_views settings
|
||||
$component->custom_admin_views = array_map(
|
||||
function ($array) {
|
||||
// has become a lacacy issue, can't remove this
|
||||
// has become a legacy issue, can't remove this
|
||||
$array['view'] = $array['customadminview'];
|
||||
$array['settings'] = $this->getCustomViewData(
|
||||
$array['view'], 'custom_admin_view'
|
||||
|
@ -25,6 +25,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Minify;
|
||||
|
||||
/**
|
||||
* Compiler class
|
||||
@ -16680,32 +16681,26 @@ class Interpretation extends Fields
|
||||
$list_fileScript = '';
|
||||
CFactory::_('Content')->set_($nameListCode, 'ADMIN_ADD_JAVASCRIPT_FILE', '');
|
||||
}
|
||||
// minfy the script
|
||||
// minify the script
|
||||
if (CFactory::_('Config')->get('minify', 0) && isset($list_fileScript)
|
||||
&& StringHelper::check($list_fileScript))
|
||||
{
|
||||
// minify the fielScript javscript
|
||||
$minifier = new JS;
|
||||
$minifier->add($list_fileScript);
|
||||
$list_fileScript = $minifier->minify();
|
||||
// minify the fileScript javascript
|
||||
$list_fileScript = Minify::js($list_fileScript);
|
||||
}
|
||||
// minfy the script
|
||||
// minify the script
|
||||
if (CFactory::_('Config')->get('minify', 0) && isset($fileScript)
|
||||
&& StringHelper::check($fileScript))
|
||||
{
|
||||
// minify the fielScript javscript
|
||||
$minifier = new JS;
|
||||
$minifier->add($fileScript);
|
||||
$fileScript = $minifier->minify();
|
||||
// minify the fileScript javascript
|
||||
$fileScript = Minify::js($fileScript);
|
||||
}
|
||||
// minfy the script
|
||||
// minify the script
|
||||
if (CFactory::_('Config')->get('minify', 0) && isset($footerScript)
|
||||
&& StringHelper::check($footerScript))
|
||||
{
|
||||
// minify the footerScript javscript
|
||||
$minifier = new JS;
|
||||
$minifier->add($footerScript);
|
||||
$footerScript = $minifier->minify();
|
||||
// minify the footerScript javascript
|
||||
$footerScript = Minify::js($footerScript);
|
||||
}
|
||||
// make sure there is script to add
|
||||
if (isset($list_fileScript)
|
||||
|
@ -23,6 +23,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Factory as CFactory;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Placefix;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Minify;
|
||||
|
||||
/**
|
||||
* Infusion class
|
||||
@ -837,12 +838,8 @@ class Infusion extends Interpretation
|
||||
if (CFactory::_('Config')->get('minify', 0)
|
||||
&& strpos((string) $footerScript, '<?php') === false)
|
||||
{
|
||||
// minfy the script
|
||||
$minifier = new JS;
|
||||
$minifier->add($footerScript);
|
||||
$footerScript = $minifier->minify();
|
||||
// clear some memory
|
||||
unset($minifier);
|
||||
// minify the script
|
||||
$footerScript = Minify::js($footerScript);
|
||||
}
|
||||
CFactory::_('Content')->set_($nameListCode, 'VIEWS_FOOTER_SCRIPT', PHP_EOL . '<script type="text/javascript">'
|
||||
. $footerScript . "</script>");
|
||||
|
Reference in New Issue
Block a user