Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions administrator/templates/atum/component.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

$lang = Factory::getLanguage();

// Alerts
HTMLHelper::_('webcomponent', 'vendor/joomla-custom-elements/joomla-alert.min.js', ['relative' => true, 'version' => 'auto', 'detectBrowser' => false, 'detectDebug' => false]);

// Add JavaScript Frameworks
HTMLHelper::_('bootstrap.framework');
HTMLHelper::_('script', 'vendor/focus-visible/focus-visible.min.js', ['version' => 'auto', 'relative' => true]);
Expand Down
3 changes: 0 additions & 3 deletions administrator/templates/atum/error_full.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@
// Load custom CSS file
HTMLHelper::_('stylesheet', 'user.css', array('version' => 'auto', 'relative' => true));

// Alerts
HTMLHelper::_('webcomponent', 'vendor/joomla-custom-elements/joomla-alert.min.js', ['relative' => true, 'version' => 'auto', 'detectBrowser' => false, 'detectDebug' => false]);

// Load specific language related CSS
HTMLHelper::_('stylesheet', 'administrator/language/' . $lang->getTag() . '/' . $lang->getTag() . '.css', array('version' => 'auto'));

Expand Down
4 changes: 0 additions & 4 deletions administrator/templates/atum/error_login.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
HTMLHelper::_('stylesheet', 'font-awesome.min.css', ['version' => 'auto', 'relative' => true]);
HTMLHelper::_('stylesheet', 'template' . ($this->direction === 'rtl' ? '-rtl' : '') . '.min.css', ['version' => 'auto', 'relative' => true]);

// Alerts
HTMLHelper::_('webcomponent', 'vendor/joomla-custom-elements/joomla-alert.min.js', ['relative' => true, 'version' => 'auto']);


// Load custom CSS file
HTMLHelper::_('stylesheet', 'user.css', array('version' => 'auto', 'relative' => true));

Expand Down
7 changes: 3 additions & 4 deletions administrator/templates/atum/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,16 @@
HTMLHelper::_('bootstrap.framework');
HTMLHelper::_('script', 'vendor/focus-visible/focus-visible.min.js', ['version' => 'auto', 'relative' => true]);

// Load template CSS file
// Load the dependencies CSS files
HTMLHelper::_('stylesheet', 'bootstrap.css', ['version' => 'auto', 'relative' => true]);
HTMLHelper::_('stylesheet', 'font-awesome.css', ['version' => 'auto', 'relative' => true]);

// Load the template CSS file
HTMLHelper::_('stylesheet', 'template' . ($this->direction === 'rtl' ? '-rtl' : '') . '.css', ['version' => 'auto', 'relative' => true]);

// Load custom CSS file
HTMLHelper::_('stylesheet', 'user.css', array('version' => 'auto', 'relative' => true));

// Alerts
HTMLHelper::_('webcomponent', 'vendor/joomla-custom-elements/joomla-alert.min.js', ['relative' => true, 'version' => 'auto', 'detectBrowser' => false, 'detectDebug' => false]);

// Load specific language related CSS
HTMLHelper::_('stylesheet', 'administrator/language/' . $lang->getTag() . '/' . $lang->getTag() . '.css', array('version' => 'auto'));

Expand Down
4 changes: 0 additions & 4 deletions administrator/templates/atum/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@
HTMLHelper::_('stylesheet', 'font-awesome.css', ['version' => 'auto', 'relative' => true]);
HTMLHelper::_('stylesheet', 'template' . ($this->direction === 'rtl' ? '-rtl' : '') . '.css', ['version' => 'auto', 'relative' => true]);

// Alerts
HTMLHelper::_('webcomponent', 'vendor/joomla-custom-elements/joomla-alert.min.js', ['relative' => true, 'version' => 'auto']);


// Load custom CSS file
HTMLHelper::_('stylesheet', 'user.css', array('version' => 'auto', 'relative' => true));

Expand Down
3 changes: 3 additions & 0 deletions layouts/joomla/system/message.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
defined('JPATH_BASE') or die;

use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

$msgList = $displayData['msgList'];
Expand All @@ -26,6 +27,8 @@
'message' => 'success'
];

