From 1f42f897d8a10bc6298e761cec3c6839aadf4692 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Sun, 23 Jan 2022 16:10:42 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B04667=20-=20Remove=20call=20to=20tooltip?= =?UTF-8?q?=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../portal/templates/bricks/manage/layout-table.html.twig | 2 +- js/property_field.js | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/datamodels/2.x/itop-portal-base/portal/templates/bricks/manage/layout-table.html.twig b/datamodels/2.x/itop-portal-base/portal/templates/bricks/manage/layout-table.html.twig index 2b3c58fc6..9d018912f 100644 --- a/datamodels/2.x/itop-portal-base/portal/templates/bricks/manage/layout-table.html.twig +++ b/datamodels/2.x/itop-portal-base/portal/templates/bricks/manage/layout-table.html.twig @@ -33,7 +33,7 @@ id="btn_export_excel_for_{{ aAreaData.sId }}" data-toggle="modal" data-target="#modal-for-all"> + data-tooltip-content="{{ 'ExcelExporter:ExportMenu'|dict_s }}"> {% endif %} diff --git a/js/property_field.js b/js/property_field.js index 9f625f691..6167d12b6 100644 --- a/js/property_field.js +++ b/js/property_field.js @@ -555,9 +555,11 @@ function ValidateWithPattern(sFieldId, bMandatory, sPattern, sFormId, aForbidden else { $('#v_'+sFieldId).parent('.ibo-prop--apply').removeClass('ui-state-error'); - $('#'+sFieldId).removeAttr('data-tooltip-instantiated'); - $('#'+sFieldId).removeAttr('data-tooltip-content'); - $('#'+sFieldId)[0]._tippy.destroy(); + if ($('#'+sFieldId)[0]._tippy ) { + $('#'+sFieldId)[0]._tippy.destroy(); + $('#'+sFieldId).removeAttr('data-tooltip-instantiated'); + $('#'+sFieldId).removeAttr('data-tooltip-content'); + } // Remove the element from the array iFieldIdPos = jQuery.inArray(sFieldId, oFormValidation[sFormId]); if (iFieldIdPos > -1)