mirror of
https://github.com/github/choosealicense.com
synced 2024-12-22 04:40:09 +01:00
Fix tooltips on license pages
This commit is contained in:
parent
c9739749fe
commit
7d687a2298
@ -40,8 +40,8 @@ class Choosealicense
|
|||||||
# Dynamically add annotations as title attribute to rule list items
|
# Dynamically add annotations as title attribute to rule list items
|
||||||
for ruletype, rules of window.annotations
|
for ruletype, rules of window.annotations
|
||||||
for rule in rules
|
for rule in rules
|
||||||
# Only select license elements in table, not legend
|
# Exclude license elements in the legend
|
||||||
licenseLiElement = $("td.license-#{ruletype} .#{rule["tag"]}")
|
licenseLiElement = $(".license-#{ruletype} .#{rule["tag"]}").not("dd.license-#{ruletype} .#{rule["tag"]}")
|
||||||
tooltipAttr = @tooltipAttributesMapperByRuleType[ruletype]
|
tooltipAttr = @tooltipAttributesMapperByRuleType[ruletype]
|
||||||
licenseLiElement.attr "aria-label", "#{tooltipAttr.heading}: #{rule.description}"
|
licenseLiElement.attr "aria-label", "#{tooltipAttr.heading}: #{rule.description}"
|
||||||
licenseLiElement.addClass("hint--bottom
|
licenseLiElement.addClass("hint--bottom
|
||||||
|
Loading…
x
Reference in New Issue
Block a user