diff --git a/plugins/system/helixultimate/assets/js/admin/helix-ultimate.js b/plugins/system/helixultimate/assets/js/admin/helix-ultimate.js index 00a38fb8..41c63252 100644 --- a/plugins/system/helixultimate/assets/js/admin/helix-ultimate.js +++ b/plugins/system/helixultimate/assets/js/admin/helix-ultimate.js @@ -565,17 +565,25 @@ jQuery(function ($) { if (data.status) { let $previewFrame = document.getElementById('hu-template-preview'); $previewFrame.contentWindow.location.reload(true); + + Joomla.HelixToaster.success('Changes have been successfully saved!', 'Success'); + $('.hu-loading-msg').hide(); + $('.hu-done-msg').hide(); + $('.action-reset-drafts').hide(); + showSaveLoader(false); + } else { + Joomla.HelixToaster.error(data.message, 'Failed'); + $('.hu-loading-msg').hide(); + $('.hu-done-msg').hide(); + $('.action-reset-drafts').hide(); + showSaveLoader(false); } // Update the setvalues. updateSetvalue(); + }, complete() { - Joomla.HelixToaster.success('Changes have been successfully saved!', 'Success'); - $('.hu-loading-msg').hide(); - $('.hu-done-msg').hide(); - $('.action-reset-drafts').hide(); - showSaveLoader(false); }, error: function (err) { console.error('error', err); diff --git a/plugins/system/helixultimate/helixultimate.php b/plugins/system/helixultimate/helixultimate.php index fe5db16a..a73edb27 100644 --- a/plugins/system/helixultimate/helixultimate.php +++ b/plugins/system/helixultimate/helixultimate.php @@ -71,7 +71,9 @@ class PlgSystemHelixultimate extends CMSPlugin */ public function onAfterInitialise() { - + if (JVERSION < 4) { + $this->registerBootstrap(); + } } /** diff --git a/plugins/system/helixultimate/overrides/com_finder/search/default.php b/plugins/system/helixultimate/overrides/com_finder/search/default.php index d1429b67..8b8e910b 100644 --- a/plugins/system/helixultimate/overrides/com_finder/search/default.php +++ b/plugins/system/helixultimate/overrides/com_finder/search/default.php @@ -12,16 +12,16 @@ use Joomla\CMS\Language\Text; -if(JVERSION < 4) +if (JVERSION < 4) { HTMLHelper::_('behavior.core'); HTMLHelper::addIncludePath(JPATH_COMPONENT . '/helpers/html'); - + HTMLHelper::_('stylesheet', 'com_finder/finder.css', array('version' => 'auto', 'relative' => true)); HTMLHelper::_('stylesheet', 'vendor/awesomplete/awesomplete.css', array('version' => 'auto', 'relative' => true)); - + Text::script('MOD_FINDER_SEARCH_VALUE', true); - + HTMLHelper::_('script', 'com_finder/finder.js', array('version' => 'auto', 'relative' => true)); } else diff --git a/plugins/system/helixultimate/overrides/com_finder/search/default_result.php b/plugins/system/helixultimate/overrides/com_finder/search/default_result.php index 4f644dbf..35defdb1 100644 --- a/plugins/system/helixultimate/overrides/com_finder/search/default_result.php +++ b/plugins/system/helixultimate/overrides/com_finder/search/default_result.php @@ -40,6 +40,14 @@ $route = $this->result->route; +$showImage = $this->params->get('show_image', 0); +$imageClass = $this->params->get('image_class', ''); +$extraAttr = []; + +if ($showImage && !empty($this->result->imageUrl) && $imageClass !== '') { + $extraAttr['class'] = $imageClass; +} + // Get the route with highlighting information. if (!empty($this->query->highlight) && empty($this->result->mime) @@ -51,6 +59,25 @@ ?>