From d3e450c54e74a090f23473dd3ebe90dcbcb418bd Mon Sep 17 00:00:00 2001 From: Stephen Abello Date: Fri, 1 Aug 2025 10:01:19 +0200 Subject: [PATCH] =?UTF-8?q?=20N=C2=B03749=20-=20Remove=20old=20JS=20toolti?= =?UTF-8?q?p=20libs=20(qTip,=20jQuery=20tooltip,=20Bootstrap=20tooltip)=20?= =?UTF-8?q?calls?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../portal/public/js/bootstrap-portal-modal.js | 1 + js/property_field.js | 13 +++---------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/datamodels/2.x/itop-portal-base/portal/public/js/bootstrap-portal-modal.js b/datamodels/2.x/itop-portal-base/portal/public/js/bootstrap-portal-modal.js index ca4ee9558..90d8ec086 100644 --- a/datamodels/2.x/itop-portal-base/portal/public/js/bootstrap-portal-modal.js +++ b/datamodels/2.x/itop-portal-base/portal/public/js/bootstrap-portal-modal.js @@ -55,6 +55,7 @@ $(document).ready(function() // Hide tooltips when a modal is opening, otherwise it might be overlapping it oBodyElem.on('show.bs.modal', '.modal', function () { + // We'll probably never have this kind of tooltip anymore, but just in case $(this).find('.tooltip.in').tooltip('hide'); // Set the z-index of the modal and its backdrop in case we have several modals opened diff --git a/js/property_field.js b/js/property_field.js index 59ea62c68..88a204a86 100644 --- a/js/property_field.js +++ b/js/property_field.js @@ -617,21 +617,14 @@ function ValidateInteger(sFieldId, bMandatory, sFormId, iMin, iMax, sExplainForm } if (sMessage) { - $('#'+sFieldId).attr('title', sMessage).tooltip(); - if ($('#'+sFieldId).is(":focus")) - { - $('#'+sFieldId).tooltip('open'); - } + $('#'+sFieldId).attr('data-tooltip-content', sMessage); + CombodoTooltip.InitTooltipFromMarkup($('#'+sFieldId), true); + $('#'+sFieldId)[0]._tippy.show(); } } else { $('#v_'+sFieldId).parent('.ibo-prop--apply').removeClass('ui-state-error'); - if ($('#'+sFieldId).data('uiTooltip')) - { - $('#'+sFieldId).tooltip('close'); - } - $('#'+sFieldId).removeAttr('title'); // Remove the element from the array iFieldIdPos = jQuery.inArray(sFieldId, oFormValidation[sFormId]); if (iFieldIdPos > -1)