1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-22 21:00:10 +01:00

79 lines
2.6 KiB
JavaScript
Raw Normal View History

var annotations = {
permitted: {
'commercial-use' : 'This software and derivatives may be used for commercial purposes.',
'modifications' : 'This software may be modified.',
'distribution' : 'You may distribute this software.',
'sublicense' : 'You may grant a sublicense to modify and distribute this software to third parties not included in the license.',
2013-01-19 12:56:27 -08:00
'warranty' : 'You may place a warranty on the software.',
'private-use' : 'You may use and modify the software without distributing it.'
},
forbidden: {
'no-warranty' : 'Software is released without warranty and the software/license owner cannot be charged for damages.',
'trademark-use' : 'You may NOT use the names, logos, or trademarks of contributors.',
'no-liability' : 'Software is provided without warranty and the software author/license owner cannot be held liable for damages.',
'no-sublicense' : 'You may not grant a sublicense to modify and distribute this software to third parties not included in the license.',
},
required: {
'include-copyright' : 'Include the original copyright with the code.',
'include-license' : 'Include the full text of the license with the code.',
'document-changes' : 'Indicate significant changes made to the code.',
'disclose-source' : 'Source code must be made available when distributing the software.',
2013-01-19 12:56:27 -08:00
'nonstatic-linkage' : 'The library must be linked in a way that allows it to be replaced with a similar library.',
'rename' : 'You must change the name of the software if you modify it.'
}
}
2012-12-04 17:12:12 -05:00
var qtip_position = {
my: 'top center',
at: 'bottom center'
};
$(document).ready(function() {
for (var category in annotations) {
var categoryAnnotations = annotations[category];
for (var annotation in categoryAnnotations) {
$('table.license ul.' + category + ' li.' + annotation).attr('title', categoryAnnotations[annotation]);
}
}
$('.license .required li').qtip({
2012-12-04 17:12:12 -05:00
content: {
text: false,
title: {
text: 'Required'
}
},
position: qtip_position,
style: {
classes: 'qtip-shadow qtip-required'
}
});
$('.license .permitted li').qtip({
2012-12-04 17:12:12 -05:00
content: {
text: false,
title: {
text: 'Permitted'
}
},
position: qtip_position,
style: {
classes: 'qtip-shadow qtip-permitted'
}
});
$('.license .forbidden li').qtip({
2012-12-04 17:12:12 -05:00
content: {
text: false,
title: {
text: 'Forbidden'
}
},
position: qtip_position,
style: {
classes: 'qtip-shadow qtip-forbidden'
}
});
});