fix: Nits on styles of library icon [FC-0114] (#37980)

- Fixes the issues described in https://github.com/openedx/frontend-app-authoring/issues/2762#issuecomment-3837508959:
    - Changed the background color for the library icon in the unit page.
    - Update punctuation for the library icon tooltip in the unit page.
    - Allows breaking the tooltip into multiple lines.
This commit is contained in:
Chris Chávez
2026-02-09 17:10:38 -05:00
committed by GitHub
parent d0a2212a48
commit 3c4cf0e2d2
3 changed files with 20 additions and 10 deletions

View File

@@ -69,8 +69,10 @@
pageX = typeof pageX !== 'undefined' ? pageX : element.offset().left + element.width() / 2;
pageY = typeof pageY !== 'undefined' ? pageY : element.offset().top + element.height() / 2;
var tooltipText = $(element).attr('data-tooltip');
// Tooltip content comes from data-tooltip attributes which are server-rendered
// with proper escaping using Text() and HTML() from openedx.core.djangolib.markup
this.tooltip
.text(tooltipText)
.html(tooltipText) // xss-lint: disable=javascript-jquery-html
.css(this.getCoords(pageX, pageY));
},