// Alerts progressive enhancement
HTMLHelper::_('webcomponent', 'vendor/joomla-custom-elements/joomla-alert.min.js', ['relative' => true, 'version' => 'auto', 'detectBrowser' => false, 'detectDebug' => false]);
?>
<div id="system-message-container">
<div id="system-message">
Expand Down
24 changes: 13 additions & 11 deletions libraries/src/Document/HtmlDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -749,8 +749,9 @@ protected function _parseTemplate()

if (preg_match_all('#<jdoc:include\ type="([^"]+)"(.*)\/>#iU', $this->_template, $matches))
{
$template_tags_first = array();
$template_tags_last = array();
$messages = [];
$template_tags_first = [];
$template_tags_last = [];

// Step through the jdocs in reverse order.
for ($i = count($matches[0]) - 1; $i >= 0; $i--)
Expand All @@ -760,20 +761,21 @@ protected function _parseTemplate()
$name = $attribs['name'] ?? null;

// Separate buffers to be executed first and last
if ($type == 'module' || $type == 'modules')
if ($type === 'module' || $type === 'modules')
{
$template_tags_first[$matches[0][$i]] = array('type' => $type, 'name' => $name, 'attribs' => $attribs);
$template_tags_first[$matches[0][$i]] = ['type' => $type, 'name' => $name, 'attribs' => $attribs];
}
elseif ($type === 'message')
{
$messages = [$matches[0][$i] => ['type' => $type, 'name' => $name, 'attribs' => $attribs]];
}
else
{
$template_tags_last[$matches[0][$i]] = array('type' => $type, 'name' => $name, 'attribs' => $attribs);
$template_tags_last[$matches[0][$i]] = ['type' => $type, 'name' => $name, 'attribs' => $attribs];
}
}

// Reverse the last array so the jdocs are in forward order.
$template_tags_last = array_reverse($template_tags_last);

$this->_template_tags = $template_tags_first + $template_tags_last;
$this->_template_tags = $template_tags_first + $messages + array_reverse($template_tags_last);
}

return $this;
Expand All @@ -788,8 +790,8 @@ protected function _parseTemplate()
*/
protected function _renderTemplate()
{
$replace = array();
$with = array();
$replace = [];
$with = [];

foreach ($this->_template_tags as $jdoc => $args)
{
Expand Down
3 changes: 0 additions & 3 deletions templates/cassiopeia/error.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@
// Load custom CSS file
HTMLHelper::_('stylesheet', 'user.css', array('version' => 'auto', 'relative' => true));

// Alerts progressive enhancement
HTMLHelper::_('webcomponent', 'vendor/joomla-custom-elements/joomla-alert.min.js', ['relative' => true, 'version' => 'auto', 'detectBrowser' => false, 'detectDebug' => false]);

// Load specific language related CSS
HTMLHelper::_('stylesheet', 'language/' . $lang->getTag() . '/' . $lang->getTag() . '.css', array('version' => 'auto'));

Expand Down
3 changes: 0 additions & 3 deletions templates/cassiopeia/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@
// Load custom CSS file
HTMLHelper::_('stylesheet', 'user.css', array('version' => 'auto', 'relative' => true));

// Alerts progressive enhancement
HTMLHelper::_('webcomponent', 'vendor/joomla-custom-elements/joomla-alert.min.js', ['relative' => true, 'version' => 'auto', 'detectBrowser' => false, 'detectDebug' => false]);

// Load specific language related CSS
HTMLHelper::_('stylesheet', 'language/' . $lang->getTag() . '/' . $lang->getTag() . '.css', array('version' => 'auto'));

Expand Down
6 changes: 0 additions & 6 deletions templates/cassiopeia/offline.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,10 @@
// Add JavaScript Frameworks
HTMLHelper::_('behavior.core');

// Add template js
HTMLHelper::_('script', 'template.js', ['version' => 'auto', 'relative' => true]);

// Add Stylesheets
HTMLHelper::_('stylesheet', 'template.css', ['version' => 'auto', 'relative' => true]);
HTMLHelper::_('stylesheet', 'offline.css', ['version' => 'auto', 'relative' => true]);

// Alerts progressive enhancement
HTMLHelper::_('webcomponent', 'vendor/joomla-custom-elements/joomla-alert.min.js', ['relative' => true, 'version' => 'auto', 'detectBrowser' => false, 'detectDebug' => false]);

// Template color
if ($this->params->get('templateColor'))
{
Expand Down