From ece7f8a899d896acaf82837201cc95ad15b72bbb Mon Sep 17 00:00:00 2001 From: amit sharma Date: Mon, 7 Sep 2026 20:07:42 +0530 Subject: [PATCH 01/78] fixed: render formatted tooltip text in debug mode Co-authored-by: Name --- classes/controller/AdminController.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php index 2b6636eef..43d66aa9b 100644 --- a/classes/controller/AdminController.php +++ b/classes/controller/AdminController.php @@ -2894,6 +2894,18 @@ class AdminControllerCore extends Controller public function setDeprecatedMedia() { } + + public function addJqueryUI($component, $theme = 'base', $check_dependencies = true) + { + parent::addJqueryUI($component, $theme, $check_dependencies); + + if ($component === 'ui.tooltip' || (is_array($component) && in_array('ui.tooltip', $component))) { + $bootstrap_js = Media::getJSPath(__PS_BASE_URI__.$this->admin_webpath.'/themes/'.$this->bo_theme.'/js/vendor/bootstrap.min.js'); + if ($bootstrap_js) { + $this->js_files[] = $bootstrap_js.'?reclaim_tooltip=1'; + } + } + } public function setMedia() { From 0f6436617c0c47d1f24494b259f89398f2cc39fc Mon Sep 17 00:00:00 2001 From: amit sharma Date: Wed, 9 Sep 2026 16:22:28 +0530 Subject: [PATCH 02/78] Fixed: Resolved tooltip rendering issue caused by conflicts between jQuery and Bootstrap tooltip libraries. Co-authored-by: Name --- admin/themes/default/js/admin-theme.js | 19 +++++++++++++++++-- .../default/js/bootstrap-tooltip-alias.js | 8 ++++++++ admin/themes/default/template/header.tpl | 4 ++-- classes/controller/AdminController.php | 13 +------------ 4 files changed, 28 insertions(+), 16 deletions(-) create mode 100644 admin/themes/default/js/bootstrap-tooltip-alias.js diff --git a/admin/themes/default/js/admin-theme.js b/admin/themes/default/js/admin-theme.js index 04acc90b5..8d2ad1b1f 100644 --- a/admin/themes/default/js/admin-theme.js +++ b/admin/themes/default/js/admin-theme.js @@ -377,7 +377,20 @@ $(document).ready(function() { //bootstrap components init $('.dropdown-toggle').dropdown(); - $('.label-tooltip, .help-tooltip').tooltip(); + $('.label-tooltip, .help-tooltip').not('.debug-mode-tooltip').tooltip(); + + $('.debug-mode-tooltip').each(function () { + var $tooltip = $(this); + + if ($.isFunction($.fn.bootstrapTooltip)) { + if (!$tooltip.data('bs.tooltip')) { + $tooltip.bootstrapTooltip({ + html: true, + placement: 'bottom' + }); + } + } + }); $('#error-modal').modal('show'); //init footer @@ -478,7 +491,9 @@ $(document).ready(function() { $('.no-htl-access-option').on('click', function() { $(this).prop('selected', false); }); + initTooltip(); + }); //end dom ready function initTooltip($target, contentFn, items) { @@ -516,4 +531,4 @@ function initTooltip($target, contentFn, items) { } }); }); -} \ No newline at end of file +} diff --git a/admin/themes/default/js/bootstrap-tooltip-alias.js b/admin/themes/default/js/bootstrap-tooltip-alias.js new file mode 100644 index 000000000..00ef3623c --- /dev/null +++ b/admin/themes/default/js/bootstrap-tooltip-alias.js @@ -0,0 +1,8 @@ +/* Preserve Bootstrap 3's tooltip before jQuery UI overwrites $.fn.tooltip. */ +(function ($) { + 'use strict'; + + if ($ && $.fn && $.isFunction($.fn.tooltip) && $.fn.tooltip.Constructor) { + $.fn.bootstrapTooltip = $.fn.tooltip; + } +}(window.jQuery)); diff --git a/admin/themes/default/template/header.tpl b/admin/themes/default/template/header.tpl index bb6f6f97f..1316ec153 100644 --- a/admin/themes/default/template/header.tpl +++ b/admin/themes/default/template/header.tpl @@ -301,7 +301,7 @@ {if isset($debug_mode) && $debug_mode == true}