[TikiWiki-commits] [Git][tikiwiki/tiki][30.x] [FIX] User Information: popover is missing the generated DiceBear user avatar
"Espoir Baraka \(@esbarakabigega\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a12d1111d486_38e8eb6e81040f7@gitlab-sidekiq-low-urgency-cpu-bound-v2-d7f87744c-jrcvf.mail> |
Espoir Baraka pushed to branch 30.x at Tiki Wiki CMS Groupware / Tiki
Commits:
b1137e41 by Espoir Baraka at 2026-05-24T12:14:45+02:00
[FIX] User Information: popover is missing the generated DiceBear user avatar
---
* [FIX] User Information: popover is missing the generated DiceBear user avatar
---
* [FIX] tiki_popover: Disable sanitization and enhance avatar rendering on popover shown event
See merge request tikiwiki/tiki!10219
(cherry picked from commit c5bdad1e152b61f8d55a268f102663d4a2edf6d1)
See merge request tikiwiki/tiki!10362
- - - - -
1 changed file:
- lib/jquery_tiki/tiki-jquery.js
Changes:
=====================================
lib/jquery_tiki/tiki-jquery.js
=====================================
@@ -402,6 +402,15 @@ $.fn.tiki_popover = function () {
myDefaultAllowList.input = ["name", "value", "type"];
myDefaultAllowList.button = ["type", "disabled", "name", "value", "onclick"];
myDefaultAllowList.time = ["datetime"]; // for timeago
+ // DiceBear placeholders in user-info ajaxtips
+ if (!myDefaultAllowList.div) {
+ myDefaultAllowList.div = [];
+ }
+ ['data-seed', 'data-style', 'data-size'].forEach(function (attr) {
+ if (myDefaultAllowList.div.indexOf(attr) === -1) {
+ myDefaultAllowList.div.push(attr);
+ }
+ });
myDefaultAllowList.a = [
"target",
"href",
@@ -694,8 +703,20 @@ $(function() { // JQuery's DOM is ready event - before onload
}
// Colorbox can be applied to Bootstrap popover elements
- $(document).on('shown.bs.popover', function () {
+ $(document).on('shown.bs.popover', function (e) {
$.applyColorbox();
+ var tid = e.target.getAttribute && e.target.getAttribute('aria-describedby');
+ var tipEl = tid && document.getElementById(tid);
+ if (tipEl && tipEl.querySelector('.dicebear-avatar')) {
+ window.setTimeout(function () {
+ import('avatar-generator').then(function (mod) {
+ if (mod.renderAvatars) {
+ mod.renderAvatars();
+ }
+ }).catch(function () {
+ });
+ }, 0);
+ }
});
if (jqueryTiki.zoom) {
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/b1137e41ad9c69c3dc94c79657d34684d8287ef6
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/b1137e41ad9c69c3dc94c79657d34684d8287ef6
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs