Created
November 28, 2008 06:31
-
-
Save johnbender/29921 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//add the repo data to the div using the template | |
this.DisplayRepos = function(data) | |
{ | |
//if we got properly formed data | |
if(data.user != undefined) | |
{ | |
var user = data.user; | |
//for all the div objects that correspond to that user | |
for(var j in GitHubRepos.displayObjects[user.login]) | |
{ | |
var proj_div = GitHubRepos.displayObjects[user.login][j]; | |
//for each of the user repositories in the data | |
$.each(user.repositories, function(i, repo) { | |
//add the templated information to the divs existing content | |
proj_div.innerHTML = proj_div.innerHTML + format(REPO_TEMPLATE, repo.url, repo.name); | |
}); | |
//the style div.github-projects is display: none by default | |
//display it if there was no error message | |
proj_div.style.display = "block"; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment