1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-22 04:40:09 +01:00

use 'ruletype' in app.coffee for clarity

This commit is contained in:
Waldir Pimenta 2015-09-09 00:24:05 +01:00
parent ba91c766d6
commit a9f9398705

View File

@ -29,8 +29,8 @@ class Choosealicense
my: "top center"
at: "bottom center"
# Annotation families as defined in `_config.yml`
families:
# Annotation rule types as defined in `_config.yml`
ruletypes:
required: "Required"
permitted: "Permitted"
forbidden: "Forbidden"
@ -45,20 +45,20 @@ class Choosealicense
initTooltips: ->
# Dynamically add annotations as title attribute to rule list items
for family, rules of window.annotations
for ruletype, rules of window.annotations
for rule in rules
$(".license-rules ul.license-#{family} li.#{rule["tag"]}").attr "title", rule["description"]
$(".license-rules ul.license-#{ruletype} li.#{rule["tag"]}").attr "title", rule["description"]
# Init tooltips on all rule list items
for family, label of @families
$(".license-#{family} li").qtip
for ruletype, label of @ruletypes
$(".license-#{ruletype} li").qtip
content:
text: false
title:
text: label
position: @qtip_position
style:
classes: "qtip-shadow qtip-#{family}"
classes: "qtip-shadow qtip-#{ruletype}"
false