mirror of
https://github.com/github/choosealicense.com
synced 2024-12-25 06:10:10 +01:00
Merge pull request #1259 from mschoettle/fix-tooltips
Fix tooltips not showing up on license page and add rule label to tooltips
This commit is contained in:
commit
6691649c7c
@ -40,10 +40,10 @@ class Choosealicense
|
||||
# Dynamically add annotations as title attribute to rule list items
|
||||
for ruletype, rules of window.annotations
|
||||
for rule in rules
|
||||
# Only select license elements in table, not legend
|
||||
licenseLiElement = $("td.license-#{ruletype} .#{rule["tag"]}")
|
||||
# Exclude license elements in the legend
|
||||
licenseLiElement = $(".license-#{ruletype} .#{rule["tag"]}").not("dd.license-#{ruletype} .#{rule["tag"]}")
|
||||
tooltipAttr = @tooltipAttributesMapperByRuleType[ruletype]
|
||||
licenseLiElement.attr "aria-label", "#{tooltipAttr.heading}: #{rule.description}"
|
||||
licenseLiElement.attr "aria-label", "#{rule.label} #{tooltipAttr.heading.toLowerCase()}: #{rule.description}"
|
||||
licenseLiElement.addClass("hint--bottom
|
||||
hint--large
|
||||
hint--no-animate
|
||||
|
Loading…
x
Reference in New Issue
Block a user