From c78cd439422b471d8ecb01bed5eed69942fc9c94 Mon Sep 17 00:00:00 2001
From: Brano5 <97288158+Brano5@users.noreply.github.com>
Date: Tue, 19 Mar 2024 06:46:42 +0100
Subject: [PATCH] Remove addToolTips javascript call from TemplateBase (#295)
---
.../Templates/TemplateBase.razor.cs | 19 -------------------
.../Templates/TemplateBase.razor.js | 4 ----
2 files changed, 23 deletions(-)
delete mode 100644 src/AXSharp.blazor/src/AXSharp.Presentation.Blazor.Controls/Templates/TemplateBase.razor.js
diff --git a/src/AXSharp.blazor/src/AXSharp.Presentation.Blazor.Controls/Templates/TemplateBase.razor.cs b/src/AXSharp.blazor/src/AXSharp.Presentation.Blazor.Controls/Templates/TemplateBase.razor.cs
index c44e4708..6d49a2d9 100644
--- a/src/AXSharp.blazor/src/AXSharp.Presentation.Blazor.Controls/Templates/TemplateBase.razor.cs
+++ b/src/AXSharp.blazor/src/AXSharp.Presentation.Blazor.Controls/Templates/TemplateBase.razor.cs
@@ -23,25 +23,6 @@ public IJSRuntime JSRuntime
}
protected string ToolTipText => Onliner?.HumanReadable;
-
-
- ///
- protected override async Task OnAfterRenderAsync(bool firstRender)
- {
- if (firstRender)
- {
- try
- {
- module = await JSRuntime.InvokeAsync("import",
- "./_content/AXSharp.Presentation.Blazor.Controls/Templates/TemplateBase.razor.js");
- await module.InvokeVoidAsync("addToolTips");
- }
- catch (Exception e)
- {
- // ignored
- }
- }
- }
[Parameter]
public OnlinerBase Onliner { get; set; }
diff --git a/src/AXSharp.blazor/src/AXSharp.Presentation.Blazor.Controls/Templates/TemplateBase.razor.js b/src/AXSharp.blazor/src/AXSharp.Presentation.Blazor.Controls/Templates/TemplateBase.razor.js
deleted file mode 100644
index acb8a493..00000000
--- a/src/AXSharp.blazor/src/AXSharp.Presentation.Blazor.Controls/Templates/TemplateBase.razor.js
+++ /dev/null
@@ -1,4 +0,0 @@
-export function addToolTips() {
- const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
- const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
-}
\ No newline at end of file