Permalink
Browse files

new homepage

  • Loading branch information...
1 parent a146015 commit 689f4dd9a0a328e7680161a138ee56decd1f1959 @thomasdavis committed Oct 5, 2012
Showing with 9 additions and 6 deletions.
  1. +9 −6 index.html
View
@@ -170,7 +170,7 @@ <h2 style="line-height: 80px;"><a href="<%= org.url %>"><%= org.login %></a></h2
dataType: "jsonp",
success: function (user) {
console.log(user);
- $('.profile').html(_.template($('#profile-template').html(), {user: user}));
+ $('.profile').html(_.template($('#profile-template').html(), {user: user.data}));
displayUserRepos();
displayOrganizationRepos();
}
@@ -179,10 +179,11 @@ <h2 style="line-height: 80px;"><a href="<%= org.url %>"><%= org.login %></a></h2
var displayUserRepos = function () {
- $.ajax('https://api.github.com/users/thomasdavis/repos?type=owner&per_page=100', {
+ $.ajax('https://api.github.com/users/thomasdavis/repos?type=owner&per_page=100&callback=?' , {
+ dataType: "jsonp",
success: function (repos) {
console.log(repos);
- $('.my-repos').html(_.template($('#repositories-table').html(), {repos: repos}));
+ $('.my-repos').html(_.template($('#repositories-table').html(), {repos: repos.data}));
$('.my-repos table').dataTable( {
"bPaginate": true,
"bLengthChange": false,
@@ -197,13 +198,15 @@ <h2 style="line-height: 80px;"><a href="<%= org.url %>"><%= org.login %></a></h2
};
var displayOrganizationRepos = function () {
- $.ajax('https://api.github.com/users/thomasdavis/orgs', {
+ $.ajax('https://api.github.com/users/thomasdavis/orgs'+ '?callback=?', {
+ dataType: "jsonp",
success: function (orgs) {
console.log(orgs);
_.each(orgs, function(org){
- $.ajax('https://api.github.com/orgs/' + org.login + '/repos', {
+ $.ajax('https://api.github.com/orgs/' + org.data.login + '/repos'+ '?callback=?', {
+ dataType: "jsonp",
success: function (repos) {
- var tableContainer = $(_.template($('#repositories-table').html(), {repos: repos, org: org}));
+ var tableContainer = $(_.template($('#repositories-table').html(), {repos: repos.data, org: org.data}));
var table = $('table', tableContainer);
$('.my-orgs').append(tableContainer);

0 comments on commit 689f4dd

Please sign in to comment.