mirror of
https://github.com/github/choosealicense.com
synced 2024-12-22 21:00:10 +01:00
use 'ruletype' in app.coffee for clarity
This commit is contained in:
parent
ba91c766d6
commit
a9f9398705
@ -29,8 +29,8 @@ class Choosealicense
|
|||||||
my: "top center"
|
my: "top center"
|
||||||
at: "bottom center"
|
at: "bottom center"
|
||||||
|
|
||||||
# Annotation families as defined in `_config.yml`
|
# Annotation rule types as defined in `_config.yml`
|
||||||
families:
|
ruletypes:
|
||||||
required: "Required"
|
required: "Required"
|
||||||
permitted: "Permitted"
|
permitted: "Permitted"
|
||||||
forbidden: "Forbidden"
|
forbidden: "Forbidden"
|
||||||
@ -45,20 +45,20 @@ class Choosealicense
|
|||||||
initTooltips: ->
|
initTooltips: ->
|
||||||
|
|
||||||
# Dynamically add annotations as title attribute to rule list items
|
# 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
|
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
|
# Init tooltips on all rule list items
|
||||||
for family, label of @families
|
for ruletype, label of @ruletypes
|
||||||
$(".license-#{family} li").qtip
|
$(".license-#{ruletype} li").qtip
|
||||||
content:
|
content:
|
||||||
text: false
|
text: false
|
||||||
title:
|
title:
|
||||||
text: label
|
text: label
|
||||||
position: @qtip_position
|
position: @qtip_position
|
||||||
style:
|
style:
|
||||||
classes: "qtip-shadow qtip-#{family}"
|
classes: "qtip-shadow qtip-#{ruletype}"
|
||||||
|
|
||||||
false
|
false
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user