From 204f7c981bad7d04551db5ec27a000ee9bd5ba98 Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Sat, 20 Sep 2014 15:21:31 -0500 Subject: [PATCH] Fix error found by cky --- .../meta/pkg-index/official/static/index.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/pkgs/plt-services/meta/pkg-index/official/static/index.js b/pkgs/plt-services/meta/pkg-index/official/static/index.js index 74b6ff7235..38e0a5c315 100644 --- a/pkgs/plt-services/meta/pkg-index/official/static/index.js +++ b/pkgs/plt-services/meta/pkg-index/official/static/index.js @@ -111,17 +111,17 @@ $( document ).ready(function() { return $('').append(dl, " ") } ) ); if ( pkgi['build']['failure-log'] ) { - $('#pi_build') + $('#pi_build').html("") .append($('') .append($('', { href: build_host + pkgi['build']['failure-log'] }).html( "fails" ))); } else if ( pkgi['build']['success-log'] && pkgi['build']['dep-failure-log'] ) { - $('#pi_build') + $('#pi_build').html("") .append($('') .append($('', { href: build_host + pkgi['build']['success-log'] }).html( "succeeds" )) .append(" with ") .append($('', { href: build_host + pkgi['build']['dep-failure-log'] }).html( "dependency problems" ))); } else if ( pkgi['build']['success-log'] ) { - $('#pi_build') + $('#pi_build').html("") .append($('') .append($('', { href: build_host + pkgi['build']['success-log'] }).html( "succeeds" ))); } @@ -466,14 +466,14 @@ $( document ).ready(function() { .append( curate_span ), $('').html("") .append( jslink( value['name'], function () { open_info ( value ); }) ), - $('').append( $.map( value['build']['docs'], function ( doc, i ) { + $('').html("").append( $.map( value['build']['docs'], function ( doc, i ) { var dl; if ( doc[2] ) { dl = $('', { href: build_host + doc[2] } ).html(doc[1]); } else { dl = $('').html(doc[1]); } return $('').append(dl, " ") } ) ), - $('').append( $.map( value['authors'], function ( author, i ) { + $('').html("").append( $.map( value['authors'], function ( author, i ) { return addfilterlink ( author, "author:" + author, "possible" ); } ) ), $('').text( value['description'] ), $('').append( $.map( value['tags'], function ( tag, i ) { @@ -591,8 +591,14 @@ $( document ).ready(function() { value['versions']['default']['source'] = ""; value['versions']['default']['source_url'] = ""; value['versions']['default']['checksum'] = ""; + value['build'] = {}; + value['build']['success-log'] = false; + value['build']['failure-log'] = false; + value['build']['dep-failure-log'] = false; + value['build']['conflicts-log'] = false; + value['build']['docs'] = []; - add_package_to_list (value); + add_package_to_list(value); evaluate_search(); open_info(value); }), " | ",