1
0
mirror of https://github.com/github/choosealicense.com synced 2024-06-09 04:37:48 +02:00

fix tooltips

This commit is contained in:
Ben Balter 2014-09-05 11:26:54 -04:00
parent 09b245ec27
commit 580082f408
2 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@
<script src="/assets/vendor/qtip2/jquery.qtip.min.js"></script>
<script src="/assets/vendor/zeroclipboard/ZeroClipboard.min.js"></script>
<script>
var window.annotations = {{ site.data.rules | jsonify }};
window.annotations = {{ site.data.rules | jsonify }};
</script>
<script src="/assets/js/app.js"></script>
{% endif %}

View File

@ -46,8 +46,8 @@ class Choosealicense
# Dynamically add annotations as title attribute to rule list items
for category, rules of window.annotations
for label, text of rules
$(".license-rules ul.license-#{category} li.#{label}").attr "title", text
for rule in rules
$(".license-rules ul.license-#{category} li.#{rule["tag"]}").attr "title", rule["description"]
# Init tooltips on all rule list items
for category, label of @categories