Moved Aws-Autoscaling to the ignore list #13

Merged
merged 1 commit into from Dec 3, 2012
View
@@ -1,123 +1,124 @@
var ignoreRepos = {
- 'netflix.github.com': true
+ 'netflix.github.com': true,
+ 'aws-autoscaling': true
};
var showingBalloonIndex = -1;
var shouldBeShowingBalloonIndex = -1;
function repoView(thumbView)
{
- if ( thumbView )
- {
- $('#repo-content').show();
- $('#repo-list-content').hide();
- }
- else
- {
- $('#repo-content').hide();
- $('#repo-list-content').show();
- }
- return false;
+ if ( thumbView )
+ {
+ $('#repo-content').show();
+ $('#repo-list-content').hide();
+ }
+ else
+ {
+ $('#repo-content').hide();
+ $('#repo-list-content').show();
+ }
+ return false;
}
function removeBalloon()
{
- $('#balloon-container').hide();
- $('#balloon-arrow-left').hide();
- $('#balloon-arrow-right').hide();
- showingBalloonIndex = -1;
+ $('#balloon-container').hide();
+ $('#balloon-arrow-left').hide();
+ $('#balloon-arrow-right').hide();
+ showingBalloonIndex = -1;
}
function displayBalloon(index)
{
- if ( showingBalloonIndex === index )
- {
- return;
- }
- showingBalloonIndex = index;
-
+ if ( showingBalloonIndex === index )
+ {
+ return;
+ }
+ showingBalloonIndex = index;
+
var thisRepo = reposTab[index];
var updatedAt = parseISO8601(thisRepo.updated_at);
- var updatedStr = $.format.date(updatedAt, "MM/dd/yy") + ' ' + $.format.date(updatedAt, "@HH:mm:ss");
+ var updatedStr = $.format.date(updatedAt, "MM/dd/yy") + ' ' + $.format.date(updatedAt, "@HH:mm:ss");
- $('#balloon-heading').text(thisRepo.name);
- $('#balloon-description').html(thisRepo.description + ' ' + '<span class="more-info"><a href="' + thisRepo.html_url + '">More&nbsp;Info</a></span>');
- $('#balloon-watchers').text(thisRepo.watchers);
- $('#balloon-forks').text(thisRepo.forks);
- $('#balloon-language').text(thisRepo.language);
- $('#balloon-issues').text(thisRepo.open_issues);
- $('#balloon-updated').text(updatedStr);
-
- var windowWidth = $(window).width();
- var offset = $('#repo-id-' + index).offset();
- var width = $('#repo-id-' + index).width();
-
- if ( offset.left < (windowWidth - 600) )
- {
- $('#balloon-container').css('left', offset.left + width + 52);
- $('#balloon-container').css('top', offset.top + 10);
- $('#balloon-arrow-left').css('left', offset.left + width + 5);
- $('#balloon-arrow-left').css('top', offset.top + 50);
+ $('#balloon-heading').text(thisRepo.name);
+ $('#balloon-description').html(thisRepo.description + ' ' + '<span class="more-info"><a href="' + thisRepo.html_url + '">More&nbsp;Info</a></span>');
+ $('#balloon-watchers').text(thisRepo.watchers);
+ $('#balloon-forks').text(thisRepo.forks);
+ $('#balloon-language').text(thisRepo.language);
+ $('#balloon-issues').text(thisRepo.open_issues);
+ $('#balloon-updated').text(updatedStr);
- $('#balloon-container').show();
- $('#balloon-arrow-left').show();
- $('#balloon-arrow-right').hide();
- }
- else
- {
- $('#balloon-container').css('left', offset.left - 329);
- $('#balloon-container').css('top', offset.top + 10);
- $('#balloon-arrow-right').css('left', offset.left - 38);
- $('#balloon-arrow-right').css('top', offset.top + 50);
+ var windowWidth = $(window).width();
+ var offset = $('#repo-id-' + index).offset();
+ var width = $('#repo-id-' + index).width();
- $('#balloon-container').show();
- $('#balloon-arrow-left').hide();
- $('#balloon-arrow-right').show();
- }
-}
+ if ( offset.left < (windowWidth - 600) )
+ {
+ $('#balloon-container').css('left', offset.left + width + 52);
+ $('#balloon-container').css('top', offset.top + 10);
+ $('#balloon-arrow-left').css('left', offset.left + width + 5);
+ $('#balloon-arrow-left').css('top', offset.top + 50);
+
+ $('#balloon-container').show();
+ $('#balloon-arrow-left').show();
+ $('#balloon-arrow-right').hide();
+ }
+ else
+ {
+ $('#balloon-container').css('left', offset.left - 329);
+ $('#balloon-container').css('top', offset.top + 10);
+ $('#balloon-arrow-right').css('left', offset.left - 38);
+ $('#balloon-arrow-right').css('top', offset.top + 50);
+
+ $('#balloon-container').show();
+ $('#balloon-arrow-left').hide();
+ $('#balloon-arrow-right').show();
+ }
+}
function showBalloon(index)
{
- shouldBeShowingBalloonIndex = index;
+ shouldBeShowingBalloonIndex = index;
}
function hideBalloon()
{
- shouldBeShowingBalloonIndex = -1;
+ shouldBeShowingBalloonIndex = -1;
}
function adjustBalloon()
{
- if ( shouldBeShowingBalloonIndex != showingBalloonIndex )
- {
- if ( shouldBeShowingBalloonIndex < 0 )
- {
- removeBalloon();
- }
- else
- {
- displayBalloon(shouldBeShowingBalloonIndex);
- }
- }
+ if ( shouldBeShowingBalloonIndex != showingBalloonIndex )
+ {
+ if ( shouldBeShowingBalloonIndex < 0 )
+ {
+ removeBalloon();
+ }
+ else
+ {
+ displayBalloon(shouldBeShowingBalloonIndex);
+ }
+ }
}
function showListContent()
{
- $('#tab-content-repo').hide();
+ $('#tab-content-repo').hide();
$('#tab-content-timeline').hide();
- $('#tab-content-lists').show();
+ $('#tab-content-lists').show();
}
function showRepoContent()
{
- $('#tab-content-lists').hide();
+ $('#tab-content-lists').hide();
$('#tab-content-timeline').hide();
- $('#tab-content-repo').show();
- resizeRepoContent();
+ $('#tab-content-repo').show();
+ resizeRepoContent();
}
function showTimelineContent() {
- $('#tab-content-repo').hide();
- $('#tab-content-lists').hide();
+ $('#tab-content-repo').hide();
+ $('#tab-content-lists').hide();
$('#tab-content-timeline').show();
}
@@ -137,18 +138,17 @@ function parseISO8601(value) {
function resizeRepoContent()
{
- $('#repo-content').css({'height':(($(window).height())-320)+'px'});
- $('#repo-list-content').css({'height':(($(window).height())-320)+'px'});
+ $('#repo-content').css({'height':(($(window).height())-320)+'px'});
+ $('#repo-list-content').css({'height':(($(window).height())-320)+'px'});
}
function buildRepoContent()
{
- var imageUrl, imageFileName, boxArtOverride, i;
- var projectsToBoxArtOverrides = {
- 'astyanax': 'Sci-Fi-and-Fantasy.jpg',
- 'archaius': 'Anime-and-Animation.jpg',
+ var imageUrl, imageFileName, boxArtOverride, i;
+ var projectsToBoxArtOverrides = {
+ 'astyanax': 'Sci-Fi-and-Fantasy.jpg',
+ 'archaius': 'Anime-and-Animation.jpg',
'asgard': 'Family-Animation.jpg',
- 'aws-autoscaling': 'Kids-Music.jpg',
'blitz4j': 'Boxing.jpg',
'CassJMeter': 'Comedy.jpg',
'curator': 'Documentary.jpg',
@@ -163,27 +163,27 @@ function buildRepoContent()
'SimianArmy': 'Mobster.jpg'
};
var repoContent = "";
- var boxArtIndex = 0;
+ var boxArtIndex = 0;
for (i = 0; i < reposTab.length; ++i )
{
var thisRepo = reposTab[i];
if ( !thisRepo.private && !ignoreRepos[thisRepo.name] )
{
- boxArtOverride = projectsToBoxArtOverrides[thisRepo.name];
- if (boxArtOverride) {
- imageFileName = boxArtOverride;
- } else {
- imageFileName = 'box-art-' + boxArtIndex + '.jpg'
- boxArtIndex++;
- if (boxArtIndex > 20) {
- boxArtIndex = 0;
- }
- }
- imageUrl = 'assets/' + imageFileName;
+ boxArtOverride = projectsToBoxArtOverrides[thisRepo.name];
+ if (boxArtOverride) {
+ imageFileName = boxArtOverride;
+ } else {
+ imageFileName = 'box-art-' + boxArtIndex + '.jpg'
+ boxArtIndex++;
+ if (boxArtIndex > 20) {
+ boxArtIndex = 0;
+ }
+ }
+ imageUrl = 'assets/' + imageFileName;
repoContent += '<a class="repo-item-anchor" href="' + thisRepo.html_url + '">';
repoContent += '<div class="repo-item-container">';
- repoContent += '<div id="repo-container-id-' + i + '" class="repo-item-name">' + thisRepo.name + '</div>';
+ repoContent += '<div id="repo-container-id-' + i + '" class="repo-item-name">' + thisRepo.name + '</div>';
repoContent += '<div id="repo-id-' + i + '" class="repo-item" style="background-image: url(' + imageUrl + ')">';
repoContent += '<div id="repo-cover-id-' + i + '" class="repo-item-cover"><div class="repo-item-shadow"></div></div>';
repoContent += '<div id="repo-button-id-' + i + '" class="repo-item-button"></div>';
@@ -206,13 +206,13 @@ function buildRepoContent()
var index = $(this).data('index');
$(coverId).show();
$(buttonId).show();
- showBalloon(index);
+ showBalloon(index);
}, function(){
var coverId = $(this).data('cover-id');
var buttonId = $(this).data('button-id');
$(coverId).hide();
$(buttonId).hide();
- hideBalloon();
+ hideBalloon();
});
}
}
@@ -221,12 +221,12 @@ function buildRepoListContent()
{
var repoListContent = "";
for ( i = 0; i < reposTab.length; ++i )
- {
+ {
var thisRepo = reposTab[i];
if ( !thisRepo.private && !ignoreRepos[thisRepo.name] )
{
- var updatedAt = parseISO8601(thisRepo.updated_at);
- var updatedStr = $.format.date(updatedAt, "MM/dd/yy") + ' ' + $.format.date(updatedAt, "@HH:mm:ss");
+ var updatedAt = parseISO8601(thisRepo.updated_at);
+ var updatedStr = $.format.date(updatedAt, "MM/dd/yy") + ' ' + $.format.date(updatedAt, "@HH:mm:ss");
repoListContent += '<div class="repo-list-item-container" onClick="location.href=\'' + thisRepo.html_url + '\'; return false;">';
repoListContent += '<div><a class="repo-list-item-anchor" href="' + thisRepo.html_url + '">' + thisRepo.name + '</a></div>';
@@ -236,27 +236,27 @@ function buildRepoListContent()
repoListContent += '<div><span class="repo-list-item-label">Language: </span><span class="repo-list-item-value">' + thisRepo.language + '</span></div>';
repoListContent += '<div><span class="repo-list-item-label">Open Issues: </span><span class="repo-list-item-value">' + thisRepo.open_issues + '</span></div>';
repoListContent += '<div><span class="repo-list-item-label">Updated: </span><span class="repo-list-item-value">' + updatedStr + '</span></div>';
- repoListContent += '</div>';
- }
- }
-
+ repoListContent += '</div>';
+ }
+ }
+
$('#repo-list-content').html(repoListContent);
}
$(function(){
- buildRepoContent();
- buildRepoListContent();
+ buildRepoContent();
+ buildRepoListContent();
- $(window).resize(function(){
- hideBalloon();
+ $(window).resize(function(){
+ hideBalloon();
resizeRepoContent();
- });
- resizeRepoContent();
-
- window.setInterval("adjustBalloon()", 500);
- $('#balloon-container').hover(function(){
- shouldBeShowingBalloonIndex = showingBalloonIndex;
- },function(){
- shouldBeShowingBalloonIndex = -1;
- });
+ });
+ resizeRepoContent();
+
+ window.setInterval("adjustBalloon()", 500);
+ $('#balloon-container').hover(function(){
+ shouldBeShowingBalloonIndex = showingBalloonIndex;
+ },function(){
+ shouldBeShowingBalloonIndex = -1;
+ });
});