Skip to content

Commit

Permalink
Remove Bootstrap tooltips from various elements
Browse files Browse the repository at this point in the history
Removed `data-bs-toggle="tooltip"` and `data-placement="top"` attributes from `<textarea>` in `EditPost.cshtml`, `<img>` in `SignIn.cshtml`, and `<img>` in `_CommentForm.cshtml`. Also removed tooltip initialization code from `base.js`, including `tooltipTriggerList` and `tooltipList` variables. This change eliminates the use of Bootstrap tooltips in these parts of the application.
  • Loading branch information
EdiWang committed Jan 3, 2025
1 parent 237e8dd commit e5cc086
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 10 deletions.
2 changes: 0 additions & 2 deletions src/Moonglade.Web/Pages/Admin/EditPost.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,6 @@
<textarea asp-for="ViewModel.Abstract"
placeholder="@SharedLocalizer["Abstract"]"
class="form-control form-control-sm"
data-bs-toggle="tooltip"
data-placement="top"
maxlength="1024"
title="@SharedLocalizer["The first {0} character(s) will be used as abstract if you leave this field blank.", BlogConfig.ContentSettings.PostAbstractWords]"
style="height: 90px"></textarea>
Expand Down
2 changes: 1 addition & 1 deletion src/Moonglade.Web/Pages/SignIn.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
placeholder="@SharedLocalizer["Captcha code"]"
autocomplete="off"
class="form-control" required />
<img id="img-captcha" onclick="getNewCaptcha()" data-bs-toggle="tooltip" data-placement="top" title="@SharedLocalizer["Can't read? Click to change another image."]" />
<img id="img-captcha" onclick="getNewCaptcha()" title="@SharedLocalizer["Can't read? Click to change another image."]" />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/Moonglade.Web/Pages/_CommentForm.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<div class="row">
<div class="col-9">
<div class="input-group" id="captcha-container" style="display: none;">
<img id="img-captcha" onclick="viewpost.resetCaptchaImage()" data-bs-toggle="tooltip" data-placement="top" title="@SharedLocalizer["Can't read? Click to change another image."]" alt="@SharedLocalizer["Captcha code"]" />
<img id="img-captcha" onclick="viewpost.resetCaptchaImage()" title="@SharedLocalizer["Can't read? Click to change another image."]" alt="@SharedLocalizer["Captcha code"]" />
<input type="text"
aria-label="@SharedLocalizer["Captcha code"]"
id="input-comment-captcha"
Expand Down
6 changes: 0 additions & 6 deletions src/Moonglade.Web/wwwroot/js/app/base.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import * as blogToast from '/js/app/blogtoast.module.js'
window.blogToast = blogToast;

window.emptyGuid = '00000000-0000-0000-0000-000000000000';

var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl);
});

0 comments on commit e5cc086

Please sign in to comment.