github-voice
github-voice copied to clipboard
jQuery plug-in to display GitHub issues like UserVoice.
github-voice
A jQuery plug-in to display GitHub issues like UserVoice.
Usage
- Include jQuery.
- Include the plug-in.
- Call
githubVoice
on an element with the username, project and optional options.
Example
$(function() {
$('a.default').githubVoice('thoughtbot', 'paperclip');
});
Advanced Examples
Customization
$('a.custom').githubVoice('thoughtbot', 'paperclip', {
query : { 'labels' : 'idea', 'per_page' : 3 },
text : {
loading : "Loading ideas...",
description : "Below are the top three ideas.",
callToAction : "View feedback forum."
}
});
Filtering
$('a.filter').githubVoice('thoughtbot', 'paperclip', {
filter : {
user: /thoughtbot/g
}
});
Sorting
// Sort by property. (See GitHub API for valid values.)
$('a.sort-updated-desc').githubVoice('thoughtbot', 'paperclip', {
query : { 'sort' : 'updated', 'direction' : 'desc' }
});
Options
filter
Gives you the ability to filter issues by any information returned by the API. See the GitHub Issues API for valid properties.
overlay
Enable or disable the overlay when displaying issues.
query
Custom query options passed to the GitHub API. See the GitHub Issues API for more details.
text.description
The text displayed above the issue list. (Default: "We've setup a feedback forum so you can tell us what's on your mind. Please go there and be heard!")
text.loading
The text displayed while the issues are being loaded. (Default: "Loading...")
text.callToAction
The call-to-action text used for the link below the issue list. (Default: "» Go to our Feedback Forum")
License
github-voice uses the MIT license. See LICENSE for more details.